On 23. 01. 2017 09:26, Aditya Mahajan wrote:
I don't have an answer to your questions, but I am replying partly to
bump this thread again.
Thanks!
The typeset nodes are kept in "local" boxes. They are created using
\locbox, which is defined either by plain eTeX format or package
elocalloc.sty for LaTeX >2015. (Prior to LaTeX 2015, \locbox was
defined in etex.sty.) elocalloc.sty's \locbox is somewhat broken, but
still works, mainly because it seems no other package is using local
allocation. ;-)
Let me see if I understand this correctly.
You are asking how to define a macro, \locbox, such that the following
code should not change the value of \c_syst_last_allocated_box.
\bgroup
\locbox\BoxOne
\locbox\BoxTwo
\BoxOne\hbox{Box One}
\BoxTow\hbox{Box Two}
You probably meant \setbox\BoxOne\hbox{Box One}
% Do some measurement based on the size of the boxes
\egroup
Essentially, yes.
The intro section to package localloc (afaik, historically the first
package to implement local register allocation) might shed some light on
the issue as well.
http://ctan.org/pkg/localloc
The fact that a LaTeX package implements this behaviour by allocating
local box numbers from the end seems to be an implementation detail.
True, although I'm not aware of any other possibility to implement this.
I don't know the best way to implement such a macro in ConTeXt, but I
want to make sure that the user-level behavior that you want is properly
understood. Given the details in your question, one can easily lose the
forest for the trees (pun intended :-)
Damn. Precisely what the users say about my documentation! ;-)
Best,
Sašo
Aditya
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context