0

I am writing a PhD thesis in the book class, and using the fncychap package to format chapter titles. The MWE is attached below. The problem I am encountering is that I want the dedication and frontmatter (i.e., \chapter*{} and \chapter*{Abstract} etc.) without fncychap formatting. I have tried all available resources in stack to no avail. Can someone please guide me on how to achieve this? Below is the MWE (any other useful tips regarding any issues also appreciated, thanks in advance!):

\documentclass[12pt, a4paper, openright]{book}
%\usepackage{emptypage}
\usepackage[Glenn]{fncychap} %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}}
\let\cleardoublepage\clearemptydoublepage
\usepackage{mathptmx}
\usepackage{amscd}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm} 
\usepackage{lipsum}
\usepackage{float}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage{mathpazo}
\usepackage[utf8]{inputenc}
\usepackage[bindingoffset=0.5in,
            left=3cm,
            right=3cm,
            top=3cm,
            bottom=3cm]{geometry}                       
\geometry{a4paper}
\usepackage{fancyhdr}
\pagestyle{plain} 
\usepackage[dvipsnames]{xcolor}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
% \setcounter{secumdepth}{0}
\usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex}  
\bibliography{Bibliography}
\usepackage{hyperref}
\hypersetup{                  
    pdftoolbar=true,        
    pdfmenubar=true,       
    pdffitwindow=false,     
    pdfstartview={FitH},
    pdfauthor={AB},     
    colorlinks=true,       
    linkcolor=MidnightBlue,         
    citecolor=MidnightBlue,       
}    
\usepackage[acronym]{glossaries}
\glsdisablehyper
\setglossarystyle{listgroup}
\makeglossaries
\newacronym{cmb}{CMB}{cosmic microwave background}
\usepackage[pdftex]{graphicx}                   
\usepackage{setspace}
\doublespacing
\usepackage{physics}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{subcaption}
 \usepackage{pdfpages}
\usepackage{bm}
\usepackage{wrapfig}
\usepackage{adjustbox}
\usepackage{dcolumn}
\newtheorem{theorem}{Theorem}
\DeclareUnicodeCharacter{0301}{\'{e}}
\setlength{\headheight}{14.49998pt}


\begin{document}
\begin{titlepage}
\begin{center}


{\huge My thesis title} 
\noindent
\rule{\textwidth}{0.4pt}
\begin{center}
    \small{A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Physics}
\end{center}
\vspace{1cm}
\includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png}
\\
\vspace{0.7cm}
{By \\ \large \textbf{Author Name}}\\
Unique Enrolment No.: XXX dated 27/01/2017\\
University Registration No.: XXX of 2016--17

\vspace{0.7cm}
{Under the supervision of \\\textbf{Dr. XXX} \\ Professor}

\vspace*{0.5cm}

Department of Physics\\ XXX School of Physical Sciences \\
XXX University\\
XXX--788011, XXX, India

\end{center}
\end{titlepage}
%\let\cleardoublepage\clearpage
\chapter*{}
\input{Chapters/Dedication}
\frontmatter

\chapter*{Acknowledgements}
\input{Chapters/Acknowledgements}

\chapter*{Abstract}
\input{Chapters/Abstract}
\tableofcontents
\listoffigures
\listoftables
\printglossary[type=\acronymtype, nonumberlist, title=List of Abbreviations, toctitle=List of Abbreviations]

\mainmatter

\chapter{Chapter 1}\chaptermark{Introduction}
\label{chap:one}
\input{Chapters/Chapter1}

 
\backmatter
\pagestyle{plain}


\end{document}

2 Answers 2

1

Introduction

First of all, since you show a very long document preamble, organize it in a sensible way, so you will discover several inconsistencies.

Load packages first, maybe grouped by action type. Only after it do your settings: your preamble will become maintainable, which it currently isn't.

First major inconsistency: mathptmx and mathpazo aren't to be loaded together. It's common that loading font packages (especially if they act on math fonts) leads to weird problems.

Do you really need amscd? When it appeared it was a welcome addition, but the diagrams it produces don't stand against tikz-cd or Xy-pic.

Loading fancyhdr and then stating \pagestyle{plain} is just losing time. The \bibliography command is deprecated by biblatex. The pdftex option should not be used for graphicx. The instruction

