diff options
author | mb21 <mb21@users.noreply.github.com> | 2017-12-29 15:55:08 +0100 |
---|---|---|
committer | mb21 <mb21@users.noreply.github.com> | 2017-12-29 15:55:08 +0100 |
commit | 579e32408c34ffaf17fd57a76a6b84b11f763ec1 (patch) | |
tree | 38ed8e42d5353b3b8057b3e305fd2bd1ae7ac681 | |
parent | 9cba3d22c42afc279f895bd68e8f5fa1ca910092 (diff) | |
download | pandoc-579e32408c34ffaf17fd57a76a6b84b11f763ec1.tar.gz |
MANUAL.txt move fenced_divs down to bracketed_spans
-rw-r--r-- | MANUAL.txt | 91 |
1 files changed, 49 insertions, 42 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 4e33be2a0..566629f8f 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -3312,45 +3312,6 @@ For the most part this should give the same output as `raw_html`, but it makes it easier to write pandoc filters to manipulate groups of inlines. -#### Extension: `fenced_divs` #### - -Allow special fenced syntax for native `Div` blocks. A Div -starts with a fence containing at least three consecutive -colons plus some attributes. The attributes may optionally -be followed by another string of consecutive colons. -The attribute syntax is exactly as in fenced code blocks (see -[Extension: `fenced_code_attributes`]). As with fenced -code blocks, one can use either attributes in curly braces -or a single unbraced word, which will be treated as a class -name. The Div ends with another line containing a string of at -least three consecutive colons. The fenced Div should be -separated by blank lines from preceding and following blocks. - -Example: - - ::::: {#special .sidebar} - Here is a paragraph. - - And another. - ::::: - -Fenced divs can be nested. Opening fences are distinguished -because they *must* have attributes: - - ::: Warning :::::: - This is a warning. - - ::: Danger - This is a warning within a warning. - ::: - :::::::::::::::::: - -Fences without attributes are always closing fences. Unlike -with fenced code blocks, the number of colons in the closing -fence need not match the number in the opening fence. However, -it can be helpful for visual clarity to use fences of different -lengths to distinguish nested divs from their parents. - #### Extension: `raw_tex` #### In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be @@ -3612,13 +3573,59 @@ For example: is to look at the image resolution and the dpi metadata embedded in the image file. -Spans ------ +Divs and Spans +-------------- + +Using the `native_divs` and `native_spans` extensions +(see [above][Extension: `native_divs`]), HTML syntax can +be used as part of markdown to create native `Div` and `Span` +elements in the pandoc AST (as opposed to raw HTML). +However, there is also nicer syntax available: + +#### Extension: `fenced_divs` #### + +Allow special fenced syntax for native `Div` blocks. A Div +starts with a fence containing at least three consecutive +colons plus some attributes. The attributes may optionally +be followed by another string of consecutive colons. +The attribute syntax is exactly as in fenced code blocks (see +[Extension: `fenced_code_attributes`]). As with fenced +code blocks, one can use either attributes in curly braces +or a single unbraced word, which will be treated as a class +name. The Div ends with another line containing a string of at +least three consecutive colons. The fenced Div should be +separated by blank lines from preceding and following blocks. + +Example: + + ::::: {#special .sidebar} + Here is a paragraph. + + And another. + ::::: + +Fenced divs can be nested. Opening fences are distinguished +because they *must* have attributes: + + ::: Warning :::::: + This is a warning. + + ::: Danger + This is a warning within a warning. + ::: + :::::::::::::::::: + +Fences without attributes are always closing fences. Unlike +with fenced code blocks, the number of colons in the closing +fence need not match the number in the opening fence. However, +it can be helpful for visual clarity to use fences of different +lengths to distinguish nested divs from their parents. + #### Extension: `bracketed_spans` #### A bracketed sequence of inlines, as one would use to begin -a link, will be treated as a span with attributes if it is +a link, will be treated as a `Span` with attributes if it is followed immediately by attributes: [This is *some text*]{.class key="val"} |