I would like to use a tabular
and a longtable
in my document, but the left margins are not aligned.
\documentclass[letterpaper,11pt]{article}
\usepackage{longtable}
\begin{document}
\begin{tabular}{p{2cm} p{15cm}}
entry 1 & bla bla bla bla bla \\
entry 2 & this is a tabular
\end{tabular}
\begin{longtable}{p{2cm} p{15cm}}
entry 3 & This is a longtable \\
entry 4 & with many more lines \\
entry 5 & but it isn't aligned
\end{longtable}
\end{document}
This question is related, and so is this one.
Replacing \begin{longtable}{...}
with \begin{longtable}[l]{...}
in the code above doesn't seem to do anything.
By fumbling around, I found that by using \setlength{\LTleft}{18pt}
my margins look pretty equal. Is there a more elegant way to have longtables
left-aligned with tabulars
? Can I align my tables without specifying numbers?
longtable
is centredtabular
is indented replace 15cm by 5cm you will see.longtable
indented rather than aligned?longtable
says I can flush left with thel
option, but that doesn't seem to do anything for my example.\textwidth