1

I am using classicthesis and arsclassica to write some book. In order to prevent hyphenation in section title, I added

\titleformat{\section}
    {\raggedright}{\textsc{\MakeTextLowercase{\thesection}}}{1em}{\spacedlowsmallcaps}

which I got from here. Consider this MWE.

\documentclass[b5paper,12pt,twoside]{book}
\usepackage[pdfspacing]{classicthesis}
\usepackage{arsclassica}
\usepackage[inner=2.2cm,outer=1.8cm,bottom=2.7cm,top=2.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} 
\usepackage{lipsum}
\usepackage[english]{babel}

\titleformat{\section}
{\raggedright}{\textsc{\MakeTextLowercase{\thesection}}}{1em}{\spacedlowsmallcaps}

\begin{document}
\frontmatter
\tableofcontents
\cleardoublepage
\mainmatter
\chapter{Test Chapter}
\section{The Separation Axioms and Continuous Real-Valued Functions}
\lipsum
\end{document}

It worked for the section title, but I still get hyphenation in ToC. How to disable hyphenation in ToC as well?

  • 1
    If you want to disable hyphenation for all entries in ToC, LoF and LoT: \makeatletter\renewcommand{\@tocrmarg}{2.55em plus1fil}\makeatother – esdd May 5 '18 at 18:34
3

If you want to disable hyphenation for all entries in ToC, LoF and LoT:

\makeatletter
\renewcommand{\@tocrmarg}{2.55em plus1fil}
\makeatother

enter image description here

Code:

\documentclass[b5paper,12pt,twoside]{book}
\usepackage[pdfspacing]{classicthesis}
\usepackage{arsclassica}
\usepackage[inner=2.2cm,outer=1.8cm,bottom=2.7cm,top=2.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} 
\usepackage{lipsum}
\usepackage[english]{babel}

\titleformat{\section}
{\raggedright}{\textsc{\MakeTextLowercase{\thesection}}}{1em}{\spacedlowsmallcaps}

\makeatletter
\renewcommand{\@tocrmarg}{2.55em plus1fil}
\makeatother

\begin{document}
\frontmatter
\tableofcontents
\cleardoublepage
\mainmatter
\chapter{Test Chapter}
\section{The Separation Axioms and Continuous Real-Valued Functions}
\lipsum
\end{document}

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.