5

I want to do this:

Term        This is the definition of the word. No matter how much is typed
            here it should always line up like this. How do I do this? I am
            not sure since there is another word on the first line.

Next Term   Not to mention, the alignment should be consistent for multiple
            entries as well. The entries may span multiple pages as well.

I am using LuaLaTeX.

  • Should items be breakable across the page boundary? – Werner Aug 26 '13 at 23:19
  • Ideally not mid-item, but there will definitely be enough entries to span multiple pages. – Dan Aug 26 '13 at 23:20
6

Using the enumitem package:

\documentclass{article}
\usepackage{calc}
\usepackage{enumitem}

\newlength\widest

\begin{document}

red yellow blue, red yellow blue, red yellow blue, 
red yellow blue, red yellow blue, red yellow blue, 

\settowidth\widest{\textbf{word}}
\begin{description}[leftmargin=\dimexpr\widest+\labelsep\relax,labelindent=0pt,
    labelwidth=\widest]
\item[word]
red yellow blue, red yellow blue, red yellow blue, 
red yellow blue, red yellow blue, red yellow blue, 
\item[that]
one two three four, one two three four, one two three four, 
one two three four, one two three four, one two three four, 
one two three four, one two three four, one two three four, 
\end{description}

\end{document}

enter image description here

For an automatic calculation of the widest label, you can see my answer to Automatically set description list `labelwidth` based on widest label?.

4
\documentclass{article}


\begin{document}


\begin{description}
\item[word]
red yellow blue, red yellow blue, red yellow blue, 
red yellow blue, red yellow blue, red yellow blue, 
\item[that]
one two three four, one two three four, one two three four, 
one two three four, one two three four, one two three four, 
one two three four, one two three four, one two three four, 
\end{description}

\end{document}
  • Very close but not exactly what I need without some modification. The indentation is not precise. I will clarify my response. – Dan Aug 26 '13 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.