From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: mapping seeregister command to xml
Date: Thu, 4 Jul 2019 12:10:05 +0200 [thread overview]
Message-ID: <2fe7c9f1-d4be-614f-97b9-e3300fc6b2c5@uni-bonn.de> (raw)
Hi,
I'm having trouble mapping the seeregister command to an xml setup.
Example (looks somewhat messy, but explains why I need it):
\startbuffer[test]
<document>
<p>This is a test. <emph>IGRR</emph> 4, 988<seeinscription
sort="IGRR4+988" target="TAM 2 677"><emph>IGRR</emph>
4+988</seeinscription> = <emph>TAM</emph> 2, 677<inscription
sort="TAM2+677"><emph>TAM</emph> 2+677</inscription></p>
</document>
\stopbuffer
\startxmlsetups xml:testsetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|p|inscription|seeinscription|emph|index}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:testsetups}
\startxmlsetups xml:document
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:p
\xmlflush{#1} \par
\stopxmlsetups
\startxmlsetups xml:emph
{\em \xmlflush{#1}}
\stopxmlsetups
\startxmlsetups xml:inscription
\expanded{\inscription[\xmlatt{#1}{sort}]{\xmlflush{#1}}}
\stopxmlsetups
\startxmlsetups xml:seeinscription
\expanded{\seeinscription[\xmlatt{#1}{sort}]{\xmlflush{#1}}{\xmlatt{#1}{target}}}
\stopxmlsetups
\defineregister[inscription][inscriptions]
\setupregister[inscription][pagestyle=,
textstyle=,
location=right,
prefix=none,
indicator=no]
\starttext
\xmlprocessbuffer{main}{test}{}
\blank [line]
\placeregister[inscription]
\stoptext
Maybe my problem is with expansion in index entries? I must admit that I
haven't really grasped why the \expanded was necessary and what it does...
All best
Thomas
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2019-07-04 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 10:10 Thomas A. Schmitz [this message]
2019-07-04 14:36 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fe7c9f1-d4be-614f-97b9-e3300fc6b2c5@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).