diff options
-rw-r--r-- | doc/source-highlight-filter.txt | 5 | ||||
-rw-r--r-- | filters/source/source-highlight-filter.conf | 2 | ||||
-rw-r--r-- | html5.conf | 12 | ||||
-rw-r--r-- | slidy.conf | 12 | ||||
-rw-r--r-- | xhtml11.conf | 12 |
5 files changed, 42 insertions, 1 deletions
diff --git a/doc/source-highlight-filter.txt b/doc/source-highlight-filter.txt index 74b4105..12ce688 100644 --- a/doc/source-highlight-filter.txt +++ b/doc/source-highlight-filter.txt @@ -24,6 +24,11 @@ You have the choice of three HTML source code highlighters, your selection is determined by the 'source-highlighter' attribute (defaults to 'source-highlight'): +NOTE: Set the 'source-highlighter' attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time). + === GNU Source Highlight The default highlighter is the http://www.gnu.org/software/src-highlite/[GNU source-highlight] which diff --git a/filters/source/source-highlight-filter.conf b/filters/source/source-highlight-filter.conf index f11969b..8a4d343 100644 --- a/filters/source/source-highlight-filter.conf +++ b/filters/source/source-highlight-filter.conf @@ -65,7 +65,7 @@ endif::[] ifeval::["{source-highlighter}"=="pygments"] source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered"),filter="pygmentize -f html -l {language} {src_numbered?-O linenos=table} {encoding?-O encoding={encoding}} {args=}" endif::[] -# DEPRECTATED: 'pygments' attribute. +# DEPRECATED: 'pygments' attribute. ifdef::pygments[] source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered"),filter="pygmentize -f html -l {language} {src_numbered?-O linenos=table} {encoding?-O encoding={encoding}} {args=}" endif::[] @@ -544,7 +544,13 @@ bodydata=<td class="tableblock halign-{colalign=left}">|</td> {title%}<title>{doctitle=}</title> ifdef::linkcss[] <link rel="stylesheet" href="{stylesdir=.}/{theme=asciidoc}.css" type="text/css"> +ifeval::["{source-highlighter}"=="pygments"] +<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css"> +endif::[] + +# DEPRECATED: 'pygments' attribute. ifdef::pygments[<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css">] + ifdef::toc2[<link rel="stylesheet" href="{stylesdir=.}/toc2.css" type="text/css" />] <link rel="stylesheet" href="{stylesdir=.}/{stylesheet}" type="text/css"> endif::linkcss[] @@ -552,9 +558,15 @@ ifndef::linkcss[] <style type="text/css"> include1::{theme%}{stylesdir=./stylesheets}/asciidoc.css[] include1::{themedir}/{theme}.css[] +ifeval::["{source-highlighter}"=="pygments"] +include1::{stylesdir=./stylesheets}/pygments.css[] +endif::[] + +# DEPRECATED: 'pygments' attribute. ifdef::pygments[] include1::{stylesdir=./stylesheets}/pygments.css[] endif::pygments[] + ifdef::toc2[] include1::{stylesdir=./stylesheets}/toc2.css[] endif::toc2[] @@ -73,7 +73,13 @@ ifndef::copyright[<meta name="copyright" content="Copyright © {author}" />] ifdef::linkcss[] <link rel="stylesheet" href="{stylesdir=.}/{theme=asciidoc}.css" type="text/css" /> <link rel="stylesheet" href="{stylesdir=.}/slidy.css" type="text/css" /> +ifeval::["{source-highlighter}"=="pygments"] +<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css"> +endif::[] + +# DEPRECATED: 'pygments' attribute. ifdef::pygments[<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css" />] + <link rel="stylesheet" href="{stylesdir=.}/{stylesheet}" type="text/css" /> <script src="{scriptsdir=.}/slidy.js" charset="utf-8" type="text/javascript"></script> endif::linkcss[] @@ -82,9 +88,15 @@ ifndef::linkcss[] include1::{theme%}{stylesdir=./stylesheets}/asciidoc.css[] include1::{themedir}/{theme}.css[] include1::{stylesdir=./stylesheets}/slidy.css[] +ifeval::["{source-highlighter}"=="pygments"] +include1::{stylesdir=./stylesheets}/pygments.css[] +endif::[] + +# DEPRECATED: 'pygments' attribute. ifdef::pygments[] include1::{stylesdir=./stylesheets}/pygments.css[] endif::pygments[] + include1::{stylesheet}[] </style> <script type="text/javascript"> diff --git a/xhtml11.conf b/xhtml11.conf index c1ebb91..4c40b3f 100644 --- a/xhtml11.conf +++ b/xhtml11.conf @@ -537,7 +537,13 @@ ifdef::linkcss[] ifdef::quirks[] <link rel="stylesheet" href="{stylesdir=.}/xhtml11-quirks.css" type="text/css" /> endif::quirks[] +ifeval::["{source-highlighter}"=="pygments"] +<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css"> +endif::[] + +# DEPRECATED: 'pygments' attribute. ifdef::pygments[<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css" />] + ifdef::toc2[<link rel="stylesheet" href="{stylesdir=.}/toc2.css" type="text/css" />] <link rel="stylesheet" href="{stylesdir=.}/{stylesheet}" type="text/css" /> endif::linkcss[] @@ -548,9 +554,15 @@ include1::{themedir}/{theme}.css[] ifdef::quirks[] include1::{stylesdir=./stylesheets}/xhtml11-quirks.css[] endif::quirks[] +ifeval::["{source-highlighter}"=="pygments"] +include1::{stylesdir=./stylesheets}/pygments.css[] +endif::[] + +# DEPRECATED: 'pygments' attribute. ifdef::pygments[] include1::{stylesdir=./stylesheets}/pygments.css[] endif::pygments[] + ifdef::toc2[] include1::{stylesdir=./stylesheets}/toc2.css[] endif::toc2[] |