
makecell tabu
및 tcolorbox
및 todonotes
. 이것은 나의 최소한의 예제 코드입니다:
\documentclass[a4paper]{scrreprt}
\usepackage{tcolorbox}
\usepackage{todonotes}
\usepackage{tabu,makecell}
\begin{document}
\noindent \begin{tabu} to \textwidth {@{}lXX}
normal line & A & B \\
line with makecell & \makecell[tl]{A\\C} & \makecell[tl]{B\\D\\E}
\end{tabu}
\todo{To Do: ...}
\end{document}
으로 줄을 제외하면 \makecell
모든 것이 작동합니다. 또한 패키지 todo
및 tcolorbox
(물론 \todo
명령이 포함된 줄은 제외하고 줄은 유지 \makecell
) 제외하면 모든 것이 작동합니다.
패키지 tcolorbox
또는 todonotes
. 그런 다음 다음 오류가 발생했습니다.
./test-tabu.tex:9: Improper \prevdepth.
\tabu@verticalspacing ...tempdimc \the \prevdepth
\@tempdima \dimexpr \ht
\t...
l.9 \end{tabu}
또한 솔루션tabu: 업데이트 이후 오류 발생도움이되지 않았습니다.
이 문제를 해결하는 방법을 아는 사람이 있나요?
다음은 로그 파일의 첫 번째 줄입니다.
이것은 pdfTeX, 버전 3.14159265-2.6-1.40.19(TeX Live 2018)입니다(사전 로드된 형식=pdflatex).
답변1
새로운 LaTeX3 패키지tabularray
오래된 패키지의 대안입니다 tabu
.
\documentclass[a4paper]{scrreprt}
\usepackage{tcolorbox}
\usepackage{todonotes}
\usepackage{tabularray}
\begin{document}
\noindent
\begin{tblr}{
width = \textwidth,
colspec = {@{}lXX},
}
normal line & A & B \\
line with makecell & \SetCell{t,l}{A\\C} & \SetCell{t,l}{B\\D\\E} \\
\end{tblr}
\todo{To Do: ...}
\end{document}
답변2
다음은 ( 및 와 호환 가능) {NiceTabular}
로 수행할 수 있는 작업입니다 .nicematrix
tcolorbox
todonotes
\documentclass[a4paper]{scrreprt}
\usepackage{tcolorbox}
\usepackage{todonotes}
\usepackage{nicematrix}
\begin{document}
\noindent
\begin{NiceTabular}{@{}lXX}
normal line & A & B \\
line with makecell & \Block[t,l]{}{A\\C} & \Block[t,l]{}{B\\D\\E} \\
\end{NiceTabular}
\bigskip
\todo{To Do: ...}
\end{document}
여러 컴파일이 필요합니다( nicematrix
내부적으로 PGF/Tikz 노드를 사용하기 때문에).