bugtex4ht - Bugs: bug #142, Wrapping an environment with...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #142: Wrapping an environment with \text*{} breaks xtpipes with oolatex

Submitted by:  ^m.e <sphakka>
Submitted on:  Tue May 3 16:49:37 2011  
 
Category: NonePriority: 5 - Normal
Severity: 8 - BlockerStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri Jul 17 10:11:16 2020, comment #2:

This issue is impossible to fix, I am afraid. It is never good idea to use \text.. commands for larger chunks of text that contains paragraphs, tables, lists, etc. The \textsf inserts opening tag, but \begin{description} closes the current paragraph, which results in invalid XML structure. The same thing happens with the closing tag, which is inserted in another paragraph. \sffamily uses HTF fonts mechanism, which can respect paragraphs and styling is applied just to the text.

Michal Hoftich <michal_h21>
Project Member
Wed May 4 08:41:09 2011, comment #1:

As suggested by William F.H., using

{\sffamily ...}
instead of "\textsf{}" works with oolatex.
AFAIK, those two are usage-equivalent (I don't know about the internals, though):
http://en.wikibooks.org/wiki/LaTeX/Formatting#Font_Styles
http://www.ctan.org/tex-archive/macros/latex/doc/fntguide.pdf

I'm happy with the workaround (so the severity can be lowered), but the bug stays...

^s

^m.e <sphakka>
Tue May 3 16:49:37 2011, original submission:

Hi there,
Wrapping an environment with \text{} (tried with in [bf,tt,sf]) breaks xtpipes with oolatex, f.i. the following

\documentclassh[a4paper]{report}

\begin{document}

\textsf{
  \begin{description}
  \item[foo] bar
  \end{description}
}

\end{document}

processed by

$ mk4ht oolatex test.tex

raises the following java exception:

System call: java -classpath /usr/share/texmf/tex4ht/bin/tex4ht.jar xtpipes -i /usr/share/texmf/tex4ht/xtpipes/ -o test.4oo test.tmp
org.xml.sax.SAXParseException; lineNumber: 44; columnNumber: 8; The element type "text:span" must be terminated by the matching end-tag "</text:span>".
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1234)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
        at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
        at xtpipes.Xtpipes.execute(Xtpipes.java:1300)
        at xtpipes.Xtpipes.execute(Xtpipes.java:783)
        at xtpipes.Xtpipes.mainMethod(Xtpipes.java:665)
        at xtpipes.Xtpipes.main(Xtpipes.java:70)
        at xtpipes.main(xtpipes.java:5)
--- xtpipes error 29 --- At <sax content-handler="xtpipes.util.ScriptsManager,tex4ht.OoFilter" lexical-handler="xtpipes.util.ScriptsManagerLH" > : While parsing file file:/home/marcoep/docs/curriculum/oolatex/test.tmp: : org.xml.sax.SAXParseException; lineNumber: 44; columnNumber: 8; The element type "text:span" must be terminated by the matching end-tag "</text:span>".

I'm using tex4ht v20090611_p1038-r1 on Gentoo, with

$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (Gentoo build 1.6.0_22-b22)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
same problem with Sun's Java:
$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

Cheers,

^s

^m.e <sphakka>

 

Attached Files
file #103:  test.tmp added by sphakka (3kB - application/octet-stream)
file #104:  test.tex added by sphakka (137B - application/x-tex)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by sphakka (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    3 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jul 17 10:11:16 2020michal_h21Open/ClosedOpen=>Closed
    Tue May 3 16:49:37 2011sphakkaAttached File-=>Added test.tmp, #103
      Attached File-=>Added test.tex, #104
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray