%% "Larry S. Marso" <[EMAIL PROTECTED]> writes:

  >> Now, I want filenames like "foo/bar/obj" to appear in a fixed-width
  >> font like courier.  But I also want them all to use the same
  >> character "style", say "filename", so I can change them all at once
  >> later (maybe I decide I like helvetica better, or a smaller size,
  >> or something).

  lsm> This is not very hard.  But you require what we long-timers call
  lsm> ERT, which means "Evil Red Text" -- raw LaTeX.

  lsm> Layout->LaTeX Preamble

  lsm> Add:

  lsm> \def{\filename}{\ttfamily}
  lsm>                 ^^^^^^^^^ definition
  lsm>       ^^^^^^^^ name of your style

  lsm> Then, anywhere in your document you type a file name, type:

  lsm> \filename{foo/bar/obj}
  lsm>           ^^^^^^^^^^^ affected text
  lsm>  ^^^^^^^^ name of your style

  lsm> This text (or at least everything outside the "{}" must be in so-called
  lsm> "LaTeX mode"

Cool, I'll look at this.

  lsm> You see, LaTeX makes it very simple to define and use styles,
  lsm> even if it's unclean ERT.  I'm keeping my fingers crossed that
  lsm> 1.1 will support a menu based definition scheme.

I don't so much care about a menu-based definition scheme: after all,
once you've defined it, however gross it was, it's defined.

The problem with the above is the extreme pain involved with _USING_ it,
not defining it.  The use of it is what you do over and over.

As I understand it, for every single filename in my document (which
could well be in the hundreds or more) that I wanted to apply this to, I
first have to type M-c t to enter TeX mode, then \filename, then M-c t
to exit TeX mode, then {, the filename, and }.

Can I bind a key to do all this?  I'll have to go look that up in more
detail.

  lsm> Think about it, definitions have a number of wide ranging
  lsm> applications, not just "styles".

Certainly I agree; I've been using Emacs, etc. too long not to
appreciate the power of a full scripting language you can escape to.
But what you need is the ability to customize the user interface, too,
to get those applications easy to use.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

-- 
                +++ the lyx project user mailing list +++
                To unsubscribe from this list send mail to 
                         [EMAIL PROTECTED]
                    with the **Subject** unsubscribe.

Reply via email to