1

The octavo class fits perfectly for a book I just finished with only text, with no mathematical formulas but with a few chemical equations. I’m very pleased with the layout except for a few details I have not been able to change and need help: the header in some pages. The header in the main matter is elegant: the first uppercase letter is followed by lowercase ones, all in small caps. However, in some parts, the header is all uppercase letters. The question is how can this be fixed?

A minimal example follows. It generates a quite long output (40 pages) but it has to.

The beautiful header (to be kept and to be used as model) are page 4 (preface) pages 6, 8, 10, 14 (all normal chapters)

The ugly headers (in my view) are: page 2 (content) page 36 (bibliography) page 40 (name index)

Page 38 has no header. It is a chapter which I used as a glossary such that the entries appear as they are cited, not in alphabetical order. To do this, I used \endnote.

Thank you for the help.

File biblatex-examples.bib is necessary to compile the example, downloaded from: https://mirror.hmc.edu/ctan/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib

All packages were included in the preamble because they can interfere.

\documentclass[foolscap,10pt,openright]{octavo}
%Preample
\makeatletter
\def\input@path{{./}{./octavo}}
\makeatother

\usepackage{bibref,autind} % For newindex
\usepackage[utf8]{inputenc} %Trans­lates var­i­ous stan­dard and other in­put en­cod­ings into a LaTeX in­ter­nal lan­guage
\usepackage[T1]{fontenc} %Al­lows to se­lect font en­cod­ings. Its most pow­er­ful ef­fect is to en­able hy­phen­ation. 
\usepackage[portuguese]{babel}

%Bibliografia
\usepackage[fixlanguage]{babelbib} %fixlanguage
\selectbiblanguage{brazil} 
\setbtxfallbacklanguage{portuguese}
\usepackage[version=4]{mhchem} %For chemical equations
\usepackage{lettrine}

% Optical margins, kerning etc.
\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,babel=true]{microtype} 
\usepackage{xspace}
\usepackage{emptypage} % Needed sometimes
\usepackage{cfr-lm} %Old style numerals
\usepackage{endnotes} % Simultaneously endnote and footnote

%Insert () for endnotes 
\renewcommand*\makeenmark{\hbox{\textsuperscript{\@({\theenmark})}}}
% Personaliza o cabeçalho das notas finais (ver manual)
\renewcommand{\notesname}{\null}
% For beautifull quotes
\usepackage[autostyle=false,csdisplay=true,threshold=1,thresholdtype=words,csdisplay=true]{csquotes}

