KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당 › \soul package와 \ulem package에 관한 질문입니다.

구름 | 2022.08.07 06:54:47 | 메뉴 건너뛰기 쓰기

안녕하십니까?

그간 ulem package로 밑줄 (\uline), 삭제 (\sout) 등을 사용했습니다. 그러다가 soul package를 사용하면 줄바꿈 (line breaks)을 쉽게 처리할 수 있다는 점을 알게 되었습니다 (https://tex.stackexchange.com/questions/74893/strikeout-when-which-package-ulem-vs-soul-vs)

이 자료를 제 경우에 활용해 보려고 다음과 같은 파일을 만들었습니다.

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage{xeCJK} 
\usepackage{soul,ulem}
\begin{document} 

\uline{rvā}
\ul{rvā}

\uline{四無量} 
\ul{四無量} 

\end{document}

이를 실행할 때 \uline은 문제 없이 잘 작동합니다. 하지만 \ul{rvā}는 "rv"까지만 출력되고 \ul{四無量}에서는 아예 에러가 나옵니다.

soul package의 에러 코드를 찾아 보니 아마도 다음 항목에 해당할 것 같습니다. 그런데 기초가 부족하다보니 어떻게 하라는 것인지 읽어도 이해를 하지 못하고 있습니다.

§ 23 Leaking font switches:
Example: \def\foo{\bf bar} \so{\foo baz}
A hidden font switching command that leaks into its neighborship causes a ‘Reconstruction failed’ error. To avoid this either register the ‘container’ (\soulregister{\foo}{0}), or limit its scope as in
\def\foo{{\bf bar}}. Note that both solutions yield slightly different results.

2.3.1 ‘Reconstruction failed’
This message appears, if § 20 or § 23 was violated. It is caused by the fact that the reconstruction pass couldn’t collect tokens with an overall width of the syllable that was measured by the analyzer. This does either occur when you grouped hyphenatable text or used an unregistered command that influences the syllable width. Font switching commands belong to the latter group. See the above cited sections for how to fix these problems.

그래서 이런 경우 다국어 환경에서 \ul{}을 활용하려면 어떻게 해야 하는지 여쭈고 싶습니다. 참고로 제 작업 환경은 다음과 같습니다.

MacOS Monterey Version 12.5
TeXShop Version 4.79

여기까지 읽어 주셔서 감사합니다.

댓글 [2]

댓글 쓰기

목록

KTUG 한국 텍 사용자 그룹