public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Number tables like figures when converting from LaTeX?
@ 2020-02-11  5:59 John Salamon
       [not found] ` <cff01bf0-8c91-4f8c-a76d-7d070047513a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John Salamon @ 2020-02-11  5:59 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1504 bytes --]

Hello,

I am trying to convert from LaTeX to both HTML and docx, both of which 
result in the same thing happening. It seems that while figure references 
are automatically numbered, tables aren't. (I'm using pandoc 2.8)

With the input below as an example:

This reference to Table \ref{tbl:label} doesn't work.
\begin{table}
        \caption{This caption has no number.}\label{tbl:label}
        \begin{tabular}{ l c r }
          1 & 2 & 3 \\
          4 & 5 & 6 \\
          7 & 8 & 9 \\
        \end{tabular}
\end{table}

This reference to Figure \ref{fig:label} works fine.
\begin{figure}
        \includegraphics[width=\textwidth]{example-image-a}
        \caption{A numbered caption, if I use 
pandoc-crossref.}\label{fig:label}
\end{figure}


The table reference just becomes a hyperlink displaying the label like: 
[tbl:label], whereas the figure reference is numbered.
If I use the pandoc-crossref filter, the figure captions are numbered while 
table captions aren't.
Is there some option I'm missing that will make the table references behave 
the same as the figures?

Best,
John

-- 
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/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3117 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Number tables like figures when converting from LaTeX?
       [not found] ` <cff01bf0-8c91-4f8c-a76d-7d070047513a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-02-11 11:57   ` BPJ
       [not found]     ` <CADAJKhDLFaQp=80nL1bQi-zRaoer-jpF1XCw=tR7SYxCFX__BQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2020-02-11 17:43   ` John MacFarlane
  1 sibling, 1 reply; 4+ messages in thread
From: BPJ @ 2020-02-11 11:57 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]

Maybe Pandoc should make the label an id on the image element so that
filters or writers can do something intelligent with them, orhave an
option/extension to do so?  I'm afraid that it would take a change to the
LaTeX reader to implement this, so no quick fix.


Den tis 11 feb. 2020 07:00John Salamon <salamonj9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Hello,
>
> I am trying to convert from LaTeX to both HTML and docx, both of which
> result in the same thing happening. It seems that while figure references
> are automatically numbered, tables aren't. (I'm using pandoc 2.8)
>
> With the input below as an example:
>
> This reference to Table \ref{tbl:label} doesn't work.
> \begin{table}
>         \caption{This caption has no number.}\label{tbl:label}
>         \begin{tabular}{ l c r }
>           1 & 2 & 3 \\
>           4 & 5 & 6 \\
>           7 & 8 & 9 \\
>         \end{tabular}
> \end{table}
>
> This reference to Figure \ref{fig:label} works fine.
> \begin{figure}
>         \includegraphics[width=\textwidth]{example-image-a}
>         \caption{A numbered caption, if I use
> pandoc-crossref.}\label{fig:label}
> \end{figure}
>
>
> The table reference just becomes a hyperlink displaying the label like:
> [tbl:label], whereas the figure reference is numbered.
> If I use the pandoc-crossref filter, the figure captions are numbered
> while table captions aren't.
> Is there some option I'm missing that will make the table references
> behave the same as the figures?
>
> Best,
> John
>
> --
> 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/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhDLFaQp%3D80nL1bQi-zRaoer-jpF1XCw%3DtR7SYxCFX__BQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4156 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Number tables like figures when converting from LaTeX?
       [not found]     ` <CADAJKhDLFaQp=80nL1bQi-zRaoer-jpF1XCw=tR7SYxCFX__BQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-02-11 12:01       ` BPJ
  0 siblings, 0 replies; 4+ messages in thread
From: BPJ @ 2020-02-11 12:01 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2811 bytes --]

Sorry I got confused, you meant tables. In the same vein Pandoc could wrap
tables in a div with the label as id. That's probably a big change though.


Den tis 11 feb. 2020 12:57BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Maybe Pandoc should make the label an id on the image element so that
> filters or writers can do something intelligent with them, orhave an
> option/extension to do so?  I'm afraid that it would take a change to the
> LaTeX reader to implement this, so no quick fix.
>
>
> Den tis 11 feb. 2020 07:00John Salamon <salamonj9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> Hello,
>>
>> I am trying to convert from LaTeX to both HTML and docx, both of which
>> result in the same thing happening. It seems that while figure references
>> are automatically numbered, tables aren't. (I'm using pandoc 2.8)
>>
>> With the input below as an example:
>>
>> This reference to Table \ref{tbl:label} doesn't work.
>> \begin{table}
>>         \caption{This caption has no number.}\label{tbl:label}
>>         \begin{tabular}{ l c r }
>>           1 & 2 & 3 \\
>>           4 & 5 & 6 \\
>>           7 & 8 & 9 \\
>>         \end{tabular}
>> \end{table}
>>
>> This reference to Figure \ref{fig:label} works fine.
>> \begin{figure}
>>         \includegraphics[width=\textwidth]{example-image-a}
>>         \caption{A numbered caption, if I use
>> pandoc-crossref.}\label{fig:label}
>> \end{figure}
>>
>>
>> The table reference just becomes a hyperlink displaying the label like:
>> [tbl:label], whereas the figure reference is numbered.
>> If I use the pandoc-crossref filter, the figure captions are numbered
>> while table captions aren't.
>> Is there some option I'm missing that will make the table references
>> behave the same as the figures?
>>
>> Best,
>> John
>>
>> --
>> 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/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CADAJKhDEBLxkTCuBZ4zaSmicS1CVhhWQNJnzP-HW6vG1mXtK6g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4737 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Number tables like figures when converting from LaTeX?
       [not found] ` <cff01bf0-8c91-4f8c-a76d-7d070047513a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-02-11 11:57   ` BPJ
@ 2020-02-11 17:43   ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2020-02-11 17:43 UTC (permalink / raw)
  To: John Salamon, pandoc-discuss


This is inconsistent.  Why don't you submit a bug on our
tracker at https://github.com/jgm.  I agree that tables
should do the same thing as figures here, and we can make
that happen.

John Salamon <salamonj9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hello,
>
> I am trying to convert from LaTeX to both HTML and docx, both of which 
> result in the same thing happening. It seems that while figure references 
> are automatically numbered, tables aren't. (I'm using pandoc 2.8)
>
> With the input below as an example:
>
> This reference to Table \ref{tbl:label} doesn't work.
> \begin{table}
>         \caption{This caption has no number.}\label{tbl:label}
>         \begin{tabular}{ l c r }
>           1 & 2 & 3 \\
>           4 & 5 & 6 \\
>           7 & 8 & 9 \\
>         \end{tabular}
> \end{table}
>
> This reference to Figure \ref{fig:label} works fine.
> \begin{figure}
>         \includegraphics[width=\textwidth]{example-image-a}
>         \caption{A numbered caption, if I use 
> pandoc-crossref.}\label{fig:label}
> \end{figure}
>
>
> The table reference just becomes a hyperlink displaying the label like: 
> [tbl:label], whereas the figure reference is numbered.
> If I use the pandoc-crossref filter, the figure captions are numbered while 
> table captions aren't.
> Is there some option I'm missing that will make the table references behave 
> the same as the figures?
>
> Best,
> John
>
> -- 
> 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/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-11 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11  5:59 Number tables like figures when converting from LaTeX? John Salamon
     [not found] ` <cff01bf0-8c91-4f8c-a76d-7d070047513a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-02-11 11:57   ` BPJ
     [not found]     ` <CADAJKhDLFaQp=80nL1bQi-zRaoer-jpF1XCw=tR7SYxCFX__BQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-11 12:01       ` BPJ
2020-02-11 17:43   ` John MacFarlane

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).