如何更改标题字体大小?

如何更改标题字体大小?

我想使用该包更改页眉标题的字体大小标题。我还想将其加粗。我该怎么做?

我得到了以下 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}

谢谢!

答案1

例如这样(我删除了不必要的代码,因为它只会使标题行紧贴在标题部分文本下方)。基本上,您只需添加 \large 和 \bfseries 使其加粗,即可对标题中的部分进行样式设置。

\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}

相关内容