\DeclareUnicodeCharacter{0301}{\'{e}}

is very wrong, I'm afraid. If you have problems with the combining acute appearing here and there, fix them; with that code a sequence “e+combining acute” would produce “eé”, which is definitely not what you want.

Finally, why commenting out emptypage and manually do exactly what the package does?

The main problem

Now the main problem. Since you want to use the Glenn chapter style (I wouldn't even under physical threat), I see no reason for the unnumbered chapters not to share it. The package has no tool for deselecting chapter styles for them. But you can do it “manually”:

% chapter header
% first save the unnumbered chapter style
\ExpandArgs{cc}\NewCommandCopy{latex@makeschapterhead}{@makeschapterhead}
\usepackage[Glenn]{fncychap}% are you really sure?
% revert
\ExpandArgs{cc}\RenewCommandCopy{@makeschapterhead}{latex@makeschapterhead}

An alias is made for the command that takes care of unnumbered chapter headers; then the dreadful package is loaded and the alias is used to restore the previous meaning.

I also add

% fncychap
\ChNameVar{\Large}

in the settings section: sans serif for the chapter name and number is really out of place.

The reformatted code

I also simplified the title page format.

\documentclass[12pt, a4paper, openright]{book}

%%% Packages
%\usepackage[utf8]{inputenc}% no longer needed

% pagination related
\usepackage{geometry}
\usepackage{emptypage}
\usepackage{fancyhdr}
\usepackage{setspace}

% math
\usepackage{amsmath}
\usepackage{bm}
\usepackage{amsthm}
\usepackage{physics}

% fonts
%\usepackage{mathpazo}
%\usepackage{amssymb}
\usepackage{newpxtext,newpxmath}


% general utilities
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage{pdfpages}
\usepackage{wrapfig}
\usepackage{adjustbox}

% chapter header
% first save the unnumbered chapter style
\ExpandArgs{cc}\NewCommandCopy{latex@makeschapterhead}{@makeschapterhead}

\usepackage[Glenn]{fncychap}% are you really sure?
% revert
\ExpandArgs{cc}\RenewCommandCopy{@makeschapterhead}{latex@makeschapterhead}

% captions
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{subcaption}

% tables
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{dcolumn}

% bibliography
\usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex}  

% glossaries and indices
\usepackage[acronym]{glossaries}

% miscellaneous
%\usepackage{lipsum}
%\usepackage{float}

% HYPERREF (last!)
\usepackage{hyperref}

%%% Settings related to packages

% geometry
\geometry{
  %a4paper,
  bindingoffset=0.5in,
  headheight=14.5pt,
  left=3cm,
  right=3cm,
  top=3cm,
  bottom=3cm,
  heightrounded,
}

% fancyhdr
%%% do something here

% fncychap
\ChNameVar{\Large}

% glossaries
\glsdisablehyper
\setglossarystyle{listgroup}
\makeglossaries

% hyperref
\hypersetup{
  pdftoolbar=true,
  pdfmenubar=true,
  pdffitwindow=false,
  pdfstartview={FitH},
  pdfauthor={AB},
  colorlinks=true,
  linkcolor=MidnightBlue,
  citecolor=MidnightBlue,
}    

%%% FINAL TOUCHES
\doublespacing
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}

%%% Bib data
\addbibresource{Bibliography.bib}

% theorems
\newtheorem{theorem}{Theorem}

% acronyms
\newacronym{cmb}{CMB}{cosmic microwave background}

\begin{document}

\begin{titlepage}
\centering

{\huge My thesis title\par}

\rule{\textwidth}{0.4pt}

{\small A dissertation submitted in partial fulfilment of the requirements 
for the degree of Doctor of Philosophy in Physics\par}

\vspace{1cm}

\includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png}

\vspace{0.7cm}

{By \\ \large \textbf{Author Name}}\\
Unique Enrolment No.: XXX dated 27/01/2017\\
University Registration No.: XXX of 2016--17

\vspace{0.7cm}

Under the supervision of \\\textbf{Dr. XXX} \\ Professor

\vspace*{0.5cm}

Department of Physics\\ XXX School of Physical Sciences \\
XXX University\\
XXX--788011, XXX, India

\end{titlepage}

\chapter*{Dedication}
%\input{Chapters/Dedication}

\frontmatter

\chapter*{Acknowledgements}
%\input{Chapters/Acknowledgements}

\chapter*{Abstract}
%\input{Chapters/Abstract}

\tableofcontents
\listoffigures
\listoftables

