Graphics, Figures & TablesCentering Table to use left Margin

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Alaza
Posts: 5
Joined: Tue Dec 20, 2011 9:42 am

Centering Table to use left Margin

Post by Alaza »

Hi there,

I am trying to get a table to use the left margin of the document, not the exceed the right margin instead.

I have uploaded an attachment with the code, the PDF is only 2 pages long. I have tried to use

Code: Select all

\begin{center}
to solve the problem, but it doesn't seem to affect the table? At this moment, the table is almost exceeding the right end of the page, which obviously isn't good. :)

Hope you can help.

Thank you
Attachments
errata_for_34352.tex
(2.95 KiB) Downloaded 438 times
Last edited by Alaza on Tue Dec 20, 2011 10:17 am, edited 1 time in total.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Centering Table to use left Margin

Post by Stefan Kottwitz »

Hi Alaza,

welcome to the board!

You could put it my \makebox (centered by default) into a box of width \textwidth, such as

Code: Select all

\begin{table}[!hbt]
\noindent\makebox[\textwidth]{%
\begin{tabular}...
...
\end{tabular}}
\end{table}
Perhaps see Centering wide tables or figures.

Stefan
LaTeX.org admin
Alaza
Posts: 5
Joined: Tue Dec 20, 2011 9:42 am

Re: Centering Table to use left Margin

Post by Alaza »

Hi Stefan,

Thank you very much for the quick answer.

It works flawlessly it seems, thank you. :)
Post Reply