# Re: how to add a caption to a Box inset?

Thanks for the help, Jürgen. I'm not that great with using LaTeX directly,
but is this on the right track for the boxedminipage style?
\usepackage{boxedminipage} in the preamble; then

\begin{boxedminipage}[c]{1\columnwidth}

\label{Box: hydrological cycle}Some text, blah blah\end{boxedminipage}

I inserted that as Tex code within LyX. I get a box this way, but I, err,
can't quite see how to use this with a float and/or get a caption (in the
Box 1, or Box 1.1 format). Sorry...

Thanks again!
~:Justin Wood:~
PhD candidate, *Energy & Engineering school*, Murdoch
University<http://www.murdoch.edu.au/>
2010/8/28 <lyx-users-digest-h...@lists.lyx.org>

> ---------- Forwarded message ----------
> From: "Jürgen Spitzmüller" <sp...@lyx.org>
> To: <lyx-users@lists.lyx.org>
> Date: Sat, 28 Aug 2010 16:48:02 +0800
> Subject: Re: how to add a caption to a Box inset?
>
> Justin Wood wrote:
> > Hi all. I've had a look around but can't seem to find an answer to this
> > one... I want to create a regular ole framed box (you know, as a
> > self-contained area for 'aside' or 'extra info' type content), but I
> can't
> > figure out how to give it a useful automatic identifier. As in, following
> > the same naming format that Figure captions do: Box 1, or Box 1.1, etc,
> and
> > have this displayed in the top part of the box somewhere.
>
> You can define a new float in the layout file of you class or (preferably)
> in
> a new module. The syntax is
>
> Float
>         Type                  box
>         GuiName               Box
>         Placement             tbp
>         Extension             lob
>         NumberWithin          none
>         Style                 plaintop
>         ListName              "List of Boxes"
>         LaTeXBuiltin          false
> End
>
> Then put a box inside this float.
>
> There's also a "boxed" style which puts the float in the box in the first
> place, but it looks different to what you want (caption outside and below
> box).
>
> HTH,
> Jürgen
>