I am using the ltxtable
package to be able to set the longtable
to \textwidth
I have \setlength{\parindent}{0pt}'
in the preamble.
The first line of each longtable
is indented, how do I get rid of that?
\subsubsection*{Test}
\label{test}
\begin{filecontents}{longtab.tex}
\begin{longtable}{p{0.5\textwidth}p{0.1\textwidth}X}
\addtocounter{table}{-1}
one & & two \\
three & & four \\
\end{longtable}%
\end{filecontents}
\LTXtable{\textwidth}{longtab}
Best Answer
LaTeX tries to ignore spaces at the begin of a table cell by using
\ignorespaces
. But the space after\addtocounter{table}{-1}
caused by the line end is not seen and therefore not ignored by the automatically added\ignorespaces
. This line end can be commented out:If you do not want to have the remaining "indentation" by the horizontal space automatically added around table cells, then this can be suppressed by
@{}
in the table column specification. This makes sense, if there are not horizontal lines in the table: