我有一个段落以
\documentclass[a4paper,11pt,twoside]{book}
\setlength{\textwidth}{14.6cm}
\hyphenation{MnTPPCl CoTPP}
\begin{document}
We studied surface doping with the following molecules:
2,3,5,6-tetrafluoro-7,7,8,8-tetra\-cyano\-quino\-dimethane
(F$_4$TCNQ), manganese(III)-tetra\-phenyl\-porphyrin-chloride
(MnTPPCl), cobalt(II)-tetra\-phenyl\-porphyrin (CoTPP), and
fullerene (C$_{60}$).
\end{document}
最终在“(MnTPPCl)”处产生一条过长的线
即使提供了连字符的可能性,它还是会给我一个过长的行,并且“(MnTPPCl)”会突出。为什么不在“(MnTPPCl)”之前换行?我该如何避免这种情况?
答案1
如果没有完整的示例,就不可能进行测试,但据推测,断线(MnTPPCl)
需要将空白拉伸到超过指定值。
您可以使用它\sloppy
来告诉 LaTeX 允许空白延伸到超出其通常的限制。
或者像 egreg 建议的那样\emergencystretch
,对排版质量进行不太剧烈的改变:
\documentclass[a4paper,11pt,twoside]{book}
\setlength{\textwidth}{14.6cm}
\hyphenation{MnTPPCl CoTPP}
\begin{document}
\setlength\emergencystretch{2em}
We studied surface doping with the following molecules:
2,3,5,6-tetrafluoro-7,7,8,8-tetra\-cyano\-quino\-dimethane
(F$_4$TCNQ), manganese(III)-tetra\-phenyl\-porphyrin-chloride
(MnTPPCl), cobalt(II)-tetra\-phenyl\-porphyrin (CoTPP), and
fullerene (C$_{60}$).
\end{document}