From ed9c84028c4d41e20d99374e86f83cad7318e9e4 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 12 Mar 2023 19:08:24 +0100 Subject: [PATCH 1/2] Update conf.py Adding code to read the prolog file.. --- doc/conf.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 5c40f63..11383b1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -64,6 +64,19 @@ numfig = True +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "manni" + +# -- Restructured Text settings ---------------------------------------------------------------------------------------- +prologPath = "prolog.inc" +try: + with open(prologPath, "r") as prologFile: + rst_prolog = prologFile.read() +except Exception as ex: + print(f"[ERROR:] While reading '{prologPath}'.") + print(ex) + rst_prolog = "" + # -- Options for HTML output ------------------------------------------------------------------------------------------- html_context = {} From 657dc83064169bc0faf874bcaff01c59a76fa6c4 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 12 Mar 2023 19:10:12 +0100 Subject: [PATCH 2/2] Added standard prolog file for ReST. --- doc/prolog.inc | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 doc/prolog.inc diff --git a/doc/prolog.inc b/doc/prolog.inc new file mode 100644 index 0000000..ae1e3b9 --- /dev/null +++ b/doc/prolog.inc @@ -0,0 +1,63 @@ +.. # Load pre-defined aliases and graphical characters like © from docutils + # is used to denote the special path + # \Lib\site-packages\docutils\parsers\rst\include +.. include:: +.. include:: + +.. # define a hard line break for HTML +.. |br| raw:: html + +
+ +.. # define horizontal line for HTML +.. |hr| raw:: html + +
+ +.. # define additional CSS based styles and ReST roles for HTML +.. raw:: html + + + +.. role:: bolditalic + :class: bolditalic + +.. role:: underline + :class: underline + +.. role:: strike + :class: strike + +.. role:: xlarge + :class: xlarge + +.. role:: red + :class: colorred +.. role:: green + :class: colorgreen +.. role:: blue + :class: colorblue +.. role:: purple + :class: colorpurple + +.. role:: deletion + :class: colorred strike +.. role:: addition + :class: colorgreen + +.. role:: pycode(code) + :language: python + :class: highlight + +.. role:: vhdlcode(code) + :language: vhdl + :class: highlight