[Tex/LaTex] \hspace does not work before longtable

longtablespacing

The following code produces the image below.

\documentclass[a4paper]{article}
\usepackage{lipsum}

\begin{document}
\lipsum[1]

\hspace{-14mm}
\begin{tabular}{p{2mm}p{122mm}p{2mm}}\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
\end{tabular}

\lipsum[1]
\end{document}

Imgur

Now, I want to do the same with a longtable, however, the \hspace command seems to not cause any effect. Here is an example of it:

\documentclass[a4paper]{article}
\usepackage{longtable,lipsum}

\begin{document}
\lipsum[1]

\hspace{-14mm}
\begin{longtable}{p{2mm}p{122mm}p{2mm}}\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
\end{longtable}

\lipsum[1]
\end{document}

Imgur

Any idea of how can I do that?

Best Answer

You need to set the length \LTleft, if you want to change the position of the longtable (as default it is centered).

\documentclass[a4paper]{article}
\usepackage{longtable}
\usepackage{lipsum}

\begin{document}
\lipsum[1]

\setlength\LTleft{-14mm}
\begin{longtable}{p{2mm}p{122mm}p{2mm}}\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
  &\parbox{122mm}{\lipsum[1]}& \\\hline
\end{longtable}

\lipsum[1]
\end{document}
Related Question