On Mon, Aug 13, 2001 at 01:11:26PM +0200, Saalfeld, Christoph wrote:
> I want LyX to make a frame around each "includegraphics". After having
> realized that the option to "display frame" only affects the display of
> graphics within LyX, I entered the following LaTeX command:
>
> \fcolorbox{lightgray}{white}{\parbox{\columnwidth}{\centering
>
> Here ist the figure of LyX
>
> }}
> Figure: Caption of figure
>
> This is running well and procduces the frame around the figure as I want,
> but now I want LyX to do so with each figure automatically. But how can I
> make it ?
You can put the following lines in the preamble
\let\oldincludegraphics=\includegraphics
\renewcommand{\includegraphics}[1]%
{\fcolorbox{lightgray}{white}{\parbox{\columnwidth}{%
\centering\oldincludegraphics{#1}}}}
However, this will not work if you try to scale the image.
Also, you will not be able to insert a figure without having the frame.
Alternatively, you can define
\newcommand{\mybox}[1]{%
\fcolorbox{lightgray}{white}{\parbox{\columnwidth}{\centering#1}}
in the preamble, and put \mybox around each figure.