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
Note that the "Family" and "Color" options only refer to the appearance on
screen.
HTH,
Jürgen
# Textclass definition file for docbook.
# Author : José Abílio Oliveira Matos <[EMAIL PROTECTED]>
# Character Styles definition
Format 2
CharStyle Versal
LatexType Command
LatexName versal
LabelFont
Family Roman
Color blue
EndFont
Preamble
[EMAIL PROTECTED]
\usepackage{soul}
}{}
[EMAIL PROTECTED]
\DeclareRobustCommand*\versal[1]{%
\MakeUppercase{\scalefont{.92}\null{\caps{#1}}}%
}
}{}
EndPreamble
End
CharStyle Enquote*
LatexType Command
LatexName enquote*
Font
Family Typewriter
EndFont
LabelFont
Family Roman
Color green
EndFont
End
CharStyle Enquote
LatexType Command
LatexName enquote
LabelFont
Family Roman
Color green
EndFont
End