From 23ab5ffcb0b708e4f07cafd7a877926ce0dc532b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 10 Jan 2013 20:22:18 -0800 Subject: 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} --- README | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'README') diff --git a/README b/README index e88ce0a57..2b0da269b 100644 --- a/README +++ b/README @@ -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. -- cgit v1.2.3