
\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}
E nos resultados gerados, existem algumas linhas extras. Por que vejo essas fronteiras redundantes e como removê-las?
Atualizar:
Remover a primeira tubulação |
não ajuda:
\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}
e remoção de @{\extracolsep{\fill} }
me dá:
\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}
Responder1
Graças ao AboAmmar, resolvi o problema:
\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}
sua outra sugestão:
Você especificou uma largura (0,75\textwidth) maior que o conteúdo da tabela. Use tabular normal e remova .75\textwidth
Responder2
Existem duas maneiras possíveis neste MWE. O primeiro cabe na caixa de forma natural e o segundo dimensiona a caixa 50% maior que o tamanho padrão.
\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}