Question
I want to put a non-float tabular environment inside of a description
list after a line break. I want said table to left align with the labels. What value does the description
environment use for an indent?
MWE (default behavior)
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{description}
\item [$\vert$ line me up]
~\\
\begin{tabular}{ll}
$\vert$ here & more text \\
$\vert$ and here & even more text
\end{tabular}
\item [$\vert$ some other item]
\end{description}
\end{document}
MWE (closer to what I want)
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{description}
\item [$\vert$ line me up]
~\\
\begin{minipage}{\linewidth}\hspace{-1.1cm}
\begin{tabular}{ll}
$\vert$ here & more text \\
$\vert$ and here & even more text
\end{tabular}
\end{minipage}
\item [$\vert$ some other item]
\end{description}
\end{document}
The question restated
In the second example, I would like to replace 1.1cm
with whatever internal spacing value my document class uses to indent following a list item. I imagine it would be something like \listindent
.
- Does this variable/constant exist?
- If not, how can I find the spacing my document class is using?
- Is there a better or more elegant way to align these things?
What this question is not.
- I do not want to align the description text only like in How to control enumitem's description list via leftmargin and labelwidth keys
- I would like to avoid redefining the
description
environment a la: Indentation of the second line in a very lone sentence after \textbullet WITHOUT itemize environment . Surely a value already exists inside the system to accomplish this. - I think this is a novel question based on my search. Please point me in the right direction if this is a duplicate.
~\\
is rather weird input and probably not what is intended.$\vert$ line me up
should be in brackets for thedescription
format. To force a line break after that requires character, hence the forced space.~\\
is just always wrong, even in a MWE. Just leave a blank line.line me up ~\\
happens to work here but forces two spaces before the line break so ifline me up
happened to be longer (within two spaces of the right margin)~\\
would force two line breaks, with one extra line just carring the space tokens.\\
. Without the~
the compiler complains that there is no line there to end.\item xxx
to\item[xxx]
changes the question rather a lot:-) Never use~\\
you could use\mbox{}\\