How can the following (titleformat
part) be applied to standard book class and without classicthesis
:
\documentclass[11pt,a4paper,footinclude=true,headinclude=true]{scrbook} % KOMA-Script book
\usepackage{lipsum}
\usepackage{graphicx} %% For \scalebox
\usepackage{classicthesis} %
\titleformat{\chapter}[display]%
{\relax}
{\mbox{}\oldmarginpar{\vspace*{4\baselineskip}%
\color{halfgray}\scalebox{1.5}{\chapterNumber\thechapter}}}
{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
\titlespacing*{\chapter}{0pt}{0pt}{1.2\baselineskip}
\begin{document}
\tableofcontents
\chapter{The grand design}
\section{First principles}
\subsection{Typography exists to honour content}
\lipsum
\end{document}
For example, why does the following give Undefined control sequence. [\chapter{The grand design}]
error:
\documentclass[12pt, a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{libertine}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{adjustbox}
\usepackage{graphicx}
\usepackage{xparse}
\usepackage{xcolor}
\titleformat{\chapter}[display]%
{\relax}
{\mbox{}\oldmarginpar{\vspace*{4\baselineskip}%
\color{gray}\scalebox{1.5}{\chapterNumber\thechapter}}}
{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
\titlespacing*{\chapter}{0pt}{0pt}{1.2\baselineskip}
\begin{document}
\chapter{The grand design}
\section{First principles}
\subsection{Typography exists to honour content}
\lipsum
\end{document}
pdflatex
, orxelatex
, orlualatex
? I ask becauseclassicthesis
has different definitions of some of those macros depending on the engine used.pdflatex
\colorlet{halfgray}{black!45}
.