2

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?

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

1 Answers1

4

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}
esdd
  • 85,675