テーブルが期待どおりに左にフラッシュされない

テーブルが期待どおりに左にフラッシュされない

私はテーブルを左揃えにして、全体的にテキストと揃えようとしています。 を使用するとto \textwidthテーブルを適切なサイズにすることはできますが、テキストと適切に揃わないことがあります。わずかにインデントされているため、右の余白からはみ出てしまい、以下の例に見られるような望ましくない動作になります。

これが私のMNWEです:

\documentclass{article}

\usepackage[table]{xcolor}
\usepackage{longtable,tabu}

\newcommand{\TableSetupFourColumns}{
\rowcolors{2}{gray!25}{white}
\begin{tabu} to \textwidth {lccX}
    \rowcolor{gray!50}}

\begin{document}

\section{Test 1}
This is the text I want the table to align with after flushing.\par \noindent
\TableSetupFourColumns
    Test            & test  & test  & test\\
\end{tabu}

\end{document}

答え1

定義の末尾にスペースがあります。

\newcommand{\TableSetupFourColumns}{%  <----

関連情報