在回答这个问题,人们建议使用“babel
速记”命令"|
来打破单词中的连字shelfful
。我这样做错了吗?还是这个命令在 中不再可用babel
?(我在文档中找不到对此的提及。)
\documentclass{article}
\usepackage[american]{babel}
\begin{document}
shelf"|ful {shelf}ful shelf{}ful shelf\/ful
\end{document}
答案1
您必须添加德语速记,它知道几个"
速记:
\documentclass{article}
\usepackage[ngerman,american]{babel}% american still active at \begin{document}
\useshorthands{"}
\addto\extrasamerican{\languageshorthands{ngerman}}
\begin{document}
shelfful shelf"|ful {shelf}ful shelf{}ful shelf\/ful
\end{document}
文件中的德语速记ngermanb.ldf
:
\declare@shorthand{ngerman}{"`}{\glqq}
\declare@shorthand{ngerman}{"'}{\grqq}
\declare@shorthand{ngerman}{"<}{\flqq}
\declare@shorthand{ngerman}{">}{\frqq}
\declare@shorthand{ngerman}{"-}{\nobreak\-\bbl@allowhyphens}
\declare@shorthand{ngerman}{"|}{%
\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
\allowhyphens}{}}
\declare@shorthand{ngerman}{""}{\hskip\z@skip}
\declare@shorthand{ngerman}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{ngerman}{"=}{\penalty\@M-\hskip\z@skip}