\printglossary[
  type=\acronymtype,
  nonumberlist,
  title=List of Abbreviations,
  toctitle=List of Abbreviations
]

\mainmatter

\chapter{Introduction}
\label{chap:one}
%\input{Chapters/Chapter1}

 
%\backmatter

\end{document}

enter image description here

3
  • This worked great! Thank you very much for solving the issue and for the very useful tips on the preamble. I have seen much apprehension regarding the fncychap package. I will consider using other alternatives instead in the next project. Best regards.
    – madmiKe
    Commented Jun 25, 2023 at 9:51
  • @madmiKe Look at the documentation of memoir for more attractive chapter header styles.
    – egreg
    Commented Jun 25, 2023 at 10:20
  • Will do! @egreg
    – madmiKe
    Commented Jun 25, 2023 at 14:11
1

Your MWE is hardly minimal and not working, but after commenting out all the bad bits I was able to get the following to work.

BTW, you can replace \\ \vspace(0.7cm) with \\[0.7cm], at least inside center and certain other environments.

\documentclass[12pt, a4paper, openright]{book}
%\usepackage{emptypage}

\makeatletter
\let\normalshead=\@makeschapterhead
\usepackage[Glenn]{fncychap} %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\let\@makeschapterhead=\normalshead
\makeatother

\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}}
\let\cleardoublepage\clearemptydoublepage
\usepackage{mathptmx}
\usepackage{amscd}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm} 
\usepackage{lipsum}
\usepackage{float}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage{mathpazo}
\usepackage[utf8]{inputenc}
\usepackage[bindingoffset=0.5in,
            left=3cm,
            right=3cm,
            top=3cm,
            bottom=3cm]{geometry}                       
\geometry{a4paper}
\usepackage{fancyhdr}
\pagestyle{plain} 
\usepackage[dvipsnames]{xcolor}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
% \setcounter{secumdepth}{0}
\usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex}  
\bibliography{Bibliography}
\usepackage{hyperref}
\hypersetup{                  
    pdftoolbar=true,        
    pdfmenubar=true,       
    pdffitwindow=false,     
    pdfstartview={FitH},
    pdfauthor={AB},     
    colorlinks=true,       
    linkcolor=MidnightBlue,         
    citecolor=MidnightBlue,       
}    
\usepackage[acronym]{glossaries}
\glsdisablehyper
\setglossarystyle{listgroup}
\makeglossaries
\newacronym{cmb}{CMB}{cosmic microwave background}
\usepackage[pdftex]{graphicx}                   
\usepackage{setspace}
\doublespacing
\usepackage{physics}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{subcaption}
 \usepackage{pdfpages}
\usepackage{bm}
\usepackage{wrapfig}
\usepackage{adjustbox}
\usepackage{dcolumn}
\newtheorem{theorem}{Theorem}
\DeclareUnicodeCharacter{0301}{\'{e}}
\setlength{\headheight}{14.49998pt}


\begin{document}
\begin{titlepage}
\begin{center}


{\huge My thesis title} 
\noindent
\rule{\textwidth}{0.4pt}
\begin{center}
    \small{A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Physics}
\end{center}
\vspace{1cm}
\includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png}
\\
\vspace{0.7cm}
{By \\ \large \textbf{Author Name}}\\
Unique Enrolment No.: XXX dated 27/01/2017\\
University Registration No.: XXX of 2016--17

\vspace{0.7cm}
{Under the supervision of \\\textbf{Dr. XXX} \\ Professor}

\vspace*{0.5cm}

Department of Physics\\ XXX School of Physical Sciences \\
XXX University\\
XXX--788011, XXX, India

\end{center}
\end{titlepage}
%\let\cleardoublepage\clearpage
\chapter*{}
%\input{Chapters/Dedication}
\frontmatter

\chapter*{Acknowledgements}
%\input{Chapters/Acknowledgements}

\chapter*{Abstract}
%\input{Chapters/Abstract}
\tableofcontents
\listoffigures
\listoftables
\printglossary[type=\acronymtype, nonumberlist, title=List of Abbreviations, toctitle=List of Abbreviations]

\mainmatter

\chapter{Chapter 1}\chaptermark{Introduction}
\label{chap:one}
%\input{Chapters/Chapter1}

 
\backmatter
\pagestyle{plain}


\end{document}
1
  • This worked fine! Thank you for the additional advise on the code! Best regards.
    – madmiKe
    Commented Jun 25, 2023 at 9:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .