Hi Jeremy,

I want to have styles defined for:

filenames
...

etc..
...

Can someone share examples for this?
Here comes a modest example (charstyle.layout), it defines a char style
to put some piece of a running text into a framed box.
Note the second line which defines the 'Label' of the Document class!

How to proceed:

1) Put your layout file with the char style definition(s) in your local
folder $HOME/.lyx/layouts
(Suppose you put my example 'charstyle.layout' there)

2) start lyx and reconfigure
(Steve Litt indicateed recently how to do so from the command line, but
i don't remember exactly how)

4) $ lyx test_char_style.lyx

5) Create a new document (ctrl+N), put some text in, select a piece of text

6) >>Document >Settings >Document Class

7) Open the associated pull down list 'Document class' and choose the
document class 'article (Char Style Test)', click OK (or quicker: alt+O)

Now the marked part of the text will be shown inside of some sort of
blue brackets, labelled 'Fboxed'

8) Compile to PDF (alt+V, f) and your pdf-viewer should pop up showing
you the result.

To define char styles you will need some LaTeX knowledge. Once you got
the general idea it's not that difficult.

BTW This afternoon i installed lyx-1.5.0rc1, it's great!
What i described above works with 1.5.0!

I'm working on an IBM Lenovo T60 witrh gentoo-linux, kde-3.5.7, tetex-3.0

HTH + Happy LyXing!

Hellmut

--
Dr. Hellmut Weber         [EMAIL PROTECTED]
Degenfeldstraße 2         tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq

#LyX 1.5.0rc1 created this file. For more info see http://www.lyx.org/
\lyxformat 271
\begin_document
\begin_header
\textclass charstyle
\language ngerman
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize default
\spacing single
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "leo" 
\end_header

\begin_body

\begin_layout Standard
asdf
\end_layout

\begin_layout Standard
asdf 
\begin_inset CharStyle Fboxed
show_label true
status inlined

\begin_layout Standard
qewrf
\end_layout

\end_inset

 asdf
\end_layout

\begin_layout Standard
adsf 
\begin_inset CharStyle Fboxed
show_label false
status inlined

\begin_layout Standard
qewrrf
\end_layout

\end_inset

 asdf2345 ycxv
\end_layout

\begin_layout Standard
asddf098u
\end_layout

\end_body
\end_document

Attachment: newfile2.pdf
Description: Adobe PDF document

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[scrartcl]{article (Char Style Test)}
#
# Char Style definition file for HWWTest documents
# Hellmut Weber <[EMAIL PROTECTED]>, 2007-06-01 
#
# based on /usr/share/lyx/layouts/scrartcl.layout
# Bernd Rellermeyer <[EMAIL PROTECTED]>, 1998/7/11.

Preamble 
  %
  % === Preamble part from charstyle.layout ===
  %
  \RequirePackage{setspace}
  \RequirePackage{pifont}
  %
  \renewcommand{\familydefault}{cmss}
  %
  \renewcommand{\theenumi}      {\Alph{enumi}}
  \renewcommand{\labelenumi}    {\theenumi.}
  \renewcommand{\theenumii}     {\Roman{enumii}}
  \renewcommand{\labelenumii}   {\theenumii.}
  \renewcommand{\theenumiii}    {\arabic{enumiii}}
  \renewcommand{\labelenumiii}  {\theenumiii.}
  \renewcommand{\theenumiv}     {\alph{enumiv}}
  \renewcommand{\labelenumiv}   {\theenumiv)}
  %
  % === End preamble part from charstyle.layout ===
  %
  EndPreamble

# General textclass parameters
Input /usr/share/lyx/layouts/scrartcl.layout

# 2007-04-29 Hw, frame-boxed code-parts
# Jürgen Spitzmüller's answer to my question
# CharStyle Fboxed_Code, ,-( # Here no underscore!
CharStyle Fboxed
  LatexType             Command
  LatexName             fboxedcode
  LabelFont
    Family              Roman
    Color               blue
    EndFont
  Preamble
    % === Start preamble part of Char style fboxed ===
    \newcommand{\fboxedcode}[1]{%
      \fbox{\texttt{\small%
        #1%
        }}% texttt fbox
      }%
    % === End   preamble part of Char style fboxed ===
    EndPreamble
  End


Reply via email to