2

I want to vertically align the first column of all my tables the text. I can change the \tabcolsep using @{} but I how can I declare this in a single place as a default value?

Edit: I added an MWE below.

2nd Edit: I modified the question according to your comments. Thank you for clarifying that this is indeed no indent but the tabcolsep.

\documentclass{article}
\begin{document}
This is some normal text. This is some normal text. This is some normal text. This is some normal text.\\
\begin{tabular}{@{}ll@{}}
    This is aligned with the text &abc\\
\end{tabular}
\newline
\begin{tabular}{ll}
    This is not aligned with the text   &abc\\
\end{tabular}
\end{document}
  • 2
    Untested: \AtBeginEnvironment{tabular}{\parindent=0pt} -- requires etoolbox – user31729 Mar 15 '16 at 11:21
  • 2
    @ChristianHupfer: Probably \AtBeginEnvironment{table}. I don't see parindent inside of tabulars. – Ulrike Fischer Mar 15 '16 at 11:32
  • 1
    @UlrikeFischer: Of course -- I meant table. Thanks for correction. – user31729 Mar 15 '16 at 11:35
  • 1
    @KonradHöffner: ... which is always the best idea ;-) – user31729 Mar 15 '16 at 11:44
  • 1
    note that tabular do not have any indentation code that can be disabled, they are just positioned like a letter. If you put them at the start of a paragraph then they may be indented depending on the paragraph settings, although possibly using \centering is more common in which case there is usually no indentation. – David Carlisle Mar 15 '16 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.