diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-10 20:22:18 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-10 20:32:53 -0800 |
commit | 23ab5ffcb0b708e4f07cafd7a877926ce0dc532b (patch) | |
tree | 04cf0620b15e647837e7d1b268386365f878a569 /README | |
parent | 1a7686ad79b302b789c8c1038d9b5294b27a3743 (diff) | |
download | pandoc-23ab5ffcb0b708e4f07cafd7a877926ce0dc532b.tar.gz |
Implemented Ext_header_attributes.
This allows explicit attributes to be put on headers, using
a syntax like that for code blocks:
{#id .class .class k=v k=v}
Diffstat (limited to 'README')
-rw-r--r-- | README | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -872,10 +872,31 @@ wrapping). Consider, for example: ### Header identifiers in HTML, LaTeX, and ConTeXt ### -**Extension: `header_identifiers`** +**Extension: `header_attributes`** -Each header element in pandoc's HTML and ConTeXt output is given a -unique identifier. This identifier is based on the text of the header. +Headers can be assigned attributes using this syntax at the end +of the line containing the header text: + + {#identifier .class .class key=value key=value} + +Although this syntax allows assignment of classes and key/value attributes, +only identifiers currently have any affect in the writers (and only in some +writers: HTML, LaTeX, ConTeXt, Textile, AsciiDoc). Thus, for example, +the following headers will all be assigned the identifier `foo`: + + # My header {#foo} + + ## My header ## {#foo} + + My other header {#foo} + --------------- + +(This syntax is compatible with [PHP Markdown Extra].) + +**Extension: `auto_identifiers`** + +A header without an explicitly specified identifier will be +automatically assigned a unique identifier based on the header text. To derive the identifier from the header text, - Remove all formatting, links, etc. |