chiark / gitweb /
doc: various minor improvements.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 12 Sep 2019 19:29:03 +0000 (21:29 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 12 Sep 2019 19:29:03 +0000 (21:29 +0200)
doc/css/themes.rst
doc/documentation/doxygen.rst
doc/documentation/python.rst

index b3bdb40473db7e03ab6bc483bc7b9a3d9e207012..50159dd1ec0d7485cef2f14be8abf58932a3942e 100644 (file)
@@ -70,6 +70,7 @@ markup including theme color (used for example by Vivaldi or Android browser)
 is below:
 
 .. code:: html
+    :class: m-console-wrap
 
     <link rel="stylesheet" href="m-dark.css" /> <!-- or m-dark.compiled.css -->
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?Source+Sans+Pro:400,400i,600,600i%7Cfamily=Source+Code+Pro:400,400i,600" />
@@ -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
 
     <link rel="stylesheet" href="m-light.css" /> <!-- or m-light.compiled.css -->
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700,700i%7CSource+Code+Pro:400,400i,600" />
@@ -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
index fb11e35a42321ff7540b051e5dcebf91b4ed3a7b..95e2c0c03ddea0475dde61107bf5e39b5bcb6d79 100644 (file)
@@ -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 \
index 93f8068bf5be882851ddd3f3192779d2fa678fea..ad4abcc5ff578750ea184e652998d7fa63d2080a 100644 (file)
@@ -44,6 +44,8 @@ Python docs
     :language: js
 .. role:: py(code)
     :language: py
+.. role:: rst(code)
+    :language: rst
 
 .. |wink| replace:: 😉