dginev / ar5iv

A web service offering HTML5 articles from arXiv.org as converted with latexml
https://ar5iv.org
MIT License
779 stars 20 forks source link

Improve article 2101.04108 #31

Closed umgupta closed 6 months ago

umgupta commented 2 years ago

Exact location of issue https://ar5iv.org/html/2101.04108 (Sec 3.4)

Sorry for not linking the exact location. I can't find the anchored links on this and other subsections, and I think this may be another problem?

Problem details

(Optional) Expected behavior The images should render correctly as well as the equation.

Desktop (please complete the following information)

Not related to the issue but general: Thank you for doing this.

dginev commented 1 year ago

The math should now be rendered in the entire article on recent versions of Chrome.


The reasons for the missing figures in this paper was that the author used:

\includegraphics[width=0.8\textwidth]{main/all_methods_adult_nn_1_layer}

where that figure was actually located at figures/main/all_methods_adult_nn_1_layer. That was achieved by extending the graphics path in the preamble via:

\graphicspath{ {./figures/} }

which latexml did not successfully interpret at the time. That was fixed in latexml#2188, and reconverting the article with the latest latexml gets the images to succeed. That will be visible after the next complete rerun of ar5iv.


Lastly, there is one remaining problem with the article we can try to patch, related to an empty subcaption. In the TeX:

\begin{subfigure}[t]{0.49\textwidth}
 \centering
 \includegraphics[width=0.74\textwidth]{main/contrastive_vs_reconstruction_conditional_adult_nn_1_layer}
 \subcaption{} \label{fig:contrastive_vs_reconstruction}
\end{subfigure}

latexml raises the error:

Warning:expected:register The control sequence \c@subsubfigure is not a register at experiments.tex; line 114 col 33
Warning:undefined:subsubfigure Counter 'subsubfigure' was not defined; assuming 0 at experiments.tex; line 114 col 33
Warning:expected:register The control sequence \c@subsubfigure is not a register at experiments.tex; line 114 col 33
Error:undefined:\thesubsubfigure The token T_CS[\thesubsubfigure] is not defined. at experiments.tex; line 114 col 33
Error:undefined:\ext@subsubfigure The token T_CS[\ext@subsubfigure] is not defined. at experiments.tex; line 114 col 33

Once that is resolved, we should have this article fully fleshed out.

dginev commented 1 year ago

minimal self-contained example of the error:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
   \centering
   \begin{subfigure}[t]{0.49\textwidth}
       \centering
       \includegraphics[width=0.74\textwidth]{example-image-a}
       \subcaption{} \label{fig:a}
   \end{subfigure}
   \begin{subfigure}[t]{0.49\textwidth}
       \centering
       \includegraphics[width=0.74\textwidth]{example-image-b}
       \subcaption{}\label{fig:b}
   \end{subfigure}
   \caption{Test}
\end{figure}
\end{document}
dginev commented 6 months ago

Updated with LaTeXML v0.8.8 and the reported issues are now resolved.

The article still has some remaining errors, with the XML construction for listings, but they seem unrelated. I will close here, but feel free to open more issues as you spot them.