As I am trying to make a simple table in Latex, I realize the empty column that I created has a really small width. Is there a way that I can increase the space in empty column?
Create a single-column tabular
, and specify the width of the space between the right-side double-line:
\documentclass{article}
\begin{document}
\begin{tabular}{|l|@{\hspace{1em}}|}
\hline
A \\
\hline
B \\
\hline
\end{tabular}
\begin{tabular}{|l|@{\hspace{2em}}|}
\hline
A \\
\hline
B \\
\hline
\end{tabular}
\end{document}
If you want to have the same width for both columns, you could just insert an \hphantom
with the content of the widest left site input.
% arara: pdflatex
\documentclass{article}
\usepackage{array} % fixing the gaps in the vertical lines.
\begin{document}
\begin{tabular}{|l|l|}
\hline
A & \hphantom{A} \\
\hline
B & \\
\hline
\end{tabular}
\end{document}
Two alternatives. With the first
\newcommand{\wb}[1]{#1&\phantom{#1}}
the second column will have exactly the same width as the first one, because at each row we add a phantom with the same contents.
With the other possibility
\newcommand{\wb}[1]{#1&\hspace{1cm}}
the second column will have a fixed width, 1cm in this case.
In the example I use \renewcommand
just to show both possibilities in the same document. This shows also that using macros leaves you free to decide the format until the last moment.
\documentclass{article}
\newcommand{\wb}[1]{#1&\phantom{#1}}
\begin{document}
\begin{tabular}{|c|c|}
\hline
\wb{A} \\
\hline
\wb{B} \\
\hline
\end{tabular}
\begin{tabular}{|c|c|}
\hline
\wb{Vpp} \\
\hline
\wb{Vrms} \\
\hline
\end{tabular}
\bigskip
\renewcommand{\wb}[1]{#1&\hspace{1cm}}
\begin{tabular}{|c|c|}
\hline
\wb{A} \\
\hline
\wb{B} \\
\hline
\end{tabular}
\begin{tabular}{|c|c|}
\hline
\wb{Vpp} \\
\hline
\wb{Vrms} \\
\hline
\end{tabular}
\end{document}
p
-column specifier (e.g., instead of having{|l|l|}
, try something like{|l|p{1cm}|}
. But, really, it helps to see your actual input/code. – jon Jan 23 '15 at 4:32Vpp
andVrms
should most likely be$V_{\textrm{pp}}$
and$V_{\textrm{rms}}$
instead. – Paul Gessler Jan 23 '15 at 11:46