There are a couple of questions asking for a description environment where the width of the label-portion is the width of the widest label:
Label: Text text text text text text
text text text text.
Longer label: Text text text text text text
Text text text text.
One solution is to use enumitem to set the label width manually (also here). Another approach is to specify the widest label manually (also here).
I am working on a dictionary that will be hundreds of pages in length. Presumably, the widest word in the whole dictionary will be something of an outlier. I would like instead the label width to be appropriate for the longest word on the page. (I'm guessing this would take two LaTeX runs, along the lines of longtable or something like that.)
So for example, the alignment of ‘Nam gui ligula’ would match on each page in the example below. It would match the width of ‘Lorem ipsum’ on the first page, but ‘Lorem ipsum dolor sit’ on the second page, etc.
\documentclass[11pt,a4paper]{article}
\usepackage{enumitem,lipsum}
\begin{document}
\begin{description}
\item[Lorem] \lipsum[2-3]
\item[Lorem ipsum] \lipsum[2-3]
\item[Lorem ipsum dolor] \lipsum[2-3]
\item[Lorem ipsum dolor sit] \lipsum[2-3]
\item[Lorem ipsum dolor sit amet] \lipsum[2-3]
\end{description}
\end{document}
I have tagged this for the description environment, but I'm open to any solution. Here is an MWE without any list-like environment. I'd be looking for a way to compute \ComputedWidth for each page.
\documentclass[11pt]{article}
\usepackage{enumitem,lipsum}
\begin{document}
\parindent=0pt
\newdimen\ComputedWidth
\ComputedWidth=9em
\def\FixedWidthBox#1{\fbox{\hbox to \ComputedWidth{#1\hfill}}}
\FixedWidthBox{Lorem} \lipsum[2-3]
\FixedWidthBox{Lorem ipsum} \lipsum[2-3]
\FixedWidthBox{Lorem ipsum dolor} \lipsum[2-3]
\end{document}
\lipsum[2-3]) to be breakables cross pages this will be difficult. – touhami May 02 '16 at 07:43hboxs with that width. – adam.baker May 02 '16 at 09:51