ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Bugs in XML export (for ePub)
Date: Wed, 12 Mar 2014 10:49:23 +0600	[thread overview]
Message-ID: <BEB97D43-00FE-4D00-9219-A5F9DCCAF22D@fiee.net> (raw)
In-Reply-To: <8075EAA8-6267-43E5-BA00-9DBBD3C8492E@fiee.net>

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

> Am 2014-03-11 um 23:54 schrieb Thangalin <thangalin@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:

———
%
\setupbackend[export=export.xml]
\settaggedmetadata[
	title={Export Test Solo},
	author={Hraban},
	version=\currentdate % why that doesn’t work?
]


\starttext

\startchapter[title={Chapter One}]

\startsection[title={Section One}]

\input tufte

\stopsection

\startsection[title={Section Two}]

\input knuth

\stopsection

\stopchapter

\stoptext
———

gives 

———
<?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">
 <metadata>
  <metavariable name="author">Hraban</metavariable>
  <metavariable name="title">Export Test Solo</metavariable>
  <metavariable name="version">\currentdate </metavariable>
 </metadata>
  <section detail="chapter" location='aut:1'>
    <sectionnumber>1</sectionnumber> 
   <sectiontitle>Chapter One</sectiontitle> 
   <sectioncontent>
      <section detail="section">
        <sectionnumber>1.1</sectionnumber> 
     <sectiontitle>Section One</sectiontitle> 
     <sectioncontent>
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.
     </sectioncontent>
    </section>
    <section detail="section" location='aut:3'>
        <sectionnumber>1.2</sectionnumber> 
     <sectiontitle>Section Two</sectiontitle> 
     <sectioncontent>
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.
      <break/>
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.
      <break/>
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.
     </sectioncontent>
    </section>
   </sectioncontent>
  </section>
 </document>
———

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

\setupexport[
	firstpage={koe.pdf},
	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
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2014-03-12  4:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11  5:04 Henning Hraban Ramm
2014-03-11  6:42 ` Thangalin
2014-03-11  7:52   ` Henning Hraban Ramm
2014-03-11 17:54     ` Thangalin
2014-03-12  3:24       ` Henning Hraban Ramm
2014-03-12  4:49         ` Henning Hraban Ramm [this message]
2014-03-11  8:09 ` Henning Hraban Ramm
2014-03-11  9:33   ` Wolfgang Schuster
2014-03-12  5:17 ` Henning Hraban Ramm

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=BEB97D43-00FE-4D00-9219-A5F9DCCAF22D@fiee.net \
    --to=texml@fiee.net \
    --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).