Subject: mailing-list for TeXmacs Users
List archive
Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references
Chronological Thread
From : Giovanni Piredda <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references
- Date: Sat, 22 Jun 2019 13:23:32 +0200
On 18.06.19 22:17, Massimiliano Gubinelli wrote:
I see, that indeed could be tricky. define is a special form which isI have been able to do the automatic loading. It is described in the help files, it took me a bit of time to follow the thread.
interpreted differently at top level or inside a function. In particular I’m
not sure what will happen with a define inside a TeXmacs macro. But I think
you can try tm-define because this define symbols directly in the common
environment which all the scheme evaluation inherit. I think this is more
what you want.
Best
Max
On 18. Jun 2019, at 21:09, Giovanni Piredda <address@hidden> wrote:
On 18.06.19 22:05, Giovanni Piredda wrote:
Hi Massimiliano,
I have tried extern and it did not work.
More precisely it seems that within extern I cannot write a define ...
instruction, but to be sure I would have to try again. I postpone and will
write together with the rest.
Giovanni
The right instruction is <use-module|([dir1 [dir2 ... dirn]] filename)> where the Scheme list indicates the path, which as far as I understood must be a subpath of one of the paths that TeXmacs know about (~/.TeXmacs/progs is one of them, so if dir1 is a subdirectory of ~/.TeXmacs/progs, TeXmacs will find and load the Scheme files).
The style file itself can be put in the "user" directory of TeXmacs, that is again ~/.TeXmacs, under /packages, and it will appear in the "Document->Style-> Add package" menu.
I have not yet understood how to execute a macro only once inside TeXmacs, so the macros I use to define the list of formats get executed every time TeXmacs wants to (there is an update mechanism that I do not understand but I guess it is the general update mechanism of TeXmacs). The multiple execution has no effect, as the macros I wrote check for the existence of a format before adding it, but I would like to correct this and get the behaviour I want (only one execution for this macro). If anyone has a suggestion, thanks in advance.
I have updated the files at https://github.com/pireddag/formatRef and I think it is possible to use them even if they are not robust (multiple executions that I have mentioned above, missing checks on input) and incomplete.
Incompleteness that I see: it is not possible to define a format where the reference number is within parentheses, as the format string is always before the reference. I have in mind a solution with string-split, and perhaps for making it general I would need to understand better the TeXmacs format (with trees) and how to manipulate it.
- [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/15/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/15/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Frank, 06/16/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/17/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/17/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/18/2019
- Message not available
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/18/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/18/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Massimiliano Gubinelli, 06/18/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/22/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Massimiliano Gubinelli, 06/26/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/27/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/27/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/18/2019
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/18/2019
- Message not available
- Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references, Giovanni Piredda, 06/17/2019
Archive powered by MHonArc 2.6.19.