35

I want to reduce the vertical space between the first line text and the start of the table.

I also want to remove the indent on the table, so that all three lines start at exactly the same vertical point.

\documentclass[final,a4paper,notitlepage,10pt]{report}

\usepackage[utf8]{inputenc} % inputenc for encoding to utf8

\setlength\parindent{0pt}

\begin{document}
\thispagestyle{empty}   % this page does not have a header

Testing some text on the first line.\\
\begin{tabular}{l l}\\
Lorem ipsum & dolor sit amet
\end{tabular}\\
Why was the table above indented? and how can I reduce the space between first line and start of the table?

\end{document}

I couldn't find any table indent command that I could simply reduce to 0. I am open to using a different tabular environment if it gets the job done easily.

This currently gives something similar to:

Table vertical space and indent MWE

David Carlisle
  • 757,742
dan2k3k4
  • 1,341

1 Answers1

46

I eliminated the \\ and replaced it with a blank line as it is a new paragraph. The \vspace*{-\baselineskip} eliminates the space between the first line and the table. You can replace the size with some other value to adjust the vertical spacing, for example \vspace*{-5mm}.

Also, use @{} to eliminate the the column spacing on the left hand side.

enter image description here

The \usepackage[showframe]{geometry} was used to show the margins.

\documentclass[final,a4paper,notitlepage,10pt]{report}
\usepackage[showframe]{geometry}
\usepackage[utf8]{inputenc} % inputenc for encoding to utf8

\setlength\parindent{0pt}

\begin{document}
\thispagestyle{empty}   % this page does not have a header

Testing some text on the first line.

\vspace*{-\baselineskip}
\begin{tabular}{@{}l l}\\
Lorem ipsum & dolor sit amet
\end{tabular}\\
Why was the table above indented? and how can I reduce the space between first line and start of the table?
\end{document}
Moriambar
  • 11,466
Peter Grill
  • 223,288