5

I am using \addcontentsline{toc}{chapter} to, for example, give my different bibliographies separate chapterheadings as well as have a short and a long table of contents.

However, using this command \addcontentsline{toc}{chapter}{Inhalts\"ubersicht}, the \chaptertitle is printed as desired, but the headertitle in the ToC is printed in uppercases, i.e. INHALTSÜBERSICHT, as can be seen here:

enter image description here

This, however, only happens when I use the \addcontentsline{toc}{chapter}{Inhalts\"ubersicht} command, in all other cases it is as it should be, i.e. normal/lowercase except for the initial letter. What is the command to force \addcontentsline to do the same? How can I redefine it?

I am using the SV Mono Class 5.5 by Springer: https://www.overleaf.com/latex/templates/template-for-springer-monographs-slash-textbooks/jkmjvjrkqrpb

As a MWE:

\documentclass[graybox,envcountchap,sectrefs]{svmono}
\usepackage{shorttoc}
\usepackage{emptypage}
\usepackage{biblatex}
\bibliography{lit.bib}
\makeindex  
\begin{document}

\cleardoublepage 
\addcontentsline{toc}{chapter}{Inhalts\"ubersicht} 
\shorttableofcontents{Inhalts\"ubersicht}{0} 
\cleardoublepage 
\addcontentsline{toc}{chapter}{Inhaltsverzeichnis}
\tableofcontents 
\cleardoublepage 
\include{Contents/acronym} 

\mainmatter
\chapter{Einleitung}
\chapter{Einleitung2}
\chapter{Einleitung3}
\chapter{Einleitung4}
\chapter{Einleitung99}
\chapter{Einleitung5}
\chapter{Einleitung6}
\chapter{Einleitung7}
\chapter{Einleitung8}
\chapter{Einleitung9}
\chapter{Einleitung10}
\chapter{Einleitung11}
\chapter{Einleitung12}
\chapter{Einleitung13}
\chapter{Einleitung14}
\chapter{Einleitung15}
\chapter{Einleitung16}
\chapter{Einleitung17}
\chapter{Einleitung18}
\chapter{Einleitung19}

\end{document}

Using the class, applied to my MWE, this is the output: https://www.overleaf.com/read/tdqjnpttdkkf

  • Clearly, it should be Inhaltsübersicht anyway, but by default, the content is not made uppercase. So this is something which your 'modified template' is to blame of – user31729 Jun 6 '16 at 20:48
  • And the question is also: Why do you do use \addcontentsline at all if it is a \chapter? Or are you using \chapter*? – user31729 Jun 6 '16 at 20:51
  • I am using \chapter* . The Umlauts do work as well. Is there any command such as redefine to "force" it lowercase? – kuuhkuuh Jun 6 '16 at 20:54
  • Without seeing a real line of code: Only guess - work, sorry – user31729 Jun 6 '16 at 20:56
  • Added the class im using and a MWE. – kuuhkuuh Jun 6 '16 at 21:19
3
+50

The problem is due to shorttoc that seizes the initiative and applies \uppercase to the title.

\documentclass[graybox,envcountchap,sectrefs]{svmono}
\usepackage{shorttoc}
\usepackage{emptypage}
\usepackage{biblatex}
\bibliography{lit.bib}
\makeindex  

% patch \shorttableofcontents    
\usepackage{etoolbox}
\patchcmd{\shorttableofcontents}
  {\uppercase{#1}}
  {#1}
  {}{}
\patchcmd{\shorttableofcontents}
  {\uppercase{#1}}
  {#1}
  {}{}
\patchcmd{\shorttableofcontents}
  {\uppercase{#1}}
  {#1}
  {}{}
\patchcmd{\shorttableofcontents}
  {\uppercase{#1}}
  {#1}
  {}{}
% end of patch

\begin{document}

\cleardoublepage 
\addcontentsline{toc}{chapter}{Inhalts\"ubersicht} 
\shorttableofcontents{Inhalts\"ubersicht}{0} 
\cleardoublepage 
\addcontentsline{toc}{chapter}{Inhaltsverzeichnis}
\tableofcontents 
\cleardoublepage 
%\include{Contents/acronym} % don't have it

\mainmatter
\chapter{Einleitung}
\chapter{Einleitung2}
\chapter{Einleitung3}
\chapter{Einleitung4}
\chapter{Einleitung99}
\chapter{Einleitung5}
\chapter{Einleitung6}
\chapter{Einleitung7}
\chapter{Einleitung8}
\chapter{Einleitung9}
\chapter{Einleitung10}
\chapter{Einleitung11}
\chapter{Einleitung12}
\chapter{Einleitung13}
\chapter{Einleitung14}
\chapter{Einleitung15}
\chapter{Einleitung16}
\chapter{Einleitung17}
\chapter{Einleitung18}
\chapter{Einleitung19}

\end{document}

Four patches are needed for removing each \uppercase.

A single patch can be done with

% patch \shorttableofcontents
\usepackage{regexpatch}

\makeatletter
\xpatchcmd*{\shorttableofcontents}
  {\uppercase{#1}}
  {#1}
  {}{}
\makeatother
% end of patch

enter image description here

  • thanks! works so far! just for my understanding, why four patches? also, the same happens to me with headers created by \printbibliography[title={Literatur} at the end of my document. how would i apply the patch there? – kuuhkuuh Jun 9 '16 at 22:52
  • 1
    @kuuhkuuh With \patchcmd you only modify one appearance of \uppercase{#1} into #1, but there are four of them. The regexpatch specific command \xpatchcmd* (note the *) does all the replacements in one step. – egreg Jun 9 '16 at 22:54
  • only the four patches-version works, the \xpatchcmd* does not work in my document. – kuuhkuuh Jun 9 '16 at 22:57
  • 1
    @kuuhkuuh You need a fully updated TeX distribution, I guess. – egreg Jun 9 '16 at 22:58
  • 1
    @kuuhkuuh The triple patch leaves an \uppercase hanging around: you'd see it if the short toc is three pages long. For the other problem I think a different question should be opened. – egreg Jun 9 '16 at 23:12
3

This is as a result of shorttoc, which issues \uppercase for the header marks. You can change this by using

enter image description here

\usepackage{shorttoc,regexpatch}

\makeatletter
\xpatchcmd*{\shorttableofcontents}{\uppercase}{}{}{}% Remove all \uppercase
\makeatother

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.