我正在使用该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}