0

I've had to concoct a pseudo-smallcapping command to cope with characters outside the norm (e.g. h-breve) and thus far have had no problems with it, in body text or in headings.

However, just today I've found that its use in memoir headings is very hit and miss. In the following code sequence, for example,

\chapter{Text Editions} % follows \appendix
<snip>
\subsubsection{The interpretation of \lgm{an} as \smn{dingir}}\label{B.3.4.1}
\subsubsection{The interpretation of similar Sumerian elements}\label{B.3.4.4}
\subsection{The name element \lgm{an-na}}\label{B.3.5}

...

the \lgm{} command which uses it (for expansion see MWE below) works fine the first time, but gives an error the second time (depending on other changes, the hyperref error appears or not):

enter image description here Changing various parts of the file such as removing an alteration of \settocdepth{} or other commands which potentially affect header numbering can cause the error to vanish.

Here's a MWE which illustrates the problem, with two of the types of changes which hide it.

% !TEX TS-program = xelatexmk
\documentclass{memoir}

% Removing the next line avoids the error
\settocdepth{subsection}

\usepackage{libertine}

\usepackage{polyglossia}
    \setdefaultlanguage[variant=british]{english}
    \setotherlanguage[]{french}
    \setotherlanguage[spelling=old]{german}
\usepackage[%
    xetex,bookmarks,
    colorlinks=true,linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=blue,breaklinks=true,
    pdftitle={Karljürgen G. Feuerherm---Abum--waqar and His Circle},
    pdfauthor={Karljürgen G. Feuerherm},
    unicode
    ]{hyperref}

\newcommand{\fakesc}[1]{{\addfontfeatures{FakeStretch=1.1092,FakeBold=1.0,Scale=0.71}\MakeUppercase{#1}}}
\newcommand{\lgm}[1]{{\sffamily\fakesc{#1}}}
\newcommand{\smn}[1]{{\sffamily{\addfontfeature{LetterSpace=10.0}#1}}}

\begin{document}
\tableofcontents

\chapter{Text Editions}
% Removing the next group of lines, or changing their level, avoids the error
\section{Preliminary remarks}\label{B.1}
\section{Principles of transliteration and transcription}\label{B.2}
\subsection{Typographic representation of cuneiform signs}\label{B.2.1}
\subsection{Consonantal ‘i’}\label{B.2.2}
\subsection{\smn{sa₁₀} and \smn{šám}}\label{B.2.3}
\subsection{Superscripted sigla}\label{B.2.4}
\subsection{Damage mark-up}\label{B.2.5}
\section{Principles of translation}\label{B.3}
\subsection{General}\label{B.3.1}
\subsection{Names with exclusively Sumerian elements}\label{B.3.2}
\subsection{Names with exclusively Akkadian elements}\label{B.3.3}
\subsection{Names with both Sumerian and Akkadian elements}\label{B.3.4}
\subsubsection{The interpretation of \lgm{an} as \smn{dingir}}\label{B.3.4.1}
\subsubsection{The interpretation of similar Sumerian elements}\label{B.3.4.4}
\subsection{The name element \lgm{an-na}}\label{B.3.5}

\end{document}

I have a very dim recollection of having perhaps experienced something similar a few years ago but I can't put my finger on it. Many thanks for any help.

  • Related: https://tex.stackexchange.com/questions/396367/lowercase-toc-with-memoir-and-hyperref –  Oct 24 '17 at 16:54
  • @ChristianHupfer Thanks. Having read memoir p. 158, though, it seems this won't likely work for sections, and I rather need to do this as it's the convention in the field. (Ultimately I maybe can ditch hyperref if electronic publication is not possible but of course I'd rather avoid avoiding the problem....) – K.G. Feuerherm Oct 24 '17 at 17:23
  • 1
    Maybe try \renewcommand{\textsc}[1]{\texorpdfstring{xxx}{#1}}, where xxx is your current definition of the command. – Michael Palmer Oct 24 '17 at 18:04
  • @MichaelPalmer Not sure about that, I use \textsc{} elsewhere. – K.G. Feuerherm Oct 24 '17 at 19:58
  • I've come up with a kludgy workaround that gets me by for the moment though I'm waiting for it to bite me down the road: duplicated the font and copied the uppercase glyphs into the lowercase slots, and removed the \MakeUppercase. But some way to patch the code would definitely be preferable. – K.G. Feuerherm Oct 24 '17 at 20:00
  • OK - you could still try the \texorpdfstring fix with \fakesc. It seems all the error messages arise in a pdf-string context. – Michael Palmer Oct 24 '17 at 20:02
  • @MichaelPalmer It does seem to alleviate the warnings, which is something. – K.G. Feuerherm Oct 24 '17 at 22:26

0 Answers0