[texhax] How to make itemized list inside box?

Hartmut Henkel hartmut_henkel at gmx.de
Sat Dec 17 00:23:41 CET 2005


On Sat, 17 Dec 2005, Philip G. Ratcliffe wrote:

> This does work
>
> \documentclass[12pt,a4paper]{article}
> \begin{document}
> \fbox{
> \parbox{3cm}{Hello World\\
> \begin{itemize}
> \item item one
> \item item two
> \end{itemize}
> }
> }
> \end{document}
>
> Think about it!

...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}

Regards, Hartmut



More information about the texhax mailing list