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

Reopening issue #831 - href: LaTeXML failing on URLs containing underscores #837

Closed
goska opened this Issue May 10, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@goska
Contributor

goska commented May 10, 2017

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{}s with URLs containing underscores as arguments occur in normal text. However, when they occur in figure captions LaTeXML raises errors.
For example,
Histogram of correlation between $\varpi$ and $\mu_\delta$ \href{http://gaia.esac.esa.int/documentation/GDR1/large/cu9/cu9gat_astroCorr_AstroCorrStats_HistoCorParallaxPmDec_HistoSAM_large.png}{(larger)}

is OK when used in a normal paragraph, but causes errors when used in a caption:

\begin{center}
\includegraphics[width=0.24\textwidth]{cu9/Figures/gat/cu9gat_skydensity_healpix_stat_TotalSkyDensityCount-ECL_HealpixMapSAM.png}
\caption[Healpix map of total density count]{
Healpix map of total density count in ecliptic coordinates \href{http://gaia.esac.esa.int/documentation/GDR1/large/cu9/cu9gat_skydensity_healpix_stat_TotalSkyDensityCount-ECL_HealpixMapSAM_large.png}{(larger)}.}
\label{fig:cu9gat_skydensity_healpix_stat_TotalSkyDensityLogCount-GAL_HealpixMapSAM}
\end{center}
\end{figure}

The errors reported by LaTeXML were (the \href{} was at line 341):
Error:unexpected:_ Script _ can only appear in math mode
at test.tex; line 341 col 211
In Core::Definition::Primitive[Subscript] from TeX.pool.ltxml line 3583
<= Core::Stomach[@0x7fa6dbea4720] <= Core::Gullet[@0x7fa6db83c798] <= Core::Stomach[@0x7fa6dbea4720] <= ...

Error:unexpected:_ Script _ can only appear in math mode
at test.tex; line 341 col 211
In Core::Definition::Primitive[Subscript] from TeX.pool.ltxml line 3583
<= Core::Stomach[@0x7fa6dbea4720] <= Core::Gullet[@0x7fa6db83c798] <= Core::Stomach[@0x7fa6dbea4720] <= ...

Error:unexpected:_ Script _ can only appear in math mode
at test.tex; line 341 col 211
In Core::D

@dginev

This comment has been minimized.

Collaborator

dginev commented May 10, 2017

Cross-referencing #831

@brucemiller

This comment has been minimized.

Owner

brucemiller commented May 27, 2017

Ah, the moving argument problem. Some of the hyperref & url macros handle patching those up, but ```\href`` apparently didn't. Should be good now (hopefully with no unwanted side effects! :> ) Thanks for the report!

@dginev dginev added this to the LaTeXML-0.8.3 milestone Jan 6, 2018

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