Hellmut Weber wrote:
> Hi list,
> i have created an new format in my personal layouts folder for the
> papers i produce.
>
> Here it is:
>
> # 2007-04-29 Hw, frame-boxed code-parts
> Style Fboxed_Code
>   CopyStyle              Paragraph
>   LatexType              Command
>   LatexName              fboxedcode
>   TopSep                 0.2
>
>   Preamble
>     \newcommand{\fboxedcode}[1]{
>       \fbox{\texttt{\small%
>         #1%
>         } }% texttt fbox
>       }
>     EndPreamble
>   End
>
> It works as expected changing the font, the size of the contents and
> putting a frame around it.
> BUT: To use this i have to create a new paragraph in LyX. So the framed
> box for my piece of code is put in a new paragraph in the output too.
> Is there a possibility to have the box INLINE in my text (as I can do
> e.g. with ERT) without referring to ERT?

use character styles:

CharStyle Fboxed_Code
        LatexType             Command
        LatexName             fboxedcode
        LabelFont
          Family              Roman
          Color               blue
        EndFont
        Preamble
           \newcommand{\fboxedcode}[1]{
             \fbox{\texttt{\small%
             #1%
             } }% texttt fbox
           }
       EndPreamble
End

You can select them by Insert->Character Styles.

> Thanks in advance
>
> Greetings from Munich
>
> Hellmut

Jürgen

Reply via email to