Skip to content
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

Issues when converting "*.tex" to "*.html" #97

Open
Slookeur opened this issue Feb 20, 2022 · 0 comments
Open

Issues when converting "*.tex" to "*.html" #97

Slookeur opened this issue Feb 20, 2022 · 0 comments

Comments

@Slookeur
Copy link

Slookeur commented Feb 20, 2022

Dear @tomduck ,
first of all thank you for your pandoc-xnos tools.
I am in the process of converting a tex document to html, and I am facing several issues with figures caption and numbering,
however I must confess that I am not sure that this is the most appropriate place to report them, although in that case I am
pretty sure that you could point me towards the appropriate direction ;-)
So I tried to convert my tex file using:

pandoc --filter pandoc-xnos --mathjax manual.tex --bibliography full-biblio.bib --wrap=none --default-image-extension=png -o manual.html

Then I face 2 issues:

  1. Figure ref are found and number in the document, only and only if, the reference appears after that the figure was inserted, note in the HTML data the [my_img] in the first example and the [1.0] in the second one:
Figure \ref{my_img} presents some information.

\begin{figure}[!h]
\hypertarget{my_img}{
\begin{center}
\includegraphics*[width=23cm, keepaspectratio=true]{my-image}
\caption{My legend}\label{overview}
\end{center}}
\end{figure}

Is converted in:

<p>[Fig. <a href="#my_img" data-reference-type="ref" data-reference="my_img">my_img</a>-a] presents some information.</p>

<div id="my_img">
<div align="center">
<figure>
<img src="my-image.png" id="overview" style="width:23cm" alt="My legend" />
<figcaption aria-hidden="true">My legend</figcaption>
</figure>
</div>
</div>

Whereas:

\begin{figure}[!h]
\hypertarget{my_img}{
\begin{center}
\includegraphics*[width=23cm, keepaspectratio=true]{my-image}
\caption{My legend}\label{overview}
\end{center}}
\end{figure}

Figure \ref{my_img} presents some information.

Is converted in:

<div id="my_img">
<div align="center">
<figure>
<img src="my-image.png" id="overview" style="width:23cm" alt="My legend" />
<figcaption aria-hidden="true">My legend</figcaption>
</figure>
</div>
</div>

<p>[Fig. <a href="#my_img" data-reference-type="ref" data-reference="my_img">1.0</a>-a] presents some information.</p>
  1. The caption never show numbers, actually the beginning part of the caption, that should be "Figure #num:" (or something close) is always missing (just see above).

Thanks in advance for your help.
Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant