[XeTeX] XeTeX maintenance
Zdenek Wagner
zdenek.wagner at gmail.com
Mon Apr 27 13:13:57 CEST 2015
Hi all,
if you use <para indentation="none" looseness="1">Something...</para> you
are not using XML properly. The purpose of XML is to describe the structure
of a document, not its appearance. Generally you will print the information
from the XML file in a different order or you will print just a part of it.
As the second step you will run XSLT in order to extract the elements that
have to be printed and finally XSL-FO in order to format the output. Of
course you can combine these two steps into a single one and you can use
other formatting engines instead of XSL-FO. On the contrary, the TeX
primitives do not describe the document structure but ist appearance. LaTeX
offers a kind of structural markup, eg \chapter, \section etc. Plain TeX
users are supposed to invent such a markup themselves fr each docunebt or
they can use OPmac developed by Petr Olšák.
XML may, of course, be used almost for everything. It helped me much when
typesetting a book with pictures that have fixed places and the text is
floating. It is described here:
http://icebearsoft.euweb.cz/bharat.php
I gave a lecture on this topic but only in Czech so the slides might be
useless for you but you can look at the sources and XSLT stylesheets. I use
a commercial font that cannot be distributed so uless you have it, you will
not be able to compile the source, at least you will have to redefine the
font.
As I wrote, XML defines the document structure. When creating my web pages,
I have all language variants in one XML file and XSLT builds 1 HTML file
per language. For instance, this page is avaiable in three languages:
http://icebearsoft.euweb.cz/ArunakashKaRasta/
The tools for creating the language versions are described here:
http://icebearsoft.euweb.cz/webmake.php
I have other applications of XML + TeX but if they are published,
informatin is (unfortunatelly) only in Czech.
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz
2015-04-27 12:39 GMT+02:00 Philip Taylor <P.Taylor at rhul.ac.uk>:
>
>
> Joseph Wright wrote:
> > On 27/04/2015 07:35, Philip Taylor wrote:
> >> Going even further off-topic, but pursuing this one aspect of the
> >> thread, is there not only real one problem : the need to educate users
> >> to cease marking up their documents in raw (La)TeX syntax, and instead
> >> to express them in well-formed XML ? I have just finished typesetting
> >> (using [plain] XeTeX) a 544pp book marked up entirely in XML, and whilst
> >> I have made no efforts to generate PDF/UA, I am convinced that the task
> >> of so doing (assuming that the necessary primitives are or were
> >> available in XeTeX) would have been 1/1000 of the effort needed to do so
> >> had the book been marked up in traditional (La)TeX syntax with its usual
> >> accompanying conflation of form and content.
> >
> > As Ross says in a parallel message, XML raises different issues and is
> > not a panacea. For a start, we can ask if XML is a particularly good
> > format not only here or for anything (there's a blog post by Linus
> > Torvalds suggesting the answer is 'no'!). Assuming XML is at some level
> > a good plan, that still doesn't make it a good plan for the end user nor
> > ensure that the end sure will stick to logical structures. There's also
> > the business that TeX is useful because sometimes we do need some visual
> > adjustment or programming element.
>
> Let me address the last point first, because it is by far the easier to
> rebut. In the 544pp book to which I referred earlier, there are
> occasional places where TeX's typesetting system, in the absence of
> explicit guidance, produces sub-optimal results. This is overcome at
> the XML level by the simple expedient of attributes (where such can be
> restricted to a single element):
>
> <Para indentation="none" vadjust="0,75" hbadness="4000"><image
> status="active" vadjust="-1,8" source="FO+78-81-57-1813" repository="NA"
> callout="Document_2"></image><foreign language="Greek">Διὰ τῆς παρούσης
> μου ἀναφορᾶς ἀναφέρω τῇ ἐξοχότητί της, ὅτι κατὰ τὸ ͵αωαʹ ἔτος
>
> or of pragmats (where they may be required in a more general situation):
>
> <Para><pragmat code="\looseness = 1 \emergencystretch = 0,1 em
> \tolerance = 9999 \hbadness = \tolerance \parfillskip = 0 pt plus
> 0,3\hsize \relax"></pragmat>In April 1813 the then Patriarch of
> <place>Jerusalem</place> <owner-individual
>
> indexterm="Polykarpos,_Patriarch_of_Jerusalem">Polykarpos</owner-individual>
> (1808–27) wrote to <other-person indexterm="Liston,~Robert">Robert
> Liston</other-person>, the British Ambassador in
>
> The former are used fairly frequently to optimise appearance; the latter
> are used in only a very few places.
>
> As to whether "XML is a particularly good format not only here or for
> anything", all I can say is that in my experience we (humanity, that is)
> have not yet come up with anything better; LaTeX 2e, by explicitly
> permitting the conflation of form and content, fails abysmally in this
> respect (IMHO, of course).
>
> ** Phil.
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20150427/ff752055/attachment-0001.html>
More information about the XeTeX
mailing list