Graphics, Figures & TablesRow AND column alignment in tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
niteshs
Posts: 45
Joined: Wed Jun 06, 2012 9:57 pm

Row AND column alignment in tables

Post by niteshs »

Hi!

I am using the booktabs, longtable, threeparttablex and array packages for creating tables containing text, numbers and graphics which are centered vertically in the rows (column type m).

How do I get columns that are
(a) both vertically AND horizontally centered?
(b) vertically centered AND aligned by decimal?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Row AND column alignment in tables

Post by Stefan Kottwitz »

(a) m columns with \centering, such as >{\centering\arraybackslash}m{3cm} or define a new column style for this

(b) With siunitx, dcolumn or rccol

Stefan
LaTeX.org admin
niteshs
Posts: 45
Joined: Wed Jun 06, 2012 9:57 pm

Re: Row AND column alignment in tables

Post by niteshs »

Hi Stefan!

I used m columns to center, and S columns (from siunitx) for aligning numbers, but how can I specify a column that has both features?
Post Reply