On 2016-08-22 16:27, Nicolas Goaziou wrote: > Done. Thank you. Works great; thanks! One small difficulty is that html export uses two separate counters for figures and listings, while LaTeX export calls both figures, and uses a single counter. This makes it tricky to reference figures in a way that works with both HTML and LaTeX: for HTML one needs to write "Figure [[fig:a]] shows x, Listing [[lst:b]] shows y" (which exports into "Figure 1 shows x, Listing 1 shows y", while for LaTeX one needs to write "Figure [[fig:a]] shows x, Figure [[lst:a]] shows y" (which exports into "Figure 1 shows x, Figure 2 shows y"). I don't know of an easy way to achieve this. Potential solutions: * Using a single counter in HTML, and calling listings "Figure"s, as in LaTeX * Using two counters in LaTeX as well, though this will require changes to existing Org documents, which is not ideal. * Introducing an org-mode equivalent of \autoref that would insert (and hyperlink, which would be nice) "Figure", "Listing", "Section", … as appropriate based on the link's target. Clément.