[NTG-context] Bugs in XML export (for ePub)

Henning Hraban Ramm texml at fiee.net
Wed Mar 12 05:49:23 CET 2014

Am 2014-03-12 um 09:24 schrieb Henning Hraban Ramm <texml at fiee.net>:

> Am 2014-03-11 um 23:54 schrieb Thangalin <thangalin at gmail.com>:
>> Here is the thread from last year for your reference:
>> https://www.mail-archive.com/ntg-context@ntg.nl/msg71376.html
> Thank you, that’s what I was referring to.
> Hans says, ConTeXt would export XML, but that isn’t true, since the exported „XML“ lacks a root element.
> (Issue [1] in my previous post.)

Ok, I take it partially back: If I have just one standalone document, the output is ok.
So the problem is mostly in the combination of export with project structure.

But … please see below.

Minimal succeeding example:

	title={Export Test Solo},
	version=\currentdate % why that doesn’t work?


\startchapter[title={Chapter One}]

\startsection[title={Section One}]

\input tufte


\startsection[title={Section Two}]

\input knuth





<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>

<!-- input filename   : solo              -->
<!-- processing date  : Wed Mar 12 10:10:20 2014 -->
<!-- context version  : 2014.03.07 11:42  -->
<!-- exporter version : 0.30              -->

 <document language="en" file="solo" date="Wed Mar 12 10:10:20 2014" context="2014.03.07 11:42" version="0.30" xmlns:m="http://www.w3.org/1998/Math/MathML">
  <metavariable name="author">Hraban</metavariable>
  <metavariable name="title">Export Test Solo</metavariable>
  <metavariable name="version">\currentdate </metavariable>
  <section detail="chapter" location='aut:1'>
   <sectiontitle>Chapter One</sectiontitle> 
      <section detail="section">
     <sectiontitle>Section One</sectiontitle> 
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
    <section detail="section" location='aut:3'>
     <sectiontitle>Section Two</sectiontitle> 
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.

The wiki page about ePub says, it should be possible to define metadata in \setupexport like this:

	title={My Fine Title},

But that is completely ignored - it does neither show up in the export, nor in a produced ePub.

If I include an image with \externalfigure[koe][width=\textwidth], I get in export:
<image name="koe" id='image-1' width='15.000cm' height='21.625cm'></image>

That’s not really usable without file extension. In my case, it was even a GIF „giraffe.gif“ that got converted to „m_k_i_v_giraffe.gif.pdf“ .
Would it be possible to set the actually used file name as an additional attribute in <image>?

I’ll document the issues with export in project structure in my next post.

Greetlings, Hraban

More information about the ntg-context mailing list