# No margins around tabular by default?

How can I set the margins around all tabulars to zero by default?

The margins around a single tabular can be removed using @{}, see below, but I have dozens of tables and would like to have a single switch for all of them.

\begin{tabular}{@{}ll@{}}

• @PhelypeOleinik unfortunately not, that removes the space between columns in the table. Jan 16, 2018 at 11:08
• One way would be to define your own environment which adds the @{}. \newenvironment{mytabular}[1]{\tabular{@{}#1@{}}}{\endtabular}. By renaming tabular to e.g. origtabular first (\let\origtabular\tabular \let\endorigtabular\endtabular) you can even patch the environment and keeping the orginal name. Jan 16, 2018 at 11:13

Just for fun. This trims off the edge using a \makebox. The \fbox is just to show the actual dimensions.

\documentclass{standalone}

\let\oldtabular=\tabular
\let\oldendtabular=\endtabular
\def\tabular{\bgroup\sbox0\bgroup\oldtabular}
\def\endtabular{\oldendtabular\egroup
\makebox[\dimexpr\wd0-2\tabcolsep][c]{\usebox0}%
\egroup}

\begin{document}
\fboxsep=0pt
\fbox{\begin{tabular}{lr}
this&is\\
why&I\\
hate&making\\
My&own MWE
\end{tabular}}
\end{document}