% Decrease font size when quoting 
\usepackage{relsize,etoolbox}
\AtBeginEnvironment{quote}{\smaller\protect}
\AtBeginEnvironment{quotation}{\smaller\protect}
\usepackage{ebgaramond}%Nice font for text books (no Math needed)
\newcommand{\nomedepgm}[1]{\textsf{\smaller #1}}% Used with program names

% Nice for pages like \putoncenter{The end}
\newcommand{\putoncenter}[1]{
\cleardoublepage
\thispagestyle{empty}
\null
\vfill
\begin{center}
{\sc #1}
\end{center}
\null
\vfill
}

\usepackage{lipsum}

% New index
\newindex{idenomes}{ndx}{nnx}{\protect{\'{I}ndice de nomes}}\index[idenomes]{John7 Doe1}

\begin{document}
\tableofcontents

\chapter{Prefácio} \lipsum[1]John\cite{baez/article} read\index[idenomes]{John Doe1}.\lipsum[2]

%Chapters 1, 2...  repeated just for getting more pages
\chapter{Here begins a story}
\lipsum[1-2]
He\index[idenomes]{Somebody Smith} said\footnote{This book contains footnotes.} something useful\cite{gillies}.
\lipsum[3-4]
A word\endnote{\emph{Word} is a set of letters with a meaning.}
\lipsum[5]
She\index[idenomes]{Mary Doe} said\footnote{This book contains footnotes.} something useful\cite{glashow}.
\lipsum[6]

\chapter{The story goes on}
\lipsum[7]\cite{stdmodel}
John\index[idenomes]{John Doe1}\endnote{\emph{Latin} is an old language.},
John\index[idenomes]{John Doe2}\endnote{\emph{Water}, \ce{H2O}, is a liquid.},
John\index[idenomes]{John Doe3}\endnote{\emph{\sc PC} stands for \emph{personal computer}.},
John\index[idenomes]{John Doe4}\endnote{\emph{John Doe} is a random name.},
John\index[idenomes]{John Doe5}\endnote{\emph{Minimal} should be less than two pages.},
John\index[idenomes]{John1 Doe1}\endnote{\emph{Lipsum} makes this: \lipsum[13]},
John\index[idenomes]{John2 Doe2}\endnote{\emph{Lipsum} makes also this: \lipsum[14]},
John\index[idenomes]{John3 Doe3},
John\index[idenomes]{John4 Doe4} and
John\index[idenomes]{John5 Doe5}\cite{murray}\nocite{reese}
said \lipsum[8]
\lipsum[6]\cite{aksin}
John\index[idenomes]{John6 Doe1},
John\index[idenomes]{John6 Doe2}\cite{bertram}
John\index[idenomes]{John6 Doe3}
John\index[idenomes]{John6 Doe4}
John\index[idenomes]{John6 Doe5}\cite{doody}
John\index[idenomes]{John7 Doe1}
John\index[idenomes]{John7 Doe2}
John\index[idenomes]{John8 Doe3}
John\index[idenomes]{John8 Doe4}
John\index[idenomes]{John90 Doe57}
John\index[idenomes]{John8 Doe5}
\lipsum[9]\cite{angenendt}

\chapter{And keep going}
\lipsum[10]\cite{stdmodel}
John\index[idenomes]{John Doe1}
John\index[idenomes]{John Doe2}
John\index[idenomes]{John Doe3}
John\index[idenomes]{John Doe4}
John\index[idenomes]{John Doe5}
John\index[idenomes]{John1 Doe1}
John\index[idenomes]{John2 Doe2}
John\index[idenomes]{John3 Doe3}
John\index[idenomes]{John4 Doe4}
John\index[idenomes]{John5 Doe5}
John\index[idenomes]{John90 Doe57}
said \lipsum[11]
\lipsum[6]\cite{aksin}
John\index[idenomes]{John6 Doe1},
John\index[idenomes]{John6 Doe2}\cite{bertram}
John\index[idenomes]{John6 Doe3}
John\index[idenomes]{John6 Doe4}
John\index[idenomes]{John6 Doe5}\cite{doody}
John\index[idenomes]{John7 Doe1}
John\index[idenomes]{John7 Doe2}
John\index[idenomes]{John8 Doe3}
John\index[idenomes]{John8 Doe4}
John\index[idenomes]{John8 Doe5}
John\index[idenomes]{John90 Doe57}
\lipsum[12]\cite{angenendt}

\chapter{Fill toc and index}
There was a time\ldots
John\index[idenomes]{John61 Doe1},
John\index[idenomes]{John62 Doe2}\cite{bertram}
John\index[idenomes]{John63 Doe3}
John\index[idenomes]{John64 Doe4}
John\index[idenomes]{John65 Doe5}\cite{doody}
John\index[idenomes]{John76 Doe1}
John\index[idenomes]{John77 Doe2}
John\index[idenomes]{John88 Doe3}
John\index[idenomes]{John89 Doe4}
John\index[idenomes]{John90 Doe5}
John\index[idenomes]{John90 Doe57}

\chapter{Fill toc and index: part 2}
There was a time\ldots
John\index[idenomes]{John61 Doe11},
John\index[idenomes]{John62 Doe22}\cite{sarfraz}
John\index[idenomes]{John63 Doe33}
John\index[idenomes]{John64 Doe44}
John\index[idenomes]{John65 Doe55}\cite{shore}
John\index[idenomes]{John76 Doe15}
John\index[idenomes]{John77 Doe26}
John\index[idenomes]{John88 Doe36}
John\index[idenomes]{John89 Doe46}
John\index[idenomes]{John90 Doe57}

\chapter{Fill just toc}
There was a time\ldots 
\chapter{Fill toc: part 2}
There was a time\ldots
\chapter{Fill toc: part 3}
There was a time\ldots
\chapter{Fill toc: part 4}
There was a time\ldots
\chapter{Fill toc: part 5}
There was a time\ldots
\chapter{Fill toc: part 6}
There was a time\ldots
\chapter{Fill toc: part 7}
There was a time\ldots
\chapter{Fill toc: part 8}
There was a time\ldots

%Bibliography
\newpage
\backmatter
\bibliography{biblatex-examples.bib}
\bibliographystyle{unsrt}

%I used a kind of glossary, but like a chapter
%Chapter used as glossary
\chapter*{Glossário}
% I forgot where the following lines of code came from!
% Without them, it does not work.
\begingroup
\parindent 0pt
\parskip 2ex

\def\enotesize{\normalsize}
\theendnotes
\endgroup

% Here comes a name index
\printindex[idenomes]
\end{document}
  • You might get away with \let\MakeUppercase\textsc (this would disable ALL CAPS SHOUTING everywhere and would replace it with Sᴍᴀʟʟ ᴄᴀᴘs). Otherwise you could redefine the internal macros that produce these headings. – moewe Jun 13 '18 at 14:47
  • Replace \sc with \scshape, the two-letter font commands have been obsolete for more than 20 years now. See texfaq.org/FAQ-2letterfontcmd – moewe Jun 13 '18 at 14:58
2

You can fix the bad headers by removing the dreaded \MakeUppercase from the appropriate places.

I also made some other fixes.

  1. Don't use \null (look for \vspace* in the code below)
  2. Your \protect commands did nothing good at all (perhaps something bad)
  3. Loading cfr-lm and ebgaramond is useless, as the latter overrides the former, being called later
  4. The missing header on page 38 is due to mysterious interaction with endnotes; I suggest to use enotez that's much more flexible.

Here's the code.

\documentclass[foolscap,10pt,openright]{octavo}
%Preamble
\makeatletter
%\def\input@path{{./}{./octavo}}
\makeatother

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage{bibref,autind}

%Bibliografia
\usepackage[fixlanguage]{babelbib}
\selectbiblanguage{brazil} 
\setbtxfallbacklanguage{portuguese}
\usepackage[version=4]{mhchem} %For chemical equations
\usepackage{lettrine}

% Optical margins, kerning etc.
\usepackage[
  activate={true,nocompatibility},
  final,
  tracking=true,
  kerning=true,
  spacing=true,
  babel=true,
]{microtype} 
%\usepackage{xspace}
\usepackage{emptypage}
%\usepackage{cfr-lm} % you have ebgaramond later
\usepackage{enotez}

\usepackage[
  autostyle=false,
  csdisplay=true,
  threshold=1,
  thresholdtype=words,
  csdisplay=true,
]{csquotes}

% Decrease font size when quoting 
\usepackage{relsize,etoolbox}
\usepackage{ebgaramond}%Nice font for text books (no Math needed)

\usepackage{lipsum}

\AtBeginEnvironment{quote}{\smaller}
\AtBeginEnvironment{quotation}{\smaller}

%Insert () for endnotes
\renewcommand\enmark{\textsuperscript{(\theenmark)}}
\DeclareInstance{enotez-list}{custom}{paragraph}
 {
  heading = \chapter{Glossário},
  notes-sep = 0pt,
  format = \normalfont,
  number = \textsuperscript{(#1)}
 }

\newcommand{\nomedepgm}[1]{\textsf{\smaller #1}}% Used with program names

% Nice for pages like \putoncenter{The end}
\newcommand{\putoncenter}[1]{%
  \cleardoublepage
  \thispagestyle{empty}
  \vspace*{\fill}
  \begin{center}
  \scshape #1
  \end{center}
  \vspace*{\fill}
}

% New index
\newindex{idenomes}{ndx}{nnx}{\'{I}ndice de nomes}
%\index[idenomes]{John7 Doe1}

% fix the headers
\patchcmd{\tableofcontents}{\MakeUppercase}{}{}{}
\patchcmd{\tableofcontents}{\MakeUppercase}{}{}{}
\patchcmd{\theindex}{\MakeUppercase}{}{}{}
\patchcmd{\theindex}{\MakeUppercase}{}{}{}
\patchcmd{\thebibliography}{\MakeUppercase}{}{}{}
\patchcmd{\thebibliography}{\MakeUppercase}{}{}{}


\begin{document}

\tableofcontents

\chapter{Prefácio}

\lipsum[1]
John\cite{baez/article} read\index[idenomes]{John Doe1}.
\lipsum[2]

\chapter{Here begins a story}

\lipsum[1-2]
He\index[idenomes]{Somebody Smith} said\footnote{This book contains footnotes.} 
something useful\cite{gillies}.
\lipsum[3-4]
A word\endnote{\emph{Word} is a set of letters with a meaning.}
\lipsum[5]
She\index[idenomes]{Mary Doe} said\footnote{This book contains footnotes.} 
something useful\cite{glashow}.
\lipsum[6]

\chapter{The story goes on}
\lipsum[7]\cite{stdmodel}
John\index[idenomes]{John Doe1}\endnote{\emph{Latin} is an old language.},
John\index[idenomes]{John Doe2}\endnote{\emph{Water}, \ce{H2O}, is a liquid.},
John\index[idenomes]{John Doe3}\endnote{\emph{\sc PC} stands for \emph{personal computer}.},
John\index[idenomes]{John Doe4}\endnote{\emph{John Doe} is a random name.},
John\index[idenomes]{John Doe5}\endnote{\emph{Minimal} should be less than two pages.},
John\index[idenomes]{John1 Doe1}\endnote{\emph{Lipsum} makes this: \lipsum[13]},
John\index[idenomes]{John2 Doe2}\endnote{\emph{Lipsum} makes also this: \lipsum[14]},
John\index[idenomes]{John3 Doe3},
John\index[idenomes]{John4 Doe4} and
John\index[idenomes]{John5 Doe5}\cite{murray}\nocite{reese}
said \lipsum[8]
\lipsum[6]\cite{aksin}
John\index[idenomes]{John6 Doe1},
John\index[idenomes]{John6 Doe2}\cite{bertram}
John\index[idenomes]{John6 Doe3}
John\index[idenomes]{John6 Doe4}
John\index[idenomes]{John6 Doe5}\cite{doody}
John\index[idenomes]{John7 Doe1}
John\index[idenomes]{John7 Doe2}
John\index[idenomes]{John8 Doe3}
John\index[idenomes]{John8 Doe4}
John\index[idenomes]{John90 Doe57}
John\index[idenomes]{John8 Doe5}
\lipsum[9]\cite{angenendt}

\chapter{And keep going}
\lipsum[10]\cite{stdmodel}
John\index[idenomes]{John Doe1}
John\index[idenomes]{John Doe2}
John\index[idenomes]{John Doe3}
John\index[idenomes]{John Doe4}
John\index[idenomes]{John Doe5}
John\index[idenomes]{John1 Doe1}
John\index[idenomes]{John2 Doe2}
John\index[idenomes]{John3 Doe3}
John\index[idenomes]{John4 Doe4}
John\index[idenomes]{John5 Doe5}
John\index[idenomes]{John90 Doe57}
said \lipsum[11]
\lipsum[6]\cite{aksin}
John\index[idenomes]{John6 Doe1},
John\index[idenomes]{John6 Doe2}\cite{bertram}
John\index[idenomes]{John6 Doe3}
John\index[idenomes]{John6 Doe4}
John\index[idenomes]{John6 Doe5}\cite{doody}
John\index[idenomes]{John7 Doe1}
John\index[idenomes]{John7 Doe2}
John\index[idenomes]{John8 Doe3}
John\index[idenomes]{John8 Doe4}
John\index[idenomes]{John8 Doe5}
John\index[idenomes]{John90 Doe57}
\lipsum[12]\cite{angenendt}

\chapter{Fill toc and index}
There was a time\ldots
John\index[idenomes]{John61 Doe1},
John\index[idenomes]{John62 Doe2}\cite{bertram}
John\index[idenomes]{John63 Doe3}
John\index[idenomes]{John64 Doe4}
John\index[idenomes]{John65 Doe5}\cite{doody}
John\index[idenomes]{John76 Doe1}
John\index[idenomes]{John77 Doe2}
John\index[idenomes]{John88 Doe3}
John\index[idenomes]{John89 Doe4}
John\index[idenomes]{John90 Doe5}
John\index[idenomes]{John90 Doe57}

\chapter{Fill toc and index: part 2}
There was a time\ldots
John\index[idenomes]{John61 Doe11},
John\index[idenomes]{John62 Doe22}\cite{sarfraz}
John\index[idenomes]{John63 Doe33}
John\index[idenomes]{John64 Doe44}
John\index[idenomes]{John65 Doe55}\cite{shore}
John\index[idenomes]{John76 Doe15}
John\index[idenomes]{John77 Doe26}
John\index[idenomes]{John88 Doe36}
John\index[idenomes]{John89 Doe46}
John\index[idenomes]{John90 Doe57}

\chapter{Fill just toc}
There was a time\ldots 
\chapter{Fill toc: part 2}
There was a time\ldots
\chapter{Fill toc: part 3}
There was a time\ldots
\chapter{Fill toc: part 4}
There was a time\ldots
\chapter{Fill toc: part 5}
There was a time\ldots
\chapter{Fill toc: part 6}
There was a time\ldots
\chapter{Fill toc: part 7}
There was a time\ldots
\chapter{Fill toc: part 8}
There was a time\ldots

\cleardoublepage
\backmatter

%Bibliography
\bibliographystyle{unsrt}
\bibliography{biblatex-examples.bib}

%I used a kind of glossary, but like a chapter
\printendnotes[custom]

% Here comes a name index
\printindex[idenomes]

\end{document}
  • I am studying the enotez manual to discover how to put superscripted number enclosed in parenthesis. It is in glossary, but it is not in text. Also, strangely some odds appeared, which is theme for a separate question: a duplicated entry appeared in glossary. – otaviolb Jun 16 '18 at 0:10

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.