* Latex to HTML: figure environment ignored if not used with images @ 2020-09-17 13:36 Quentin Stievenart [not found] ` <9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Quentin Stievenart @ 2020-09-17 13:36 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1353 bytes --] Hi all, I am trying to compile the following latex pattern to HTML using pandoc. This is a figure environment that does not contain any graphics inside, but only text (or typically, it contains maths in an align environment): \begin{figure}[h] \caption{Figure caption} \label{fig:figure} foo \end{figure} However, the output from pandoc is the following (taken from pandoc.org/try): <p>foo</p> While I would expect it to be: <div id="fig:figure"><figure><caption>Figure caption</caption><p>foo</p></figure></div> The same happens with a table environment that contains no tabular environment inside. What would be the most effective way to achieve this? I have a long document full of this pattern, and if an automated way of doing this would not be possible, I would rather change the tex file than fiddle with the html output (especially given that the caption information is not preserved). Thanks in advance, Quentin -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 2305 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Latex to HTML: figure environment ignored if not used with images [not found] ` <9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2020-09-17 17:56 ` John MacFarlane [not found] ` <m21rj0jnh4.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: John MacFarlane @ 2020-09-17 17:56 UTC (permalink / raw) To: Quentin Stievenart, pandoc-discuss Pandoc doesn't currently have a generic figure element that can hold non-image content. There are some issues on the tracker requesting such a thing, and it will happen eventually. You're probably right that in the short term parsing this in a Div would make sense. You can requset that on the tracker. Quentin Stievenart <quentin.stievenart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > Hi all, > > I am trying to compile the following latex pattern to HTML using pandoc. > This is a figure environment that does not contain any graphics inside, but > only text (or typically, it contains maths in an align environment): > > \begin{figure}[h] > \caption{Figure caption} > \label{fig:figure} > foo > \end{figure} > > However, the output from pandoc is the following (taken from > pandoc.org/try): > > <p>foo</p> > > While I would expect it to be: > > <div id="fig:figure"><figure><caption>Figure > caption</caption><p>foo</p></figure></div> > > The same happens with a table environment that contains no tabular > environment inside. > What would be the most effective way to achieve this? I have a long > document full of this pattern, and if an automated way of doing this would > not be possible, I would rather change the tex file than fiddle with the > html output (especially given that the caption information is not > preserved). > > Thanks in advance, > Quentin > > -- > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n%40googlegroups.com. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <m21rj0jnh4.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>]
* Re: Latex to HTML: figure environment ignored if not used with images [not found] ` <m21rj0jnh4.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> @ 2020-09-17 21:11 ` Quentin Stievenart 0 siblings, 0 replies; 3+ messages in thread From: Quentin Stievenart @ 2020-09-17 21:11 UTC (permalink / raw) To: John MacFarlane; +Cc: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 2531 bytes --] Thank you for your reply. I will have a look through the existing issues. Best regards, Quentin On Thu, 17 Sep 2020 at 19:57, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote: > > Pandoc doesn't currently have a generic figure element that > can hold non-image content. There are some issues on the > tracker requesting such a thing, and it will happen eventually. > > You're probably right that in the short term parsing this > in a Div would make sense. You can requset that on the > tracker. > > > Quentin Stievenart <quentin.stievenart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > Hi all, > > > > I am trying to compile the following latex pattern to HTML using pandoc. > > This is a figure environment that does not contain any graphics inside, > but > > only text (or typically, it contains maths in an align environment): > > > > \begin{figure}[h] > > \caption{Figure caption} > > \label{fig:figure} > > foo > > \end{figure} > > > > However, the output from pandoc is the following (taken from > > pandoc.org/try): > > > > <p>foo</p> > > > > While I would expect it to be: > > > > <div id="fig:figure"><figure><caption>Figure > > caption</caption><p>foo</p></figure></div> > > > > The same happens with a table environment that contains no tabular > > environment inside. > > What would be the most effective way to achieve this? I have a long > > document full of this pattern, and if an automated way of doing this > would > > not be possible, I would rather change the tex file than fiddle with the > > html output (especially given that the caption information is not > > preserved). > > > > Thanks in advance, > > Quentin > > > > -- > > You received this message because you are subscribed to the Google > Groups "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n%40googlegroups.com > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CACVumjBqHtyC8h511Via7LoPi3XMf_JktkDtg1mTVO76PuK_nA%40mail.gmail.com. [-- Attachment #2: Type: text/html, Size: 3952 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-17 21:11 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-17 13:36 Latex to HTML: figure environment ignored if not used with images Quentin Stievenart [not found] ` <9f1df45d-50ad-47fe-a7f0-7ad2a0b72449n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2020-09-17 17:56 ` John MacFarlane [not found] ` <m21rj0jnh4.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org> 2020-09-17 21:11 ` Quentin Stievenart
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).