[texhax] How to make itemized list inside box?

Martin Schröder martin at oneiros.de
Sat Dec 17 01:24:39 CET 2005


On 2005-12-17 00:23:41 +0100, Hartmut Henkel wrote:
> ...and if you don't want to tweak the width manually, take the
> varwidth.sty package that does a funny auto-shrink:
> 
> \documentclass[12pt,a4paper]{article}
> \usepackage{varwidth}
> \begin{document}
> \fbox{
> \begin{varwidth}{10cm}Hello World\\
> \begin{itemize}
> \item item one
> \item item two
> \end{itemize}
> \end{varwidth}
> }
> \end{document}

And even better if you sprinkle it with some %

\fbox{%
  \begin{varwidth}{10cm}Hello World\\
    \begin{itemize}
      \item item one
      \item item two
    \end{itemize}
  \end{varwidth}%
}

Best
  Martin
-- 
                    http://www.tm.oneiros.de



More information about the texhax mailing list