W3C home > Mailing lists > Public > www-math@w3.org > May 2004

Re: xslt transformation and encoding

From: David Carlisle <davidc@nag.co.uk>
Date: Fri, 28 May 2004 14:17:50 +0100
Message-Id: <200405281317.OAA07361@penguin.nag.co.uk>
To: Stephan.Semirat@ac-grenoble.fr
Cc: www-math@w3.org

This is a general xml question rather than a mathml one.

  if i use <xsl:output encoding="UTF-8"/>, and \usepackage[utf8]
  latex doesn't recognize anything (i use last miktex distribution under 

There are several utf8 packages available for latex (see ctan archives)
if you have the current "december 2003" version of latex the core
inputenc package has utf8 support, so you should be able to go

Other alternatives: before processing the file modify the dtd
using a global replace so that for example

<!ENTITY rarr             "&#x02192;" >


<!ENTITY rarr             "\rarr " >

Then the character data will come out as TeX macro syntax, and you just
need to define those macros.

A third possibility would be to use saxon7 and XSLT2 character map
functionality which would allow you to specify how you want these
characters to be output (whether or not they were inout as entities)

A final (for now) possibility, and one I have used in the past is to use
the xml output method rather than text and an encoding of US-ASCII
then the characters will be output as "& # 2 1 9 2 ;" rather than being
an error. You just then edit with sed or some other such editor and
& # [0-9]* ;

then your file ends up with lots of macro names such as \U2192 which you
just need to define in TeX to do the right thing...


The LaTeX Companion

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
Received on Friday, 28 May 2004 09:19:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:35 UTC