약어를 사용한 하이픈 넣기

약어를 사용한 하이픈 넣기

긴 형식과 짧은 형식 사이의 줄 바꿈을 방지하려고 할 때 사용자 정의 하이픈 규칙을 사용하여 긴 약어에서 하이픈을 올바르게 연결하는 데 어려움이 있습니다.

\documentclass{article}

\usepackage{showframe}

\hyphenation{mi-cros-co-py}

\begin{document}
\paragraph{Long Text} This is some text abcdefgh Acronym Containing Microscopy~(ACM).
\paragraph{Longer Text} This is some text abcdefgh Acronym Containing Microscopy~(ACM).
\paragraph{Even Longer Text} This is some text abcdefgh Acronym Containing Microscopy~(ACM).

\paragraph{Another try} Let's try manual hyphenation.

\paragraph{Long Text} This is some text abcdefgh Acronym Containing Mi\-cros\-co\-py~(ACM).
\paragraph{Longer Text} This is some text abcdefgh Acronym Containing Mi\-cros\-co\-py~(ACM).
\paragraph{Even Longer Text} This is some text abcdefgh Acronym Containing Mi\-cros\-co\-py~(ACM).

\paragraph{Another try} Let's also skip the non-breaking space.

\paragraph{Long Text} This is some text abcdefgh Acronym Containing Mi\-cros\-co\-py (ACM).
\paragraph{Longer Text} This is some text abcdefgh Acronym Containing Mi\-cros\-co\-py (ACM).
\paragraph{Even Longer Text} This is some text abcdefgh Acronym Containing Mi\-cros\-co\-py (ACM).

\end{document}

MWP

MWP에서 볼 수 있듯이, 어떤 경우에는 줄바꿈 없는 공백과 수동 하이픈 넣기 없이도 조판이 너무 꽉 찬 hbox로 끝나는 경우가 있습니다. \hyphenpenalty=0서문의 설정 도 도움이 되지 않습니다. 동일한 결과입니다.

내가 여기서 무엇을 놓치고 있는 걸까요?

엄밀히 말하면, 저는 glossaries짧은 형식 앞에 잘림 방지 공백을 포함하여 조정된 약어 형식을 사용하여 실제 문서에서 패키지를 사용하고 있습니다. \renewcommand{\acrfullformat}[2]{#1~(#2)}결과가 동일하므로 MWP에 대한 일반 텍스트로 이러한 부분을 대체했습니다. glossaries이 문제를 해결하기 위한 솔루션에 대해 아는 사람이 있는 경우를 대비해 .

답변1

중단을 원하지 않는다고 가정하고 (ACM)하이픈 넣기 지점을 더 추가하거나 하이픈 넣기에 대한 페널티를 줄이는 것은 도움이 되지 않습니다. 선이 끊어진 후 선이 채워질 수 있도록 공백이 늘어나도록 허용해야 합니다.

\begin{document}\setlength\emergencystretch{1.5em}

라인을 너무 많이 채우지 않습니다(생성된 라인이 약간 불규칙하긴 하지만).

여기에 이미지 설명을 입력하세요

관련 정보