Ian S. Worthington wrote:
If I'm writing a manual for a product tentatively named Boggis v1, but know
that that will change later to something else, is it possible to define some
symbol I can use to represent that in my document so I only have to change it
in one place when it changes?

For further marks,

How much?  Enough to get me an A+/4.0?  ;-)

 can I define that symbol to have a particular test
styling?


This is not too hard if you're willing to put up with a bit of LaTeX. In the document preamble, define a macro via \newcommand{\YourMacroName}{...} where ... is what you want printed for the product name, including any styling commands. If you're not sure what the LaTeX style commands would be, style the name once in the body of the document, using LyX's text style menu, then do View > View Source to see the LaTeX code. Once you've created the macro in the preamble, in the document body enter \YourMacroName{} in ERT anyplace you want the product name. If the product name changes, just edit the macro definition in the preamble accordingly.

If you're going to be using the macro frequently, you might want to modify your bind file (User Guide section C.2.2, Tools > Preferences > Editing > Shortcuts) to bind the following to some unused key combination: command-sequence ert-insert;self-insert \YourMacroName{};char-forward; .

I've attached a small example.

/Paul

Attachment: boggisv1.lyx
Description: application/lyx

Reply via email to