
\documentclass[12pt]{article}
\usepackage{tabularx}
\begin{document}
\section{section 1}
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | }
\hline
label 1 & label 2 & label 3 & label 4 \\
\hline
item 1 & item 2 & item 3 & item 4 \\
\hline
\end{tabular*}
\end{document}
그리고 생성된 결과에는 몇 가지 추가 선이 있습니다. 이러한 중복 테두리가 표시되는 이유와 이를 제거하는 방법은 무엇입니까?
업데이트:
첫 번째 파이프라인을 제거해도 |
도움이 되지 않습니다.
\documentclass[12pt]{article}
\usepackage{tabularx}
\begin{document}
\section{section 1}
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } c | c | c | r | }
\hline
label 1 & label 2 & label 3 & label 4 \\
\hline
item 1 & item 2 & item 3 & item 4 \\
\hline
\end{tabular*}
\end{document}
제거하면 다음이 @{\extracolsep{\fill} }
제공됩니다.
\documentclass[12pt]{article}
\usepackage{tabularx}
\begin{document}
\section{section 1}
\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }
\hline
label 1 & label 2 & label 3 & label 4 \\
\hline
item 1 & item 2 & item 3 & item 4 \\
\hline
\end{tabular*}
\end{document}
답변1
AboAmmar 덕분에 문제를 해결했습니다.
\documentclass[12pt]{article}
\usepackage{tabularx}
\begin{document}
\section{section 1}
\begin{tabular*}{0.75\textwidth}{ | c @{\extracolsep{\fill} } | c | c | r | }
\hline
label 1 & label 2 & label 3 & label 4 \\
\hline
item 1 & item 2 & item 3 & item 4 \\
\hline
\end{tabular*}
\end{document}
그의 또 다른 제안:
테이블 내용보다 더 넓은 너비(.75\textwidth)를 지정했습니다. 일반 테이블 형식을 사용하고 .75\textwidth를 제거합니다.
답변2
이 MWE에는 두 가지 가능한 방법이 있습니다. 첫 번째는 자연스럽게 상자에 맞고 두 번째는 표준 크기보다 50% 더 크게 상자를 확장합니다.
\documentclass[12pt]{article}
\usepackage{tabularx}
\begin{document}
\section{section 1}
\begin{tabular}{|c|c|c|r|}
\hline
label 1 & label 2 & label 3 & label 4 \\
\hline
item 1 & item 2 & item 3 & item 4 \\
\hline
\end{tabular}
\vspace{5mm}
\scalebox{1.50}{ %scales the box 1.5 times the normal size
\begin{tabular}{|c|c|c|r|}
\hline
label 1 & label 2 & label 3 & label 4 \\
\hline
item 1 & item 2 & item 3 & item 4 \\
\hline
\end{tabular}
}
\end{document}