Re: Define a macro to produce title, author, ...
Giovanni Piredda <[email protected]> Sat, 28 Sep 2024 14:59:04 +0000
| Newsgroups | gmane.editors.texmacs.user |
|---|---|
| Message-ID | <[email protected]> |
I don't know why what you write does not work, it may be because the title is not something that _likes_ being the result of a macro (forgive me the figurative language). You might try the piece of Scheme code in this thread: http://forum.texmacs.cn/t/quick-way-to-add-title-author/152 where you can modify the shortcut (e.g. "t t l tab") and the parts of the title; you will be able to edit the text afterwards because it will be part of the buffer, not a typeset result. Said this, to copy parts of a TeXmacs document as source you can use the menu entry Edit -> Copy to -> TeXmacs Giovanni On 28/09/24 12:25, proitheus wrote: > Hello everyone! I have a series of reports to write, which have > similar titles, e.g. > title:My Title subtitle:1 author:me date:today > title:My Title subtitle:2 author:me date:today > title:My Title subtitle:3 author:me date:today > > So I wrote a macro for this: > ``` > <assign|title| > <macro| order | > <doc-data| <doc-title| My Title> > | <doc-subtitle| \order> > | <doc-author| me>>>> > ``` > In preamble. > (The "\order" is entered by \order[enter] in texmacs) > (The <doc-data.... Part is copied from a manually inserted title) > > But when I call this macro, it displays a literal "order" as subtitle, > and I can't change it. > > I want to know what's wrong with this macro, and how to fix it? > (I'm new to TeXmacs and is still learning, so please forgive me if > this question is stupid.)