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.

lockstep
  • 250,273
Dan
  • 969
  • 3
  • 9
  • 23

3 Answers3

7
\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}
David Carlisle
  • 757,742
  • 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
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?.

Gonzalo Medina
  • 505,128
0

Another option is to just use a table, but depending on what you really want to put in the right column, this may be restrictive:

\documentclass{article}
\usepackage{tabularx}

\begin{document} \begin{tabularx}{\linewidth}{@{}lX} 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. \end{tabularx} \end{document}

Christoph90
  • 1,020