2

I've seen various responses to similar questions, but I haven't found one which helps me recreate the following simplistic header design in the book document class:

Elementary Geometry

This is taken from John Roe's Elementary Geometry. The main points I want to recreate here are the following:

  1. The chapter heading is centred
  2. The text is sans-serif for the chapter and also the heading/subheadings, but then the main text is in an ordinary serif font

I've read that point (2) can be achieved using the scrartcl package, but that requires changing the document class and I'd rather stick to book. Can anyone help recreate this setting?

  • It can easily be done with titlesec. – Bernard May 12 '17 at 16:25
  • @Bernard Can you refer me to a mwe? – Luke Collins May 12 '17 at 16:26
  • Out of curiosity, what about the strange indentation of normal text? – Johannes_B May 12 '17 at 16:29
  • @Johannes_B Are you asking why it's like that? The author leaves the space for theorem numbers, e.g. books.google.com.mt/… – Luke Collins May 12 '17 at 16:30
  • 1
    Ok, so the normal text isn't really indented (the text block is shifted). It is the chapter title, section title, theorem title etc. that is sticking out into the margin. You should add that information to the question, an answer relies on that information. – Johannes_B May 12 '17 at 16:35
1

Here's a code to emulate this layout:

\documentclass[11pt,]{book}
\usepackage[utf8]{inputenc}
\usepackage{fourier, erewhon, cabin}
\usepackage[left=3.5cm]{geometry}
\usepackage{titlesec}

\titleformat{\chapter}[display]{\filcenter\titlerule[1.5pt]\sffamily\bfseries\Huge\bigskip}{\thechapter}{1.5pc}{}[\vspace{2ex}{\titlerule[1.5pt]}]
\titlespacing*{\chapter}{-0.5\marginparwidth}{50pt}{40pt}
\titleformat{\section}[hang]{\sffamily\bfseries\LARGE}{\thesection}{0.8em}{}
\titlespacing*{\section}{-0.5\marginparwidth}{3.5ex}{2.3ex}%

\begin{document}
\setcounter{chapter}{1}
\chapter{Vector geometry}

\section{Affine spaces}
In Chapter 1, we explained how Euclid built up the whole of geometry from a small number of fundamental assumptions or \emph{axioms}. Following Euclid’s method, we stated nine axioms and from them developed the theory of \emph{vectors}.

\end{document} 

enter image description here

2

You mean something like

\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]{}{\hrule}{0pt}{\center\bfseries\thechapter\\[3ex]}[\endcenter\hrule]
\begin{document}
\chapter{test}
alkasdjalsk laskj laskj ldsakj dl
\end{document}

enter image description here

You will have to tweak it for your usage though, ie for sans serif fonts you substitute \bfseries with \sffamily

\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}[display]{}{\hrule}{0pt}{\center\sffamily\thechapter\\[3ex]}[\endcenter\hrule]
\begin{document}
\chapter{test}
alkasdjalsk laskj laskj ldsakj dl
\end{document}

giving

enter image description here

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.