General ⇒ Tables with narrower margins
Tables with narrower margins
I am writing my thesis using the book document class. I am quite pleased with the text's width, but I find it quite narrow for tables. Is there any way to for the table to start from the left sooner than the text?
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
Tables with narrower margins
Code: Select all
\hspace{-3cm}
\begin{tabular}{column descriptors}
(tabular stuff)
\end{tabular}
Code: Select all
\begin{tabular}{@{\hspace{-2cm}}column descriptors}
(tabular stuff)
\end{tabular}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Tables with narrower margins
You can use a trick to get centered tables hanging into the margins on both sides.JoKo wrote:Hi,
I am writing my thesis using the book document class. I am quite pleased with the text's width, but I find it quite narrow for tables. Is there any way to for the table to start from the left sooner than the text?
Code: Select all
\begin{table}[!ht]
\makebox[\textwidth]{%
\begin{tabular}{*{15}{c}}
...
\end{tabular}
}
\caption{Table with excess width}\label{tab:widetab}
\end{table}
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Tables with narrower margins
Thanks a lot for your help. The first example didn't produce the expected results. The second one is producing the format I wanted except for the lines ( \toprule and \hline ). I would be also glad to know the function of @ .Juanjo wrote:You can simply put a \hspace command with a negative length right before the tabular environment or, with the help of the @{} descriptor, in the tabular mandatory argument. For example,orCode: Select all
\hspace{-3cm} \begin{tabular}{column descriptors} (tabular stuff) \end{tabular}
Code: Select all
\begin{tabular}{@{\hspace{-2cm}}column descriptors} (tabular stuff) \end{tabular}
At first, I was trying to do something similar using minipage and then the table inside. Unfortunately, neither of those methods produced the wanted result...localghost wrote:You can use a trick to get centered tables hanging into the margins on both sides.JoKo wrote:Hi,
I am writing my thesis using the book document class. I am quite pleased with the text's width, but I find it quite narrow for tables. Is there any way to for the table to start from the left sooner than the text?But I think this is a very poor result. You should think about increasing the text width with geometry. Tables that exactly fit the text width are produced with tabularx. The documentations will show you how to get things work.Code: Select all
\begin{table}[!ht] \makebox[\textwidth]{% \begin{tabular}{*{15}{c}} ... \end{tabular} } \caption{Table with excess width}\label{tab:widetab} \end{table}
Best regards and welcome to the board
Thorsten¹
Thanks for your hospitality!
JoKo
Tables with narrower margins
as localghost has mentioned, the result is really poor (from a typographic standpoint). However, the changepage package provides an easy solution:
Code: Select all
\documentclass{article}
\usepackage{changepage}
\usepackage{lipsum}%just to genearte some text
\begin{document}
\lipsum[1]
\begin{table}[!ht]
\begin{adjustwidth}{-2.4cm}{}
\begin{tabular}{*{14}{c}}
text & text & text & text & text & text & text & text & text & text & text & text & text & text
\end{tabular}
\caption{Table with excess width}\label{tab:widetab}
\end{adjustwidth}
\end{table}
\lipsum[1]
\end{document}
Re: Tables with narrower margins
This produces exactly the output I really wanted!
-
- Posts: 3
- Joined: Wed May 16, 2012 9:58 am
Re: Tables with narrower margins
Working and looking great.
Amine