On 2017-04-27 07:14, Florian Grammel wrote:
Thank you very much for your example -- it really helps a lot!
That’s one smart trick for the endnotes. It will do fine for my current project, but obviously it will not work for footnotes directly on the pages. I had somehow hoped that there would be something like „if within some environment/command" to the processors. With this also the formating of the items within the captions could be done automatically.
A real problem though is that adding \setupregister [index] [compress=yes] will wrongly compress e.g. "aaa 1, 2, 1n“ to "aaa 1–1n“. I’ll need to use compressed ranges and would be happy with a result, where formatted numbers a subsumed under the regular ones. You don’t happen to know how to make this work correctly, do you?
I do not think that it is wrong in the way it reports compressed page numbers. The aaa entry is indeed on those consecutive pages. Add some blank pages (or pages without the indexed items) and look at the result. You can use the same method I showed with indexed terms in footnotes. Just create another processor and use it in within the indexing command in the footnote, or create a new command to wrap it, as \defineprocessor[Footnote][style=bold,color=blue] \define[1]\fnindex{\index[Footnote->]{#1}} of course, if you use the optional indexunder component already ( \index[as if it were spelled this way]{displayed as} ) then you will have to create a more complex command. (I leave that as an exercise for those who need it and do not want to fall back to the \index command.) So: \defineprocessor [backpart] [style=slanted,right=n] \defineprocessor [Figure] [style=\tf,color=red,left=f] \defineprocessor [Footnote] [style=bold,color=blue] \define[1]\fnindex{\index[Footnote->]{#1}} \define[1]\fiindex{\index[Figure->]{#1}} \defineconversionset [backpart:pagenumber][][backpart->o] \setupuserpagenumber[way=byblock] \setuppagenumbering [location=none] \setupheadertexts[{\convertedcounter[userpage][numberconversionset=number]}] \setupregister[index][compress=yes] %\setupnote[footnote][location=none] \useMPlibrary[dum] \starttext \startbodymatter \startchapter[title=A chapter] \index{aaa}This is in the main body.\footnote{\fnindex{bbb}This is a footnote.} \stopchapter \startchapter[title={Another chapter}] \index{aaa}This is in the main body.\footnote{\fnindex{bbb}This is a footnote.} \startplacefigure[location=default, title={Body illustration\fiindex{ccc}}] \externalfigure[dummy][] \stopplacefigure \stopchapter \startchapter[title=A third chapter] This is in the main body.\footnote{This is a footnote.} \stopchapter \startchapter[title=A fourth chapter] This is in the main body. \stopchapter \startchapter[title={Another chapter}] \index{aaa}This is in the main body.\footnote{\fnindex{bbb}This is a footnote.} \startplacefigure[location=default, title={Body illustration\fiindex{ccc}}] \externalfigure[dummy][] \stopplacefigure \stopchapter \stopbodymatter \page \startbackmatter \startchapter[title=An appendix] This is in the backmatter.\index{aaa}\footnote{\index{bbb}This is a footnote.} \startplacefigure[location=default, title={Appendix illustration\index[Figure->]{ddd}}] \externalfigure[dummy][] \stopplacefigure \stopchapter \startchapter[title=Notes] \placenotes[footnote] \stopchapter \startchapter[title=Index] \placeregister[index] \stopchapter \stopbackmatter \stoptext Of course, there may be conflicts. You may index the same term twice on one page, once in the text, once in a footnote. Context will not choke, and there is a fifty-fifty chance it will default to what you want. -- Rik