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

False error on underscore in included file names #1019

Closed
altavir opened this Issue Jul 22, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@altavir

altavir commented Jul 22, 2018

Latexml reports errors like this:

Error:unexpected:_ Script _ can only appear in math mode
        at ./Chapter_1/lab_3_1_2.tex; line 60 col 27
        In _ from TeX.pool.ltxml line 3375
         <= Core::Stomach[@0x3d64840] <= { <= Core::Stomach[@0x3d64840] <= ...

when including file names that contain underscores (with \input command). It works fine after the error, but if there are many imports, it could fail by exceeding error limit.

@dginev dginev added the bug label Jul 22, 2018

@dginev dginev added this to the LaTeXML-0.8.3 milestone Jul 22, 2018

@brucemiller

This comment has been minimized.

Owner

brucemiller commented Jul 27, 2018

This is working fine for me in the development version (and even in 0.8.2). Do you have a minimal sample file that demonstrates the problem?

@altavir

This comment has been minimized.

altavir commented Jul 27, 2018

Can't reproduce it in a simple example. I will try to find the problem myself and report back.

@altavir

This comment has been minimized.

altavir commented Jul 27, 2018

OK, I found the problem. The message was confusing me. The error appeared not in the place where file was attached, but inside the file itself. I have a custom command that attaches ancient TexCad drawings and it contained _ in file name. Pdflatex and lualatex work fin with it, but latexml throws a error.

The issue still stands for custom commands with parameters with underscores, but it is quite rare case, I believe.

@altavir altavir closed this Jul 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment