Andreas Döring wrote:
>
> The common behaviour of positioning the caption of a figure-float is
> below the figure, which doesn´t look very nice for small pictures. I
> wanted to put the caption on the right side of the figure like
>
> 22222222222222 Figure 1: Blabla
> 222figure22222
> 22222222222222
in latex preamble.
\newsavebox{\myFig}
\newlength{\myCapWidth}% depends to figurewidth
\newlength{\myFigsep}% sep between figure and caption
\setlength{\myFigsep}{2em}
\newcommand\myFigFloat[3]{%
\sbox{\myFig}{#2\hspace{\myFigsep}}
\setlength{\myCapWidth}{\textwidth}
\begin{figure*}[#1]
\raisebox{-\height}{\usebox{\myFig}}\ %
\addtolength{\myCapWidth}{-\the\wd\myFig}%
\raisebox{1.5ex}{\parbox[t]{\myCapWidth}{\caption{#3}}}\hfill
\end{figure*}%
}
and in lyxtext
\myFigFloat{<placement>}{<insert the figure via lyx-menue>}{<caption>}
for example
\myFigFloat{!htb}{<any figure>}{a very nice caption}
Herbert
--
http://www.educat.hu-berlin.de/~voss/lyx/