Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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 '12 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 '12 at 19:00
add comment

1 Answer

up vote 3 down vote accepted

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

share|improve this answer
    
Many thanks, that's exactly what I needed :)) –  Paul Agos Jun 23 '12 at 19:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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