On Sat, 9 Jun 2001 00:50:20 +0300 wrote Dekel Tsur <[EMAIL PROTECTED]>:

> On Fri, Jun 08, 2001 at 08:44:47AM +0200, Jean-Pierre.Chretien wrote:
> > >>The math-macro definitions have the advantage that they are expanded and
> > >>appear in WYSIWM mode (a LyX perk!). 

The LyX-math-macro has the disadvantage, that it must be defined in the
text-body of your document (i.e. on the LyX-canvax/screen) You cannot define
it in the preamble or in an included file. That means you have a box
with "Macro:some_name" for each defined macro in your Text. (Which is
WYSIMTWYM(*)

> > >>However, there seems to be no
> > >>mechanism for saving the math-macro definitions as part of a standard
> > >>template.

As the template is not constrained to preamble and default settings but can
also contain "normal" LyX-text, there is no problem in including math-macro
definitions in the ~/.lyx/templates/defaults.lyx file. 

 
> > I wrote a perl script to translate (as reLyX, in a way) a set of lateX
> > macros as a set of LyX math-macros, which you had to Include
> > as a LyX file.
> 
> This is not a complete solution because the macros will not be expanded on
> the LyX display unless you load (when starting LyX) the macro file.
> Currently, there isn't a better solution.

Currently you have the choice to

1. Include the macros.tex file in the latex preamble and open the
   corresponding macros.lyx file in LyX (as a separate document) every time
   you want to use the macros.

2. Open ~/.lyx/templates/defaults.lyx in LyX, "hard-insert" the macro
   definitions (Insert|Insert_File|LyX_Document macros.lyx), save again:
    
    a) as  ~/.lyx/templates/defaults.lyx if you want you macros all the
       times you start a new (default) document
    b) as ~/.lyx/templates/defaults_with_macros.lyx if you want to have the
       macro boxes only for some documents and start these with
       File|New|With_Template

Method 1 has the advantage of "non cluttering the document with macro
definition boxes and the disadvantage of some extra action to be taken when
starting to use LyX.

Method 2 has the advantage of beeing more transparent/save and the
disadvantage of WYSIMTWYM(*)

(*) WYSIMTWYM -- What you see is more than what you want :-)


Guenter

--
[EMAIL PROTECTED]

Reply via email to