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?