1

I'm using the memoir class for typesetting a book. In the \frontmatter I have a chapter with a section and a subsection.

My problem is that, in the TOC, the page number of the chapter appears in lowercase, and I would like it to be in smallcaps (as they appear in the section and subsection):

enter image description here

Even stranger, when I tried an MWE, the problem didn't appear:

\documentclass[a5paper, 11pt]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-tabla]{babel}
\usepackage[sc]{mathpazo}
\usepackage{biolinum}
\usepackage{eulervm} 
\usepackage[T1]{fontenc}

\chapterstyle{dash} \pagestyle{ruled} \settocdepth{subsection}

\begin{document}

\frontmatter

\tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents*

\chapter{A modo de introducción}
\section{Convenciones}
\subsection{Números de línea}

\mainmatter

\chapter{Cecilia Payne, PhD.} \chapter{Antonia Maury, Aydte.}

\end{document}

enter image description here

Edit:

I think I found the package responsible for the behaviour: microtype:

\documentclass[a5paper, 11pt]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-tabla]{babel}
\usepackage[sc]{mathpazo}
\usepackage{biolinum}
\usepackage{eulervm} 
\usepackage[T1]{fontenc}

\usepackage{microtype} % <--- This is the problem

\begin{document}

\frontmatter

\tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents*

\chapter{A modo de introducción} \section{Convenciones} \subsection{Números de línea}

\mainmatter

\chapter{Cecilia Payne, PhD.} \chapter{Antonia Maury, Aydte.}

\end{document}

enter image description here

I would like the xi appear as XI.

Edit 2:

After the wonderful answer and insight of Iacobus1983, I think that the problem is far out of reach. So I think that I will get the chapter titles and numbers in small caps:

\documentclass[a5paper, 11pt]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-tabla]{babel}
\usepackage[sc]{mathpazo}
\usepackage{biolinum}
\usepackage{eulervm} 
\usepackage[T1]{fontenc}
\usepackage{microtype}

\settocdepth{subsection} \renewcommand*{\cftchapterfont}{\scshape} \renewcommand{\cftchapterpagefont}{\scshape}

\begin{document}

\frontmatter

\tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents* \cleardoublepage \tableofcontents*

\chapter{A modo de introducción}

\section{Convenciones}

\subsection{Números de línea}

\mainmatter

\chapter{Cecilia Payne, PhD.} \section{Una sección} \subsection{Una subsección}

\chapter{Antonia Maury, Aydte.}

\end{document}

enter image description here

It doesn't look bad. ;)

  • Do you mean lower case (not small caps)? I.e. would you like to have xii instead of XII? Not knowing your code, have you tried using roman instead of Roman where appropriate? – Ingmar Feb 10 '22 at 20:26
  • @Ingmar : I would like to have XI instead of xi. By the way, thank you for the edition! I haven't use roman nor Roman... – Luis López Feb 10 '22 at 21:11
  • 3
    This is not memoir related, also happens with book. Note that it is very well known that spanish babel messes with roman and and thus may confuse other packages. – daleif Feb 11 '22 at 11:14
  • @daleif : Thank you for your comment; I will edit the tags then. – Luis López Feb 11 '22 at 11:37
  • 1
    My guess is that microtype needs some sort of "definition" of smallcaps and does not found them for mathpazo font. I mean, if I comment \usepackage[sc]{mathpazo} I see smallcaps even with microtype. EDIT: also removing the sc option does work. So, microtype has a problem with this scoption for true smallcaps. – Iacobus1983 Feb 11 '22 at 11:42
  • @Iacobus1983 : You are right! Thank you! But I like mathpazo and its sc option... would it be possible to solve? – Luis López Feb 11 '22 at 11:49
  • @LuisLopez: Sorry, I had just posted an answer (saying that you can compile with XeLaTeX or LuaLaTeX) but I realised a minute later that the font was not kept... For a fix with pdfLaTeX I'm not competent enough. Possibly there is a otf equivalent of mathpazo, in this case you could use XeLaTeX + fontspec. – Iacobus1983 Feb 11 '22 at 13:52
  • 1
    @LuisLópez : see also https://tex.stackexchange.com/questions/504366/how-to-use-palatino-font-for-text-and-what-about-maths – Iacobus1983 Feb 11 '22 at 14:03
  • 1
    see here: https://github.com/jbezos/babel-spanish/issues/10 – Robert Feb 07 '23 at 15:16
  • Thanks, Robert! :) – Luis López Feb 08 '23 at 01:12

1 Answers1

2

Since the issue happens only in the Table of contents (not in other small caps text within the document), you can (with memoir) just add \scshape in the page number font, so:

\renewcommand{\cftchapterpagefont}{\scshape}

If I add this to your preamble I get this (I've added a section and a subsection to ensure that everything is ok):

enter image description here

  • Thank you very much! It works, but I would like the page numbers of the chapters to be in bold face. I tried both \renewcommand{\cftchapterpagefont}{\scshape\bfseries} and \renewcommand{\cftchapterpagefont}{\bfseries\scshape}, but neither works... – Luis López Feb 11 '22 at 15:54
  • 1
    @LuisLópez : I'm sorry. By the way, I see that \scshape\bfseries (or the equivalent \textsc{\textbf{foo}) does not work also outside the table of contents, and also without microtype. So, I suspect that mathpazo has no support for bold small caps... But I'm no great expert, I hope someone else finds a solution. – Iacobus1983 Feb 11 '22 at 17:52
  • 1
    I add something: without microtype the smallcaps+bf seems to work in the toc but not elsewhere (a bit puzzling), and the compilers issues the warning: "Package spanish Warning: Replacing `T1/pplx/b/sc' by faked small caps on input line 2." – Iacobus1983 Feb 11 '22 at 17:59
  • Please don't mind! Your answer is really useful (I will check it now :)). I see that the problem is really deep... – Luis López Feb 11 '22 at 19:28