Graphics, Figures & TablesIndent Tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Indent Tables

Post by Moruk »

How can I indent tables?
Last edited by Moruk on Sat Sep 17, 2011 12:45 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Indent Tables

Post by Stefan Kottwitz »

Moruk wrote:How can I indent tables?
For example by \hspace or \hspace* before the table, or any other horizontal spacing command. Very often tables are centered though.

Stefan
LaTeX.org admin
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Indent Tables

Post by Moruk »

Code: Select all

\hspace*{5cm}

\begin{tabular}{ l c r }
  1 & 2 & 3 \\
  4 & 5 & 6 \\
  7 & 8 & 9 \\
\end{tabular}
Does not work..
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: Indent Tables

Post by Stefan Kottwitz »

It does not work because you made a paragraph break between the \hspace and the table. So the table starts at the beginning at the following line. Remove the empty line which causes the paragraph break.

Stefan
LaTeX.org admin
Moruk
Posts: 18
Joined: Sun Jun 12, 2011 2:00 pm

Re: Indent Tables

Post by Moruk »

simple and effective :D
Post Reply