4

A beginner question: I would like to print \part with roman numbers as it follows:

I. Teil

or

I. rész

Someone could please explain me how to do it?

2
  • The default display of part numbers is uppercase roman numerals. Are you referring to the representation in conjunction with the name? Currently, memoir prints Part I on a single line, with the title on another.
    – Werner
    Jun 23, 2012 at 18:39
  • I need to change the default display as mentioned above. I want to print something like "I. Teil" on the first line and "BlaBla Title" on the second line. That is: the part number should be in Roman numerals, and the part number – followed by a full stop – should appear before the "part", "Teil" or "rész" wording.
    – Paul Agos
    Jun 23, 2012 at 19:00

1 Answer 1

4

The localisation is done by using the appropriate language with the babel package. Memoir has no hooks for modification of the \part code, so you need to do it by redefining it in your preamble:

\documentclass{memoir}
\usepackage[ngerman]{babel}
\makeatletter
\long\def\@part[#1]#2{%
  \M@gettitle{#1}%
  \phantomsection
  \ifnum \c@secnumdepth >-2\relax
    \refstepcounter{part}%
    \addcontentsline{toc}{part}%
      {\protect\partnumberline{\thepart}#1}%
    \mempartinfo{\thepart}{#1}{#2}%
  \else
    \addcontentsline{toc}{part}{#1}%
    \mempartinfo{}{#1}{#2}%
  \fi
  \partmark{#1}%
  {\centering
   \interlinepenalty \@M
   \parskip\z@
   \normalfont
   \ifnum \c@secnumdepth >-2\relax
    \printpartnum.\ \printpartname \partnamenum % changed order and added . here
     \midpartskip
   \fi
   \printparttitle{#2}\par}%
  \@endpart}
\makeatother
\begin{document}
\part{A part title}
\end{document}

output of code

1
  • Many thanks, that's exactly what I needed :))
    – Paul Agos
    Jun 23, 2012 at 19:12

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.