On 8/29/2014 8:33 AM, Henning Hraban Ramm wrote:
Am 2014-08-28 um 23:39 schrieb Hans Hagen <pra...@wxs.nl>:
I just recognized there’s a problem with references, esp. register:
....
<section detail="Titel" location="aut:2">
<sectiontitle>Erinnerung </sectiontitle>
....
<registerentry>Erinnerung</registerentry>
<registerpages> <break/>
<registerpage><link destination="internal(3)"
location="aut:3">4</link></registerpage></registerpages>
....
<registerentry>Vor meinem inn’ren Auge schweben Namen</registerentry>
<registerpages> <break/>
<registerpage><link destination="internal(4)"
location="aut:4">4</link></registerpage></registerpages>
(These are title and start of lyrics of a song.)
Beside the inconvenience that there is no node wrapping registerentry and
registerpages, the locations don’t match.
If there are several index entries pointing to the same point (page), as here,
they’re continuously numbered, so that it’s no solution to just subtract 1, as
I do at the moment to create my ToC.
new beta
\setupbackend
[export=yes,
xhtml=yes,
css=export-example.css]
\starttext
\index{foo}foo \page
\index{bar}bar \page
\index{foo}foo \page
\index{bar}bar \page
\index{foo+test}foo \page
\index{bar+test}bar \page
\placeregister[index]
\stoptext
gives:
<register detail="index">
<registersection>
<registertag>b</registertag>
<registerentries>
<registerentry>
<registercontent>bar</registercontent>
<registerpages><registerpage>2</registerpage><registerseparator>,</registerseparator><registerpage>4</registerpage></registerpages>
</registerentry>
<registerentries>
<registerentry>
<registercontent>test</registercontent>
<registerpages><registerpage>6</registerpage></registerpages>
</registerentry>
</registerentries>
</registerentries>
</registersection>
<registersection>
<registertag>f</registertag>
<registerentries>
<registerentry>
<registercontent>foo</registercontent>
<registerpages><registerpage>1</registerpage><registerseparator>,</registerseparator><registerpage>3</registerpage></registerpages>
</registerentry>
<registerentries>
<registerentry>
<registercontent>test</registercontent>
<registerpages><registerpage>5</registerpage></registerpages>
</registerentry>
</registerentries>
</registerentries>
</registersection>
</register>
Maybe the internal location numbers mean something, but I need a working
reference; export.xml doesn’t know anything about pages, therefore the
destination makes no sense. Doesn’t ConTeXt have some unique internal reference
name?
Thank you for caring, the tag hierarchy is good now, but why did you leave out
the locations now?
I need some connection between register entry and the origin to be able to
create a link.
I can’t use the page numbers, since they don’t exist in the XML (and of course
they make no sense there).
There is probably some more cleanup to do with respect to referencing
(like with lists) but it takes time (till now I never really needed the
export which started as a quick and dirty experiment and normally I need
usage in projects to spend real time on such things.)
Anyway. I've added some more register stuff, but not yet in the default
css where the register is simply ignored (no time for that now).
Maybe we should make a todo list for the export. It's not that complex
but just takes time.
New beta ...
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________