I'm trying to make a table that is as wide as the textwidth singlespaced with etoolbox's \AtBeginEnvironment but that somehow gets rid of the \noindent that I issued before.
\documentclass{report}
\usepackage{array,setspace,booktabs,tabularx,etoolbox}
\AtBeginEnvironment{tabularx}{\singlespacing\renewcommand{\arraystretch}{1.3}}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\noindent
\begin{tabularx}{\linewidth}{ @{} p{3em} X @{} }
\toprule
Table & Example \\
Table & Example \\
\bottomrule
\end{tabularx}
Any idea how to fix that?

\singlespacingthe\arraystretchredefinition comes too late anyway. – Werner Dec 04 '16 at 19:27etoolboxit's fine but where would I issue thesinglespacingthen? – jan Dec 04 '16 at 19:32\singlespacing? – Werner Dec 04 '16 at 19:41\noindent\singlespacingthe indent appears. You can put\singlespacing\noindentto again force a\noindent. – Werner Dec 04 '16 at 19:44\singlespacingthat causes the problem. – jan Dec 04 '16 at 19:46