1

I want to change the font size of the page header title using the package titleps. I would also like to put it in bold. How do I do that?

I have got the following MWE:

\documentclass{article}
\usepackage{titleps}% http://ctan.org/pkg/titleps


\expandafter\def\expandafter\normalsize\expandafter{%

    \setlength\abovedisplayskip{20pt}
    \setlength\belowdisplayskip{20pt}
    \setlength\abovedisplayshortskip{5pt}
    \setlength\belowdisplayshortskip{20pt}
}


\newpagestyle{main}{
\setheadrule{.1pt}% Header rule
  \sethead
  [\thechapter.\enspace\chaptertitle]
  []
  []
  {}
  {}
  {\thesection.\enspace\sectiontitle}
  \setfoot{}{\thepage}{}
}



\pagestyle{main}

\begin{document}

This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction.
\section{A section}

This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. 
\end{document}

Thanks!

2
  • You do not intend to use any chapter titles in your document? Is that correct?
    – Tina
    Nov 14, 2017 at 16:26
  • well chapter header titles go on the even number pages and section header titles go on odd numbered pages. I really just want to change the font size of the header title and put in bold.
    – user131526
    Nov 14, 2017 at 16:30

1 Answer 1

2

Like this for example (I have removed unnecessary code, as it just makes the header line sit really tight under the header section text). Basically, you just add \large and \bfseries to make it bold, to you styling of sections in the header.

\documentclass{article}
\usepackage{titleps}% http://ctan.org/pkg/titleps

\newpagestyle{main}{
\setheadrule{.1pt}% Header rule
  \sethead
  [\thechapter.\enspace\chaptertitle][][]{}{} %chapter
  {\bfseries\Large\thesection.\enspace\sectiontitle} %section in header (bold and large)
}
\pagestyle{main}

\begin{document}

\section{A section testing this here}
This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction.This is the introduction. This is the introduction. This is the introduction. This is the introduction. This is the introduction. 

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .