Graphics, Figures & Tables ⇒ Table: force exact same column width
-
- Posts: 2
- Joined: Thu Apr 17, 2014 6:46 pm
Table: force exact same column width
I'm trieng to make a balans sheet (through table environment) and would like to have two columns with the exact same width. Anyone idea's?
This is my current Latex code and output:
\begin{table}[h!]
\centering
\begin{tabular}{lr|lr}
\multicolumn{4}{c}{Balans te 31/12/20XX} \\
\hline\hline
Revendication & 1 000 & Equity & 1 000 \\
Shares & 500 & Profit & 500 \\
& & & \\
& & Short term liability & 500 \\
\hline
\end{tabular}
\caption{Scenario A: inbreng tegen nominale waarde}
\label{table:ScA_Nom}
\end{table}
- Attachments
-
- Result Latex output
- Naamloos.png (18.2 KiB) Viewed 16666 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Table: force exact same column width
I also loaded package siunitx to take care of your number columns. Decimal points will now be aligned.
Code: Select all
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\begin{document}
\begin{table}%[h!]%JB: don't do that. It's really bad.
\centering
\begin{tabular}{p{3cm}S|p{3cm}S}
\multicolumn{4}{c}{Balans te 31/12/20XX} \\
\hline\hline
Revendication & 1 000 & Equity & 1 000 \\
Shares & 500 & Profit & 500 \\
& & & \\
& & Short term liability & 500 \\
Something & 5,12 & else &1000000,20 \\
\hline
\end{tabular}
\caption{Scenario A: inbreng tegen nominale waarde}
\label{table:ScA_Nom}
\end{table}
\end{document}
-
- Posts: 2
- Joined: Thu Apr 17, 2014 6:46 pm