3

Considering the following code:

\documentclass{book}
\usepackage{fullpage}
\usepackage[english]{babel}
\usepackage[avantgarde]{quotchap}

\begin{document}
\chapter{Introduction}
\end{document}

How can we left justify the chapter name only?

  • Where should the chapter number go to then? Left justified to what? – user31729 Aug 3 '15 at 10:54
  • I simply need chapter number to appear on its default position i.e. on right side of the page while moving the chapter name to left side of the page. – Shahzad Aug 3 '15 at 10:56
  • What does quotchap documentation say about this? – user31729 Aug 3 '15 at 11:01
  • I am not sure about this but even if I remove fillpage package, chapter name and chapter number appear on right side of the page except the overall size of the page is decreased. – Shahzad Aug 3 '15 at 11:01
  • Assuming the chapter name and number fit on the same line, should they in fact be set on the same line? Or do you want to preserve the default vertical positioning, viz., chapter number on a line by itself and above the chapter name? – Mico Aug 3 '15 at 11:03
4

Patch the redefined \@makechapterhead to have \raggedright in the right place:

\documentclass{book}
\usepackage{fullpage}
\usepackage[english]{babel}
\usepackage[avantgarde]{quotchap}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makechapterhead}
 {\raggedleft\advance}
 {\raggedright\advance}
 {}{}
\makeatother

\begin{document}
\chapter{Introduction}
\end{document}

enter image description here

  • The solution is working fine for the above specified test case. But it is not affecting the .tex files included in the main file. Can you please specify those changes as well? – Shahzad Aug 3 '15 at 11:33
  • @Shahzad Sorry, but I don't understand. If you do \input{file} and file.tex contains \chapter{Title}, there should be no difference at all. – egreg Aug 3 '15 at 11:37

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.