>>From: Juergen Spitzmueller <[EMAIL PROTECTED]>
>>To: [email protected]
>>Subject: Re: How to actually use the LyX 1.4 Character Style Feature
>>Date: Mon, 2 Oct 2006 08:17:55 +0200
>>
>>Daniel Lohmann wrote:
>>> 1) I would like to use character styles in my documents. In our papers, we
>>> frequently have to refer to identifiers from C++ listings that should be
>>> set in "typewriter" and either "small" or "smaller" and I would like to
>>> define a character style for that.
>>
>>Currently, charstyles are only available on a general (document-class or 
>>several-document-classes) level.
>>You have to define your character styles either in the *.layout file or in a 
>>mycharstyles.inc file, which is then to be included in the layout file(s) 
>>with
>>
>>Input mycharstyles.inc
>>
>>All those files have to be placed in your ./lyx-directory.
>>
>>The char styles are then available through the menu (Input->Character Styles)
>>
>>The syntax is pretty straightforward, in your case it's something like:
>>
>>CharStyle Identifier
>>      LatexType             Command
>>      LatexName             identif
>>      LabelFont
>>        Family              Typewriter
>>        Color               blue
>>      EndFont
>>      Preamble
>>              \newcommand\identif[1]{\small\texttt{#1}}
>>      EndPreamble
>>End

Tried this example on 1.4.3-qt/Solaris, but I got twice the command in the 
exported
latex file, so I had to change \newcommand to \providecommand to make it work.

I created the .inc file and modified the class layout in the site location 
/usr/local/share/lyx,
if this may be the reason of the problem.

Is this known ? I found nothing in bugzilla.

-- 
Jean-Pierre

Reply via email to