[NTG-context] E-books and XML.

Hans Hagen pragma at wxs.nl
Thu Aug 28 19:39:50 CEST 2014


On 8/28/2014 12:54 PM, Henning Hraban Ramm wrote:
> Am 2014-08-28 um 14:22 schrieb Hans Hagen <pragma at wxs.nl>:
>>> <div class="document xmlns:m-http://www.w3.org/1998/Math/MathML date-Thu Aug 28 14:00:55 2014 author-Henning Hraban Ramm, fiëé visuëlle version-0.31 title-Gestammelte Werke context-2014.08.27 11:51 file-prd_hraban language-de xmlns:xhtml-http://www.w3.org/1999/xhtml">
>>
>> that one is already fixed
>
> good
>
>>>   <div class="division detail-frontpart">
>>>    <div class="metadata">
>>>     <div class="metavariable name-author">Henning Hraban Ramm, fiëé visuëlle</div>
>>
>> those are is okay as a class can have multiple names and the attribute-name prefix can be used for further css detailing ... so we export both xthml old style (using tags, something that browsers understand) and xhtml new style (something that epub devices might be able to handle)
>
> Ok, I don’t care, will continue to use the XML.
>
> Next issue:
>
> 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?
>
>
>
> Greetlings, Hraban
> ---
> http://www.fiee.net/texnique/
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------


More information about the ntg-context mailing list