# Alignment of Part and Chapter headings text

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


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


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).

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