[tex4ht] fix to extra space at begin of xml file
frankie at etsetb.upc.edu
Fri Nov 12 17:19:42 CET 2010
I was using tex4ht to convert a tex file to openoffice when it
suddenly started failing with:
The processing instruction target matching "[xX][mM][lL]" is not
Digging deep I found it was a problem about extra space added
at the beginning of the xml file like this:
<?xml version="1.0" encoding="UTF-8"?>
Finally I solved it changing the configuration file tex4ht.env.
Instead doing "mv" xml files are processed via perl so the
extra space is removed.
Here is a diff.
< .4oo mv %%0.4oo %%0.tmp
> .4oo cat %%0.4oo | perl -ne 's/\s.*(<\?xml.*)/$1/; print ' > %%0.tmp
< .4oy mv %%1.4oy sxw-%%0.dir/styles.xml
> .4oy cat %%1.4oy | perl -ne 's/\s.*(<\?xml.*)/$1/; print ' >
More information about the tex4ht