안녕하세요.
현재 작성중인 문서에서 kotex 패키지를 사용하면 listoftables를 만들 때 제대로 만들어지지 않는 문제가 있어서 질문 드립니다.
구체적으로는 '표2'의 캡션에서 '표1'을 참조할 때 listoftables가 이상하게 만들어 지는게 문제인데요, 예를 들어서 '표2'의 캡션에서 "Same as Table 1"이라고 적으면 아래와 같이 출력됩니다.
(1) kotex 패키지만 사용한 경우, "Same as Table 11"로 출력 (1이 두 번 반복)
(2) amsmath 패키지도 사용한 경우, 위의 두 1 사이에 에러 메시지가 출력
(2)에서 에러 메시지가 나오는 걸 보고 컴파일시 생성되는 .aux파일을 보니 아래와 같은 문구를 확인했습니다만 어떻게 고쳐야 할지 몰라서 질문 드립니다.
\@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces Same as Table\nobreakspace {}1\hbox {}\bgroup \let \unihangulchar \GenericError { }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ... (이하 생략)
\usepackage{kotex}가 아니라 \usepackage[cjk]{kotex}를 사용하면 해결 되기는 하는데, 그러면 한글 부분의 줄바꿈이 좀 마음에 들지 않아서 다른 방식으로 해결할 수 있는지 궁금합니다.
실제 작업은 리눅스에서 pdflatex로 진행하고 있지만, overleaf에서 재현했던 문제가 발생하는 예시 코드 및 그림을 아래에 첨부해 드립니다.
\documentclass{article} \usepackage{kotex} \usepackage{amsmath} \title{Example} \begin{document} \maketitle \listoftables \newpage \begin{table}[h!] \centering \begin{tabular}{c c} \hline Col1 & Col2 \\ \hline 123 & 456 \\ \hline \end{tabular} \caption{Example table 1} \label{table:1} \end{table} \begin{table}[h!] \centering \begin{tabular}{c c} \hline Col1 & Col2 \\ \hline 123 & 456 \\ \hline \end{tabular} \caption{Same as Table~\ref{table:1}} \label{table:2} \end{table} \end{document}
(1) kotex
(2)kotex, amsmath
KTUG 한국 텍 사용자 그룹