On 2009-02-16, Justin Crites wrote:

...
> How can I include semantic "code fragments" in my document which are
> styled monospace?

>From the preceding text,

> For example, I might have a "program listing" block and then discussion
> surrounding it, referencing the names of variables or expressions.  I
> think of the variables or expression snippets semantically as "code
> fragments".

I infer that this should be "inline" code (as opposed to a complete
paragraph).

> I am using 1.5.2.

Unfortunately, support for semantic markup of "inline" elements is
rudimentary or absent.

In LyX 1.6.x, you can define CharStyle layouts or use the pre-defined
ones from the logicalmkup module (after adding this module in the
Document>Settings>Modules tab).

Günter

PS: this is the definition of the Code character style in
logicalmkup.module:

InsetLayout CharStyle:Code
        LyxType               charstyle
        LabelString           code
        LatexType             command
        LatexName             code
        Font
          Family              Typewriter
        EndFont
        Preamble
        \newcommand{\code}[1]{\texttt{#1}}
        EndPreamble
End


Reply via email to