On 07/21/2012 11:34 PM, Allen Barker wrote:
On 07/20/2012 03:40 AM, Guenter Milde wrote:Also, math-macros are document specific - defining a math-macro in one document does not make it available in other ones. This is why my documents include a file of commonly used math macros -- just like I \input a file with commonly used preamble definitions in my LaTeX documents.Could you elaborate on the best way to include a file of commonly-used math macros, in a way which is compatible with Lyx? I tend to use a lot of \DeclareMathOperator commands in the preamble, for example.
These kinds of commands do not (now) have any LyX equivalent, so they are just entered as raw LaTeX and naturally go in the preamble. So put them in some file mycmds.tex, and input it into your LyX preamble in the usual way.
I have several files, for different projects, that contain nothing but math macros.I've avoided the Lyx macro stuff so far because it has seemed to me to be *too* document specific. I don't know if it actually is, but I haven't found that information in the preliminary searches I've conducted.
This gets input into my other documents, using Insert>File>Child Document. Note that LyX doesn't know anything about what you put in the preamble (it just gets output raw into your document preamble), so if you use your newmath operators in LyX, they'll work, but not look nice. So the attached shows a way around this problem. The difference between \test and \lest doesn't show
up inside LyX, but it does in the output. Richard
mathop.lyx
Description: application/lyx