Hi all,
when I ran into this problem, I thought "you got this!" But I haven't...
I have (in xml) items with references. Some of them inside footnotes,
some outside. How can I add the information whether they are inside a
footnote and the footnote reference (\in ...) to the section
"references"? Maybe with a bit of Lua code which would write to
utilitydata.structures.references.collected? But how? I hope the example
shows what I need!
Thanks and all best
Thomas
\startbuffer[test]
<document>
<p>Here is <ref id="A">Thing A</ref>. It has a reference. It is not
inside a footnote.<footnote id="ftn1">However, <ref id="B">Thing B</ref>
is.</footnote> And so on.</p>
<references>
<referred id="A">Thing A</referred>
<referred id="B">Thing B</referred>
</references>
</document>
\stopbuffer
\startxmlsetups xml:testsetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|p|ref|references|referred|footnote}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:document
\xmlflush {#1}
\stopxmlsetups
\startxmlsetups xml:p
\xmlflush {#1}\par
\stopxmlsetups
\startxmlsetups xml:ref
\pagereference [\xmlatt {#1} {id}] \xmlflush {#1}
\stopxmlsetups
\startxmlsetups xml:footnote
\footnote [\xmlatt {#1} {id}] {\xmlflush {#1}}
\stopxmlsetups
\startxmlsetups xml:references
\page
REFERENCES: \par
\xmlflush {#1}
\stopxmlsetups
\startxmlsetups xml:referred
\xmlflush {#1}: \hfill p. \at [\xmlatt {#1} {id}] (inside footnote XXX)
\par
\stopxmlsetups
\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________