Hi Marco, (PS for Hans), Marco wrote: > \in{figure}[alpha,beta,gamma] > > This outputs “figure 1”. What I'd like to have is “figure 1-3”.
The attached quasi-module seems to do it! On my computer, at least. (I call it 'quasi' because it is really nothing more than code in a file of its own. No configurability whatsoever, except to the extent that I tried to comment well, and split things up into functions.) I'd have written it so that it properly identifies runs like '1.2.1, 1.2.2, 1.2.3', too, but I can't find a function that will turn reference strings into such a prefixed strings. I hope it does what you want! Let me know if you want/need any alterations, or discover bugs. Sietse PS @Hans: if figure numbers have prefix segments, is there any (combination of) helper function that will return e.g. the string '1.2.3' given the reference string "ref:fig-three"? I found commands.savedlistprefixednumber(nil, numberinlist), but that is a wrapper around sections.typesetnumber; and that last function injects the string into the TeX stream instead of returning it. Is there another function I haven't found yet that will do this, or are prefixes implemented print-only at the moment?
inwithranges.mkiv
Description: Binary data
inwithranges.lua
Description: Binary data
test-inwithranges.tex
Description: TeX document
test-inwithranges.pdf
Description: Adobe PDF document
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________