我有一个包含数字的单词“MyVeryBigWord1”,我永远不想在文档中用连字符连接。以下文件复制了该问题:
\documentclass{article}
%\hyphenation{MyVeryBigWord1} % ERROR: Not a letter.
\usepackage[a4paper, total={1mm, 8in}]{geometry} % make tiny paper area
\begin{document}
some-otherword
MyVeryBigWord1 MyVeryBigWord1 MyVeryBigWord1
\end{document}
如果我在\hyphenation
此小文档中注释,则生成(出现错误)并看起来正常,但我实际编写的文档却因出现错误而无法正确生成。我该如何避免出现错误并使我的单词永远不会被连字符?
答案1
如果你确实需要,你可以将 1 改为字母以便连字
\documentclass{article}
\lccode`1=`1
\hyphenation{MyVeryBigWord1} % ERROR: Not a letter. (it is now)
\usepackage[a4paper, total={1mm, 8in}]{geometry} % make tiny paper area
\begin{document}
some-otherword
MyVeryBigWord1 MyVeryBigWord1 MyVeryBigWord1
\end{document}