2

I am using the \part sectioning with the following definition:

\def\@part[#1]#2{% <------------------------------- \part[..]{...}
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >\m@ne
       \huge {\scshape\partname\nobreakspace\thepart}% Part font
       \par\nobreak
     \fi
     \huge \bfseries #2% Title font
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}
\def\@spart#1{% <------------------------------- \part*{...}
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \huge \bfseries #1\par}% Title font
     \nobreak
     \vskip 3ex
     \@afterheading}

Right now it is vertically centered on the page it creates.

How can I change the settings, to that the text of "Part X" appears more in the top of the page?

  • Which document class do you use? Please also clarify what you intend by "appears more [at] the top of the page" -- do you want it the very top edge, 1 cm down from the top edge, or something else? Please be specific. – Mico Apr 25 '16 at 19:30
2

Assuming you're using either the report or book document class, or a document class that's built on one of these classes, insert the following instructions in the preamble of your document to have the part-level header be placed close to the top edge of the text block:

\usepackage{etoolbox}
\patchcmd{\part}{\vfil}{}{}{}

To have the part-level header be placed smack dab at the very top edge of the text block, replace \vfil with \null\vfil in the second line of code above.

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.