Ability to show header numbers in Preview

Glenn H.'s Avatar

Glenn H.

24 Feb, 2013 06:38 PM

Great program. Is it (or could it be made) possible to show header numbers in the preview. When running mmd from the command line, one has the -N option for this. I'd love to be able to see that effect in the preview. Thanks.

  1. Support Staff 1 Posted by Fletcher on 24 Feb, 2013 07:06 PM

    Fletcher's Avatar

    I'm afraid you have me at a loss. I'm not familiar with the "-N" option in my software.


  2. 2 Posted by Glenn H. on 25 Feb, 2013 03:10 AM

    Glenn H.'s Avatar

    Well, that would be senility on my part. The "-N" option is part of Pandoc. I use both pandoc and MMD (increasing MMD because of MMD Composer) and mis-remembered which the "-N" went with. Sorry about that.

    I did, however, figure out my question. This is probably obvious to anyone who does CSS, but it wasn't to me. Following the example from http://www.w3.org/TR/CSS21/generate.html#counters, I added the following to the css="..." section of my favorite style:

    H1:before {content: counter(chapter) \". \"; counter-increment: chapter;} H1 {counter-reset: section;} H2:before {content: counter(chapter) \".\" counter(section) \" \"; counter-increment: section;}

    I also had to add "counter-reset: chapter;" to the body tag within the css block.

    Again, probably obvious to the non-clueless. Great program and thanks for the quick response to my confusing question.

  3. Support Staff 3 Posted by Fletcher on 27 Feb, 2013 12:48 AM

    Fletcher's Avatar

    You found the solution I would recommend. CSS is pretty powerful (esp. CSS 3), and perfect for this sort of thing.

  4. Fletcher closed this discussion on 27 Feb, 2013 12:48 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac