Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Asked
Viewed 1k times
3

I have a style requirement for headings. Header 1 = 16pt bold, Header 2 = 14pt bold underline. Font is required to be Palatino Linotype. I got this document shell from a classmate and have only made one real document in latex. I couldn't figure out how to modify headers without using the sectsty package, but when using sectsty I am getting "Undefined control sequence errors for my \section, \subsection, \tableofcontents and \begin but the formatting is correct. It's not messing the document up but I'd like to figure out why this is happening.

My sections aren't complicated(ex: /Section{Introduction})

\documentclass[11pt,titlepage]{article}
\usepackage{float}
\usepackage{graphicx, fancyvrb, natbib, setspace}
\usepackage{listings}
\usepackage[usenames,dvipsnames]{color}
\usepackage[usenames]{color}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{caption}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{mathpazo}
\usepackage{sectsty}
\usepackage{fncychap}
\usepackage[normalem]{ulem}
\captionsetup[table]{font=bf}
\subsectionfont{\Large\PalatinoLinotype\underline}
\sectionfont{\LARGE\PalatinoLinotype}
3
  • The undefined control sequence most certainly refers to \PalatinoLinotype. Drop that, since you didn't mention any of that font-related requirement in your post.
    Werner
    –  Werner
    2015-03-01 06:14:50 +00:00
    Commented Mar 1, 2015 at 6:14
  • Ah that was what I forgot. Palatino is the other requirement.
    Jake
    –  Jake
    2015-03-01 08:14:56 +00:00
    Commented Mar 1, 2015 at 8:14
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    karlkoeller
    –  karlkoeller
    2015-03-01 08:28:09 +00:00
    Commented Mar 1, 2015 at 8:28

1 Answer 1

5

If Palatino is required for the whole document, you're already loading mathpazo to have Palatino in both text and math mode.

MWE:

\documentclass[11pt,titlepage]{article}

\usepackage{mathpazo}

\usepackage{sectsty}
\subsectionfont{\Large\underline}
\sectionfont{\LARGE}

\usepackage{lipsum} % just for the example

\begin{document}
\section{A section}
\lipsum[1]
\[a+b=c\]
\subsection{A subsection}
\lipsum[2]
\[x+y=z\]
\end{document} 

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.