Skip to content

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

Description

@goska

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions