diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-05-26 12:00:35 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-05-26 12:00:35 -0700 |
commit | 8c99bc83574b0b4372caf1acd5b83b248c8634ea (patch) | |
tree | 28b8410b902d3bf75d957fb0fd97b214d88d8074 /README | |
parent | d5f367d04b9b7830ead3e3298aafe3987e55c697 (diff) | |
download | pandoc-8c99bc83574b0b4372caf1acd5b83b248c8634ea.tar.gz |
README: Better documentation of syntax highlighting.
See #1318.
Diffstat (limited to 'README')
-rw-r--r-- | README | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -449,7 +449,8 @@ General writer options : Specifies the coloring style to be used in highlighted source code. Options are `pygments` (the default), `kate`, `monochrome`, - `espresso`, `zenburn`, `haddock`, and `tango`. + `espresso`, `zenburn`, `haddock`, and `tango`. For more information + on syntax highlighting in pandoc, see [Syntax highlighting], below. `-H` *FILE*, `--include-in-header=`*FILE* @@ -1422,6 +1423,8 @@ word. To prevent all highlighting, use the `--no-highlight` flag. To set the highlighting style, use `--highlight-style`. +For more information on highlighting, see [Syntax highlighting], +below. Line blocks ----------- @@ -3312,6 +3315,24 @@ ordinary HTML (without bird tracks). writes HTML with the Haskell code in bird tracks, so it can be copied and pasted as literate Haskell source. +Syntax highlighting +=================== + +Pandoc will automatically highlight syntax in fenced code blocks that +are marked with a language name. (See [Extension: +`inline_code_attributes`] and [Extension: `fenced_code_attributes`], +above.) The Haskell library [highlighting-kate] is used for +highlighting, which works in HTML, Docx, and LaTeX/PDF output. +The color scheme can be selected using the `--highlight-style` option. +The default color scheme is `pygments`, which imitates the default color +scheme used by the Python library pygments, but pygments is not actually +used to do the highlighting. + +To see a list of language names that pandoc will recognize, type +`pandoc --version`. + +To disable highlighting, use the `--no-highlight` option. + Custom writers ============== @@ -3499,3 +3520,4 @@ Wikiwide. [EPUBspine]: http://www.idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem [KaTeX]: https://github.com/Khan/KaTeX [CommonMark]: http://commonmark.org +[highlighting-kate]: http://github.com/jgm/highlighting-kate |