kgolod wrote:[…] I cannot use these packages since they also change the layout of the document, but it must remain the same. […]
These packages do no modifications to the page dimensions. The layout of your document will be the same as without them. So it's not comprehensible to me why you refuse to use them.
Unfortunately you didn't say anything about the class you are using or your template is based on. So I worked out an example for the »report« class.
It works with a modified definition of the »headings« page style as you want it. The original definition is taken from the class. Put the code block between
\makeatletter and
\makeatother into your class template (without those two commands). If you do the redefinition in the preamble of your document, add it as shown in the below code.
Code: Select all
\documentclass[11pt,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{blindtext}
\makeatletter
\if@twoside
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty % No footer
\def\@evenhead{\small\thepage\hfil\leftmark}% % Header on even pages small
\def\@oddhead{\small\rightmark\hfil\thepage}% % Header on odd pages small
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth{\scshape% % Chapters in Header capitalized
\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ %
\fi
##1}{}}%
\def\sectionmark##1{%
\markright{\scshape% % Sections in Header capitalized
\ifnum \c@secnumdepth >\z@
\thesection. \ %
\fi
##1}}}
\else
\def\ps@headings{%
\let\@oddfoot\@empty
\def\@oddhead{\small\rightmark\hfil\thepage}% % Header font small
\let\@mkboth\markboth
\def\chaptermark##1{%
\markright{\scshape% % Chapters in Header capitalized
\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ %
\fi
##1}}}
\fi
\makeatother
\pagestyle{headings}
\begin{document}
\blinddocument
\end{document}
As you can see, you can have both a smaller font size and small capitals in the header. Therefore the font size of the complete heading was decreased (see comments in code). The capitalization for the chapters (and sections in a two-sided document) goes into the definition of the
\chaptermark command or
\sectionmark command, respectively (see comments in code).
The packages
babel (with its global language option) and
blindtext are not part of the solution. There were only used to create the dummy document.