mailing-list for TeXmacs Users

Text archives Help


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


Chronological Thread 
  • From: Frank <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] A set of Scheme functions and TeXmacs macros for formatting references
  • Date: Tue, 18 Jun 2019 12:28:55 +0200

Dear Giovanni Piredda,

I don't have a good source of scoping, but it seems to me that the description on wikipedia https://en.wikipedia.org/wiki/Scope_(computer_science)#Lexical_scoping_vs._dynamic_scoping seems to be clear.

I did not read the source code of TeXmacs so I don't know how it is implemented. The reference says that \label and \ref are primitives, so I don't know whether it is possible to implement them by hands. (I have not programmed anything in TeXmacs therefore I am only talking about the possibility, and hopefully experienced users would correct errors and add some details. I have already thought the possibility of implementing properly cleveref in TeXmacs, therefore I asked)

As far as I understand, dynamic scoping extends callee's environment from caller's environment, therefore it seems to enable directly the exposure of the environment through variables.

Best wishes,

Le 17/06/2019 à 19:56, Giovanni Piredda a écrit :

Am 16.06.2019 um 13:49 schrieb Frank:

Dear all,

I wonder whether we can implement references similar to that of cleveref in LaTeX. Joris discouraged this, however:

https://www.mail-archive.com/address@hidden/msg01359.html

It seems useful when one wants to frequently change a lemma to a theorem and so forth.

Seemingly we need to implement \label so that the tag (I mean, whether it is a lemma, a theorem, or a customized tag) is encoded so that it could be inquired where \ref is called. If TeXmacs supports dynamic scoping, maybe this would be easier (render-theorem exposes the name to the body, this seems difficult for lexical scoping without changing the interface of body).


For writing code on a "cleveref" implementation for the moment I pass.

I am curious about two things though:

- the counters must know which environment they are in, because the counters have to be advanced correctly. The same information that goes into the counters could go into the labels.

- could you please give me a link to something to read about the difference between dynamic scopig and lexical scoping?


Thanks in advance -


Giovanni



--
Best wishes!
Yours,




Archive powered by MHonArc 2.6.19.

Top of page