
회전된 셀 텍스트를 정렬하는 데 도움이 필요합니다. 문제는 표에 나오는 텍스트를 미리 알지 못해서 \settowidth\rotheadsize{text}
.
이것이 내가 지금까지 가지고 있는 것입니다.
\documentclass{article}
\usepackage{graphicx}
\usepackage{makecell, rotating}
\renewcommand\theadalign{lb}
\begin{document}
\small
\noindent\begin{tabular}{@{}|p{2.5cm}|l|p{2cm}|l|l|p{16mm}|p{13mm}|@{}}
\hline
A & \rothead{text} & a long text that spans over multiple lines & b & c & d & \rothead{efg} \\
\hline
\multicolumn{7}{|c|}{sometext} \tabularnewline
\hline
\end{tabular}
\end{document}
"긴 텍스트 ... 여러 줄"의 마지막 기준선과 잘 맞도록 테이블 셀 하단에 'text'와 'efg'라는 단어를 넣고 싶습니다.
이것이 중요한지 확실하지 않습니다. 저는 tabularx
테이블에 사용합니다.
답변1
A
하단의 모든 항목(예: )을 원하는 경우 긴 열에 대해 [b] 열 유형을 사용하면 작동합니다. 상단에 머물러야 한다면 아마도 다음과 같이 큰 기둥을 측정해야 할 것입니다.
\documentclass{article}
\usepackage{graphicx}
\usepackage{makecell, rotating}
\renewcommand\theadalign{lb}
\usepackage{zref-savepos}
\begin{document}
\small
\newlength\startstopdistance
\startstopdistance=\dimexpr \zposy{stop}sp-\zposy{start}sp+\baselineskip+\arrayrulewidth\relax
\noindent\begin{tabular}{@{}|p{2.5cm}|l|p{2cm}|l|l|p{16mm}|p{13mm}|@{}}
\hline\noalign{\zsavepos{start}}
A & \raisebox{\startstopdistance}[0pt][0pt]{\rotatebox{90}{text}}& a long text that spans over multiple lines & b & c & d &
\raisebox{\startstopdistance}[0pt][0pt]{\rotatebox{90}{efg}} \\
\hline\noalign{\zsavepos{stop}}
\multicolumn{7}{|c|}{sometext} \tabularnewline
\hline
\end{tabular}
\end{document}