Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references

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: Thu, 27 Jun 2019 20:42:12 +0200

Hi Massimiliano,


I am happy that what I am doing is appreciated. I find it challenging to write the documentation so that it is both precise and easy to read, but since the program is small I might succeed. Perhaps with some changes (different order of the topics, different style and also improvements of the program ...) this could be turned into a part of a cookbook.

My aim is to show that a user can write an extension for TeXmacs. For the central repository, I think it is a good idea (seeing the work of other people encourages further work, seeing the available extensions and style files is an incentive for potential users of TeXmacs). I do not know what is a possible way to do it, but I will ask around, either post or write you if I find a plausible suggestion.


Giovanni


On 26.06.19 23:32, Massimiliano Gubinelli wrote:
Dear Giovanni,
this of yours is a pretty cool project! Aside from the intrinsic value I
like a lot the extensive documentation you wrote.

I think this kid of efforts should be centralized in a repository, but I’m
not clear how to do it in an easy to maintain way. Are there any suggestions?

Best
Max


On 22. Jun 2019, at 13:23, Giovanni Piredda <address@hidden> wrote:


On 18.06.19 22:17, Massimiliano Gubinelli wrote:
I see, that indeed could be tricky. define is a special form which is
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

I 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.

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.










Archive powered by MHonArc 2.6.19.

Top of Page