考虑这个例子:
\documentclass{report}
%\hyphenation{ENCODE}
\begin{document}
All data used for this study are analysed with a different release of ENCODE \textendash\ the collection of software that is used in simulation and reconstruction.
\end{document}
在输出中,新行以破折号开头,这看起来很尴尬:
用于~
控制换行:
release of ENCODE~\textendash\ the collection
还会导致一些尴尬 - “ENCODE”的连字符:
最后,我可以通过取消注释该行来防止“ENCODE”的连字符,\hyphenation{ENCODE}
以获得令人满意的输出:
所有这些仪式都能自动化吗?
答案1
您可以使用框来抑制连字符,并使用惩罚来抑制换行:
\documentclass{report}
\newcommand\zz{\mbox{}~\textendash\ }
\begin{document}
All data used for this study are analysed with a different release of ENCODE\zz
the collection of software that is used in simulation and reconstruction.
\end{document}
在这种情况下,该线超出了 2pt。