Skip to content

href: LaTeXML failing on URLs containing underscores #831

Closed
@goska

Description

@goska

I have a problem with conversion of documents using href with URLs containing underscores with LaTeXML 0.8.2. As my LaTeX document contains a large number of such URLs, this results in a failure to generate XML version of the document because of a fatal error due to the number of errors exceeding the set limit. The conversion works with unescaped underscores with 0.8.1, with 0.8.2 after escaping underscores in URLs, and also with unescaped underscores with 0.8.2 when hyperref.sty.ltxml from 0.8.1 in placed the directory where the conversion is being run.
It looks a though the problem is caused by the use of Verbatim on line 125 of hyperref.sty.ltxml in \href constructor:
DefConstructor('\href Verbatim {}',,
which replaced Semiverbatim in 0.8.1 version:
DefConstructor('\href Semiverbatim {}',
The error is:
Error:unexpected:_ Script _ can only appear in math mode at /Users/goska/CU9/GDR1-0-8-2/cu9/cu9gat.tex; line 169 col 174 In Core::Definition::Primitive[Subscript] from TeX.pool.ltxml line 3583 <= Core::Stomach[@0x7f8844ae7f20] <= Core::Gullet[@0x7f8845119b98] <= Core::Stomach[@0x7f8844ae7f20] <= ...
I am working on MacBook, on which I have two versions of LaTeXML installed. The 0.8.1 is the default; I export PATH to 0.8.2 installation when I need to work with 0.8.2 version.
I am sure my system is running LaTeXML 0.8.2:
Malgorzatas-MacBook-Pro:GDR1-0-8-2 goska$ latexml --dest=master-test-06-03-17.xml GDR1_master-06-03-17.tex latexml (LaTeXML version 0.8.2) processing started Mon Mar 6 11:00:21 2017

(Digesting TeX GDR1_master-06-03-17... (Loading /Users/goska/LaTeXML-0.8.2/blib/lib/LaTeXML/Package/TeX.pool.ltxml...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions