Jeremy C. Reed wrote:
On Fri, 1 Jun 2007, Richard Heck wrote:
Look at the stdcharstyles.inc file, which you'll find in e.g. /usr/share/lyx/.
You'll need to define yours in a similar way (or use this one), and then
include the file in a custom layout file. This can be as simple as:
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[article.cls]{article (mine)}
Input article.cls
Input mycharstyles.inc
Put this in your user layout directory (e.g., /home/you/.lyx/layouts/),
reconfigure LyX, choose it, and you're off.
That had errors, so I just copied scrbook.layout to my ~/.lyx/layouts/ and
added the line:
Input mycharstyles.inc
Is there any file that corresponds to stdcharstyles.inc that defines
\newcommand{} for \filename and the others in that file? Or do I have to
define all these myself?
LaTeX already defines \filename (or something does, on my system), so I
have to use something else here. And the reason db_stdcharstyles.inc
doesn't define any of this is that it's a layout for doing DocBook, not
LaTeX, so yes, you'll have to define them yourself. You can do this in
the layout file, using a construct like this:
CharStyle Filename
LatexType Command
LatexName fname
Font
Family Typewriter
EndFont
LabelFont
Family Roman
Color blue
EndFont
Preamble
\newcommand{\fname}[1]{\texttt{#1}}
EndPreamble
End
Richard
--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto