Skip to content

Latest commit

 

History

History
102 lines (63 loc) · 4.93 KB

File metadata and controls

102 lines (63 loc) · 4.93 KB

Pandoc Built-in Styles

pandoc v2.7.2 | v1.19.2

In this folder you'll find the standalone CSS stylesheets of pandoc eight built-in styles (syntax highlighting themes):

  1. breezedark.css
  2. espresso.css
  3. haddock.css
  4. kate.css
  5. monochrome.css
  6. pygments.css (default style)
  7. tango.css
  8. zenburn.css

The stylesheets were extracted from standalone HTML5 documents created with pandoc v2.7.2, using the --highlight-style option. A comment block with extra info was added at the beginning of each stylesheet.

They are intended as a examples and quick reference when developing custom styles (see License section below).

NOTE — pandoc v2.0.4 introduced some breaking changes in the way code is highlighted in html output. (For more info, see README in parent folder)

Pandoc v1 Styles

In the "/pandoc_v1/" folder you'll find the equivalent files for pandoc v1 — version 2 introduced some changes in syntax highlighting HTML tags and built-in CSS styles, so the old files are kept for projects that still require pandoc v1.x.

From pandoc v2.0 release notes:

The way highlighted code blocks are formatted in HTML has been changed (David Baynard), in ways that may require changes in hard-coded CSS affecting highlighting. (If you haven't included hard-coded highlighting CSS in your template, you needn't change anything.)

Most notably, line-numbered code dosen't use HTML tables anymore.

About The Styles

Color Themes Inspiration

Some info about the original themes these pandoc styles are based on (info taken from skylighting source code and further research).

  • breezedark — Style from the "Breeze Dark" KDE syntax highlighting theme.
  • espresso — Style based on ultraviolet → "espresso_libre.css" (dark background)
  • haddock — Style based on Haddock's source highlighting.
  • kate — Style based on Kate's default colors.
  • monochrome — Style with no colors.
  • pygments — Style based on Pygmentsdefault colors.
  • tango — Style based on Pygments → "tango" colors.
  • zenburn — Style based on the popular "Zenburn" Vim color scheme.

License

  • LICENSE — Pandoc license file.
  • GPL-2.0 — GNU-GPL v2 license file.

Pandoc built-in styles are dynamically generated by the skylighting library — ie: the actual CSS stylesheets are not present in pandoc nor skylighting source code, but are generated programmatically from a set a hardcoded values. The code that generates them can be seen here:

The CSS stylesheets of the syntax styles (aka "themes") fall under the same license governing pandoc: GPL v2 (or greater).

Pandoc built-in default templates are maintained on a repository of their own, and they are dual-licensed — under both the GPL (v2 or higher, same as pandoc) and the BSD 3-clause ("New" or "Revised") license:

Even though pandoc templates are dual licensed, the actual CSS styles are not part of the HTML4/HTML5 templates, they are dynamically generated by pandoc and injected into the template when the following is encounterd:

$if(highlighting-css)$
  <style type="text/css">
$highlighting-css$
  </style>
$endif$

It's therefore safer to assume that the introduction of the built-in CSS stylesheets in a template or a final document excludes the BSD 3-clause license option, leaving as the only viable choice the GPL v2 (or greater) license which is common to both templates and stylesheets.