2

I have document for theses, and I noticed that line spacing changed after macro, creating part headline. I cant figure out what could cause this. If anyone has some idea let me know.

this is the macro:

\renewcommand{\part}[1]{
  \refstepcounter{part}
  \addcontentsline{toc}{section}{\thepart~~\uppercase{#1}}%
  \clearpage
  \normalfont
  \vspace*{9cm}
 \begin{center}\huge \bfseries\thepart. \uppercase{#1}\end{center}%
 \markboth{}{}\par
 \nobreak
 \clearpage  
}

here is editable source document: https://www.writelatex.com/1099369kwfvst

1

You have \normalfont in the wrong place (and also other flaws):

\renewcommand{\part}[1]{
  \cleardoublepage
  \refstepcounter{part}
  \addcontentsline{toc}{section}{\thepart~~\uppercase{#1}}%
  \vspace*{9cm}
  \begin{center}
    \normalfont\huge\bfseries
    \thepart. \uppercase{#1}
  \end{center}
  \markboth{}{}
  \cleardoublepage
}

The \normalfont was causing the issue. You probably want also

  \addcontentsline{toc}{section}{\thepart~~\texorpdfstring{\uppercase{#1}}{#1}}%

in order to avoid warnings from hyperref. The same should be in

\newcommand{\upc}[1]{% zjednodušení pro velká písmena
  \texorpdfstring{\uppercase{#1}}{#1}}

and possibly in other places where \uppercase is used.

You need also

\setlength{\headheight}{14.5pt}

as fancyhdr warns you to.

Finally, the BCOR=10mm is unknown to the article class. The package hyperref should be loaded last. Don't load xltxtra, but rather fontspec.

  • Thank's a lot that is absolutely brilliant answer. Thanks a lot. I was wrestling with these warnings for some time. – zajca May 20 '14 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.