# XeLaTeX changing linespacing after macro

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

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

\renewcommand{\part}[1]{
\cleardoublepage
\refstepcounter{part}
\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