I have a tabular of the times I in LaTeX.
These times are in the form 4:00 or 12:00 and this have different lengths. I would like to vertically align these times by their colon. Is there a nice way to do this in LaTeX?
I have a tabular of the times I in LaTeX.
These times are in the form 4:00 or 12:00 and this have different lengths. I would like to vertically align these times by their colon. Is there a nice way to do this in LaTeX?
You can use @{}
, or in your case @{:}
as a column delimiter.
\begin{tabular}{l|r@{:}l}
first & 12 & 00 \\
second & 4 & 00 \\
\end{tabular}
More or less like this:
\begin{tabular}{r@{:}l}
12&44\\
2&01\\
22&11
\end{tabular}
You may want to introduce some very small space around the ":", like \hspace{1pt}