3

I've got a tabularx containing figures that is set to \textwidth but doesn't occupy whole textwdith and leaves a margin on the left. Specifically:

\begin{tabularx}{\textwidth}{A B C}

% num_web_clicks
\rowcolor{red}\multicolumn{3}{B}{\resizebox{\textwidth}{!}{\input{fig1.pgf}}
\\
\rowcolor{blue}\resizebox{.33\textwidth}{!}{\input{fig2.pgf}}
&\resizebox{.33\textwidth}{!}{\input{fig3.pgf}} 
&\resizebox{.33\textwidth}{!}{\input{fig4.pgf}}\\

\end{tabularx}

Where column types are defined as:

\newcolumntype{C}{>{\raggedleft\arraybackslash}X}
\newcolumntype{B}{>{\centering\arraybackslash}X}
\newcolumntype{A}{>{\raggedright\arraybackslash}X}

Which looks like this:

what the problem looks like

Why does each row have a margin on the left (red/blue extra space before the row, on the left) and how can I remove it?

0
4

Why does each row have a margin on the left (red/blue extra space before the row, on the left) and how can I remove it?

Just change

\begin{tabularx}{\textwidth}{A B C}

either to

\begin{tabularx}{\textwidth}{@{}A@{}B@{}C@{}}

or to

\setlength\tabcolsep{0pt}
\begin{tabularx}{\textwidth}{A B C}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.