New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
href: LaTeXML failing on URLs containing underscores #831
Comments
Not sure what the problem could be: such a thing is so common that it should have worked in all versions; it certainly works in the development version. Perhaps you're getting a mismatched combination of some bindings loaded from one version and some from another? |
Thanks. I would like to reopen this issue. I have done more testing and I am able to confirm that correct bindings were used. My latest test results indicate that there are no problems with conversion using LaTeXML 0.8.2 when \href{} with URLs containing underscores as arguments occur in normal text. However, when they occur in figure captions latexml raises errors. is OK when used in a normal paragraph, but causes errors when used in a caption:
Error:unexpected:_ Script _ can only appear in math mode Error:unexpected:_ Script _ can only appear in math mode |
Oh, I just saw you made a new issue, I guess that one is better |
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...
The text was updated successfully, but these errors were encountered: