Graphics, Figures & TablesMulticolumn indented when using @{} to suppress column space

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
geois
Posts: 11
Joined: Tue Apr 06, 2010 8:47 am

Multicolumn indented when using @{} to suppress column space

Post by geois »

Hi,

In the MWE that follows there are two longtables. The second longtable uses @{} to suppress the space to the left of its first column. The result is that a multicolumn which is to start in the first column, and span several columns, appears indented. The first longtable is given as comparison. The only difference between the two longtables is the @{} in the definition of the second.

I've attached a screenshot of the behaviour.
Behaviour of the multicolumn being indented when using @{} to suppress inter-column space
Behaviour of the multicolumn being indented when using @{} to suppress inter-column space
indent.GIF (7 KiB) Viewed 6657 times
I'd like to be able to suppress the space to the left of the first column, and not have the multicolumn entry indented. Can I have the multicolumn entry flush with the left of the table?

I'm using PDFTeX in MikTeX 2.8 on Windows XP Pro.

Many thanks for any insights you can offer,

Alastair.

Code: Select all

\documentclass[]{report}
\usepackage{longtable}

\begin{document}

\begin{longtable}{ l l l l }
\hline
Aaaa & Bbbb & Cccc & Dddd \\
\multicolumn{4}{l}{Aaaaaaaaaaa}\\
Aaaa & Bbbb & Cccc & Dddd \\
\end{longtable}

\begin{longtable}{ @{} l l l l }
\hline
Aaaa & Bbbb & Cccc & Dddd \\
\multicolumn{4}{l}{Aaaaaaaaaaa}\\
Aaaa & Bbbb & Cccc & Dddd \\
\end{longtable}

\end{document}
Last edited by geois on Tue Apr 06, 2010 9:40 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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Multicolumn indented when using @{} to suppress column space

Post by localghost »

Do the same as you do for the tabular environment.

Code: Select all

\multicolumn{4}{@{}l}{Aaaaaaaaaaa}\\

Best regards and welcome to the board
Thorsten
geois
Posts: 11
Joined: Tue Apr 06, 2010 8:47 am

Multicolumn indented when using @{} to suppress column space

Post by geois »

localghost wrote:Do the same as you do for the tabular environment.

Code: Select all

\multicolumn{4}{@{}l}{Aaaaaaaaaaa}\\
Many thanks, that was exactly what I was after.
Post Reply