On 10/19/25 6:43 AM, Scott Kostyshak wrote:
On Sun, Oct 19, 2025 at 10:30:17AM +0100, José Matos wrote:
Hi,
   this is probably a task for the next development cycle (if it is not yet
implemented).

I got a question raised by a friend: is it possible to have the macros defined
in modules?

I search for it and the best references that I found was this blog:
https://allanchain.github.io/blog/post/lyx-macro/

The suggestion to include a library of macros is either to have them defined in
a lyx file that is then input/included in the working file, or to (mis)use
branches to have them included there and then use the fold feature to hide it
there.

For my daily usage, of LyX, I have never used macros but I was curious about
this for some time.

Best regards,
I use macros a lot. I like the idea of something better, but that said I
don't know if modules is the correct mechanism. To define macros, we use
the LyX GUI, whereas modules are made with a text editor.

Another thing that I find inconvenient is that I have macros that I want
to include in both my beamer documents as well as article documents.
e.g., my macros set up notation that I use in both my slides, problem
sets, and text chapters of a book. However, currently I keep getting the
warning along the lines of "Parent is of document class <blah> which is
different...". This warning can be silenced, but still not ideal.

I'll just agree with all that. I use macros quite a lot, and I do the same sort of thing: Put them in a file to include, and work around the fact that the document class may not match.

This seems to me a version of something we've discussed before: Having a kind of 'inherit' setting for Document> Settings. When a document is a child document, and not intended to be used standalone, this makes a great deal of sense. A file of macros, in pure LaTeX, would be similar.

Riki


--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to