classicthesis 涂鸦中的连字符

classicthesis 涂鸦中的连字符

我正在使用该classicthesis软件包及其graffito提供的旁注。但是,我希望这些旁注能够正确连字符,尽管我认为作者无意这样做。我尝试调整graffito连字符的定义,但无济于事。应该怎么做?

\documentclass[11pt,a4paper,twoside]{report}
\usepackage{classicthesis}

% graffito definition, modified to change hyphenation penalties
\makeatletter
\def\graffito@setup{%
   \slshape\footnotesize% 
   \parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
   \tolerance=2000
   \hyphenpenalty=0 % was 300
   \exhyphenpenalty=0 % was 300
   \doublehyphendemerits=100000% 
   \finalhyphendemerits=\doublehyphendemerits
   }
\makeatother


\begin{document}
\graffito{Text with extremely excessively unnecessarily long words which unfortunately,
undesiredly and awkwardly are not being hyphenated.}
\end{document}

答案1

定义\graffito包括(在\graffito@setup\raggedleft/之后\raggedright;必须将其替换为\RaggedLeft/ \RaggedRight(来自ragged2e包)以允许连字符。为了方便起见,我使用etoolbox包来执行此操作。

\documentclass[11pt,a4paper,twoside]{report}

\usepackage{classicthesis}

\usepackage {ragged2e}

\usepackage{etoolbox}

\patchcmd{\graffito}{\raggedright}{\RaggedRight}{}{}
\patchcmd{\graffito}{\raggedleft}{\RaggedLeft}{}{}

\begin{document}
\graffito{Text with extremely excessively unnecessarily long words which unfortunately,
undesiredly and awkwardly are not being hyphenated.}
\end{document}

在此处输入图片描述

相关内容