在目录中禁用连字符

在目录中禁用连字符

我正在使用classicthesisarsclassica写一些书。为了防止章节标题出现连字符,我添加了

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

我从这里.考虑这个 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}

它适用于章节标题,但目录中仍然会出现连字符。如何在目录中禁用连字符?

答案1

如果要禁用 ToC、LoF 和 LoT 中所有条目的连字符:

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

在此处输入图片描述

代码:

\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}

相关内容