asciidoctor / brackets-asciidoc-preview

Live Preview of AsciiDoc for Adobe Brackets
MIT License
51 stars 16 forks source link

Section numbering and listing numbering #29

Closed stallio closed 8 years ago

stallio commented 8 years ago

I can't figure out how to turn on section numbering in the preview window. Neither :sectnums: nor :numbered: seem to work. (If I then save the HTML output and view in a browser, section numbers are visible there, just not in the preview window.)

Also I want to number listings, and the only way I've figured out to do it is to set :listing-caption: which seems like a weird way to do it. This may be a separate issue from the section numbering though, as there doesn't seem to be a :listingnums: or similar attribute to turn listing numbers on/off.

nerk commented 8 years ago

Numbering is overridden by the preview's settings dialog for convenience reasons. Click the gear symbol and select the 'View' tab. From there you can check the corresponding check box.

Regarding listings:

The highlighter used by the preview is highlight.js. Unfortunately, it does not provide an option for line numbering. You could try setting

:source-highlighter: prettify

in your document, but the rendered output does not look really good right now.