
이것은 내 테이블입니다.
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{@{}|p{3.5cm}|X|X|}
some text & \multicolumn{2}{|c|}{some text} \\
\end{tabularx}
\end{document}
이는 다음과 같이 렌더링됩니다.
파이프 기호 중 하나를 제거하지 않고 중간에 있는 더 두꺼운 규칙을 제거할 수 있는 방법이 있습니까? 테이블 서문이나 다중 열 명령에 있습니까?
답변1
tblr
나는 다음과 같은 환경 에서 대체 솔루션을 제공할 것입니다 .tabularray
패키지. 첫째, 두 개의 열에 걸쳐 있는 올바른 다중 열 셀을 만듭니다 X
. 둘째, 명령을 사용하면 \SetCell
셀 경계에 대해 걱정할 필요가 없습니다.
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\noindent
\begin{tblr}{@{}|t{3.5cm}|X|X|}
some text & \SetCell[c=2]{c} some text & \\
\end{tblr}
\end{document}
답변2
{NiceTabular}
다음은 of를 사용한 대안입니다 nicematrix
. 해당 환경에서 명령은 \Block
셀을 수직 및 수평으로 병합하며 규칙(예를 들어 |
서문에 지정된)은 다음과 같습니다.~ 아니다블록에 그려져 있습니다.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\noindent
\begin{NiceTabular}{|p{3.5cm}|X|X|}
some text & \Block{1-2}{some text} & \\
\end{NiceTabular}
\end{document}
여러 컴파일이 필요합니다( nicematrix
내부적으로 PGF/Tikz 노드를 사용하기 때문에).