On Mon, Nov 11, 2002 at 10:55:42PM +0100, Herbert Voss wrote:
> Bernd Rupp schrieb:
> 
> >How can i manage that the caption text is as wide as the figure above?
> >Thanks for help
> > 
> >
> http://www.educat.hu-berlin.de/~voss/lyx/floats/width.phtml

It is advisable to use LyX "objects" instead of ERT when possible.
For the above, I would use

\usepackage{caption2}
\newlength{\tmp}
\newcommand{\setcap}[1]{%
  \settowidth{\tmp}{#1}\setcaptionwidth{\tmp}\centering#1}

in the preamble, and in the text

\setcap{<a LyX graphics inset>}  (this paragraph should have
                                  a default alignment)
<A LyX caption paragraph containing the caption>

Reply via email to