pandoc icon indicating copy to clipboard operation
pandoc copied to clipboard

Implement figure numbering for HTML output

Open bgamari opened this issue 11 years ago • 4 comments

This is a first attempt at implementing a --number-figures option for HTML output (https://github.com/jgm/pandoc/issues/615). This is a first step towards allowing figure references within a document (#813).

There are a few questions that remain outstanding,

  1. How should other writers (especially the LaTeX writer, which already implements figure numbering) treat this option
  2. What form should the figure number take (e.g. a global counter for the entire document, as this implements, or just within the current (sub?)section
  3. How should the figure number be rendered? Currently it's placed in a <span class="figure-number">
  4. How much control over the above should the user be given?
  5. Should we support numerical offsets like we do with section numbers?
  6. Needs to be extended for table numbering once the above issues have been sorted

bgamari avatar May 14 '14 17:05 bgamari

There is currently work being done to replace the current representation of figures with a new block level element. There is currently discussion about how is best to do this here. This probably won't break your changes too much but should be something to keep in mind.

mpickering avatar May 15 '14 11:05 mpickering

@mpickering, thanks for the heads up! Many of the issues discussed in that thread are quite relevant to other work I've been interested in doing (e.g. adding anchors)

bgamari avatar May 15 '14 14:05 bgamari

What should happen with this? If there are no objections this should be ready to go.

bgamari avatar Aug 19 '14 14:08 bgamari

I'm reluctant to merge this at this point, because I want to think more about a good general strategy for dealing with figures, numbering, and cross-referencing.

jgm avatar Aug 19 '14 16:08 jgm