
섹션 이름에 하이픈 넣기를 억제하기 위해 명령 \hyphenpenalty=10000
에서 사용합니다 .\titleformat
그림과 표(및 긴 표) 캡션에서 하이픈을 억제하는 유사한 방법이 있습니까?
답변1
댓글에 입력한 코드는 제가 생각하기에 원하는 효과를 만들어냅니다.
이 이미지는 a의 기본 하이픈 레이아웃을 보여주고 table
캡션 을 하이픈 없이 정렬해야 한다고 선언한 후 다시 동일한 레이아웃을 보여줍니다. (이로 인해 TeX는 과 숫자 longtable
사이의 공간을 과도하게 늘릴 수밖에 없습니다 .)Table
\documentclass{article}
\usepackage{caption,longtable,ltcaption}
\setlength\textwidth{.4\textwidth}
\DeclareCaptionJustification{nohyphen}{\hyphenpenalty=10000}
\captionsetup{justification=nohyphen}
\begin{document}
\begin{table}
\centering
XXX
\caption{verylongwordverylongword verylongwordverylongword }
\end{table}
\begin{longtable}{ll}
aa&bb\\
\caption{verylongwordverylongword verylongwordverylongword }
\end{longtable}
\end{document}