# Chapter style with horizontal and vertical lines

I am trying to create a specific chapter style for a thesis but do not have the latex know how to create it myself. The style I am going for looks like the image below. I am just trying to replicate the chapter heading itself. Could anyone please point me in the right direction?

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Jul 21 '15 at 9:50

## 1 Answer

Only a first trial, not perfect.

The chapter heading is typeset within \@makechapterhead -- Instead of the standard code, a table can be inserted there, which does the lines 'automatically'

\documentclass{book}

\usepackage{array}
\usepackage{xpatch}

\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

\makeatletter

\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\begin{tabular}{p{1.2cm}|C{0.6\textwidth}}
& \tabularnewline
& \huge\bfseries \@chapapp\space \thechapter \tabularnewline
& \tabularnewline
\hline
& \tabularnewline
& \huge \bfseries #1 \tabularnewline
& \tabularnewline
\end{tabular}
\fi
\fi
\interlinepenalty\@M
\vskip 40\p@
}}

\makeatother

\usepackage{blindtext}

\begin{document}
\chapter{First}
\blindtext
\chapter{A really long chapter title which wraps around}

\end{document}


• The spacings are hard-coded of course so far, since there wasn't much time to provide an answer, and it does not work for the chapter* command, since this macro uses \@makeschapterhead – user31729 Jul 21 '15 at 10:02
• Thanks for the quick response. The only changes I think I need to make are aligning the vertical line with the first word of the indented paragraph and to vertically centre the entire chapter. I reckon I can do those though. Thanks for the help. – 1QuickQuestion Jul 21 '15 at 10:05
• Try p{\parindent} instead of p{1.2cm} in my code – user31729 Jul 21 '15 at 10:06