6

Following this question of mine, I try to make the start of part and chapter title headings "vertically parallel" (right term?).

Example of what I get: ("." not visible only to show space difference)

A...PARTTITEL
1..CHAPTERITEL

What I aim for:

A..PARTTITEL
1..CHAPTERITEL

Please see the MWE below:

\documentclass{book}
\usepackage{titlesec}

\renewcommand\thepart{\Alph{part}}
\titleclass{\part}{top}
\titleclass{\chapter}{straight}

\titleformat{\part}[hang]
  {\normalfont\huge\bfseries}{\thepart}
  {20pt}{\Huge}
\titleformat{\chapter}[hang]
  {\normalfont\huge\bfseries}{\thechapter}
  {20pt}{\Huge}[\vskip8pt{\titlerule[1.5pt]}]

\titlespacing*{\part}
  {0pt}{50pt}{40pt}
\titlespacing*{\chapter}
  {0pt}{0pt}{20pt}

\begin{document}

\part{Test Part One}
\chapter{Test Chapter One}

\end{document}
7

Put the numbers in a fixed width box:

\documentclass{book}
\usepackage{titlesec}

\renewcommand\thepart{\Alph{part}}
\titleclass{\part}{top}
\titleclass{\chapter}{straight}

\titleformat{\part}[hang]
  {\normalfont\huge\bfseries}
  {\makebox[1.5em][l]{\thepart}}
  {0pt}
  {\Huge}
\titleformat{\chapter}[hang]
  {\normalfont\huge\bfseries}
  {\makebox[1.5em][l]{\thechapter}}
  {0pt}
  {\Huge}
  [\vskip8pt{\titlerule[1.5pt]}]

\titlespacing*{\part}
  {0pt}{50pt}{40pt}
\titlespacing*{\chapter}
  {0pt}{0pt}{20pt}

\begin{document}

\part{Test Part One}
\chapter{Test Chapter One}

\end{document}

Adjust 1.5em to suit (it should be wider, probably, if you have more than nine chapters).

enter image description here

Not that I find this style particularly attractive. ;-)

  • Appreciate your personal comment on the style, care to recommend your favorites? – FLW Nov 2 '13 at 14:44

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.