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

Automatic numbering of figures and tables in HTML output #615

Closed
nichtich opened this issue Sep 18, 2012 · 7 comments
Closed

Automatic numbering of figures and tables in HTML output #615

nichtich opened this issue Sep 18, 2012 · 7 comments

Comments

@nichtich
Copy link
Contributor

Pandoc supports numbering of section headings in LaTeX and HTML output with option -N, --number-sections. Figures and tables are only numbered in LaTeX (because this is default in LaTeX). There should be options to add automatic numbering of figures and tables (--number-tables/--number-figures?) also in HTML output like this:

<span class="figurename">Fig. 1</span> Caption
<span class="tablename">Table 1</span> Caption

The prefix could be modified by a template variable that also works in LaTeX:

\renewcommand{\figurename}{$figurename$}
\renewcommand{\tablename}{$tablename$}

A dot or colon can be added after the figurename/tablename with CSS, so no addition template magic is needed, for instance:

.figurename:after { content: ":"; }

By the way this was already asked in this thread

@shrutikapoor08
Copy link

Hey, have you been able to get a solution to this issue?

@nichtich
Copy link
Contributor Author

No, I think this would require to modify Pandoc - I have not digged into Haskell yet.

@sjackman
Copy link

👍

1 similar comment
@novelistparty
Copy link

👍

@aleb
Copy link

aleb commented Apr 18, 2018

Automatic numbering of figures is already possible with the implicit_figures extension: https://pandoc.org/MANUAL.html#extension-implicit_figures

@jgm
Copy link
Owner

jgm commented Apr 18, 2018 via email

@mb21
Copy link
Collaborator

mb21 commented Feb 2, 2019

Closing in favour of #813

In the meantime, you can do this with a filter or possibly CSS counters.

@mb21 mb21 closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants