From 34503bc1ed8e1bf5da22af3d326d56f3397d2bd2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 12 Sep 2019 21:29:03 +0200 Subject: [PATCH] doc: various minor improvements. --- doc/css/themes.rst | 15 +++++++++++++++ doc/documentation/doxygen.rst | 3 +++ doc/documentation/python.rst | 2 ++ 3 files changed, 20 insertions(+) diff --git a/doc/css/themes.rst b/doc/css/themes.rst index b3bdb404..50159dd1 100644 --- a/doc/css/themes.rst +++ b/doc/css/themes.rst @@ -70,6 +70,7 @@ markup including theme color (used for example by Vivaldi or Android browser) is below: .. code:: html + :class: m-console-wrap @@ -87,6 +88,7 @@ The light theme is contained in the `m-light.css <{filename}/css.rst>`_ (or (used for pre-formatted text and code). .. code:: html + :class: m-console-wrap @@ -120,6 +122,9 @@ together and it will create a ``*.compiled.css`` file in the same directory: cd css ./postprocess.py m-dark.css # Creates a m-dark.compiled.css file +`Modifying the Pygments higlighting style`_ +------------------------------------------- + If you want to modify the Pygments style, it's a bit more involved. You need to edit the ``*.py`` file instead of the ``*.css``: @@ -137,6 +142,16 @@ then generate a CSS file out of it: sudo cp pygments-console.py /usr/lib/python3.6/site-packages/pygments/styles/console.py pygmentize -f html -S console -a .m-console > pygments-console.css +Alternatively, you can use any of the builtin styles --- pick the one you like +at http://pygments.org/demo/ and then tell ``pygmentize`` to generate a CSS for +it. For example, for the ``pastie`` style. Note that you might want to remove +the first two lines of the resulting CSS (setting :css:`background-color`) as +those would in most cases conflict with the style in m.css. + +.. code:: sh + + pygmentize -f html -S pastie -a .m-code > pygments-pastie.css + .. note-success:: Made a theme and want to share it with the world? I'm happy to diff --git a/doc/documentation/doxygen.rst b/doc/documentation/doxygen.rst index fb11e35a..95e2c0c0 100644 --- a/doc/documentation/doxygen.rst +++ b/doc/documentation/doxygen.rst @@ -417,6 +417,7 @@ with documentation-theme-specific additions is used, which corresponds to the following configuration: .. code:: ini + :class: m-console-wrap HTML_EXTRA_STYLESHEET = \ https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600 \ @@ -430,6 +431,7 @@ the documentation-theme-specific additions so you can reuse the already cached ``m-dark.compiled.css`` file from your main site: .. code:: ini + :class: m-console-wrap HTML_EXTRA_STYLESHEET = \ https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600 \ @@ -443,6 +445,7 @@ instead, use the following configuration (and, similarly, you can use in place of ``m-light+documentation.compiled.css``: .. code:: ini + :class: m-console-wrap HTML_EXTRA_STYLESHEET = \ https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700,700i%7CSource+Code+Pro:400,400i,600 \ diff --git a/doc/documentation/python.rst b/doc/documentation/python.rst index 93f8068b..ad4abcc5 100644 --- a/doc/documentation/python.rst +++ b/doc/documentation/python.rst @@ -44,6 +44,8 @@ Python docs :language: js .. role:: py(code) :language: py +.. role:: rst(code) + :language: rst .. |wink| replace:: 😉 -- 2.30.2