summaryrefslogtreecommitdiff
path: root/common/doc
diff options
context:
space:
mode:
authorNicolas Schodet2012-03-29 09:18:10 +0200
committerNicolas Schodet2012-04-11 11:16:06 +0200
commit88986ff3c1341d8dd44f4151c24e50e9f2d45e09 (patch)
tree6cd2eccbf51b849b98c8c82625a24a2ee90139e7 /common/doc
parent207457e6d1ce7f895d0d27d944338fa24e34489d (diff)
common/doc/template: add stylesheet for code in HTML
Diffstat (limited to 'common/doc')
-rw-r--r--common/doc/template/mstar/pygments-mstar.css71
-rwxr-xr-xcommon/doc/template/mstar/rst2html-mstar5
2 files changed, 76 insertions, 0 deletions
diff --git a/common/doc/template/mstar/pygments-mstar.css b/common/doc/template/mstar/pygments-mstar.css
new file mode 100644
index 0000000000..d03564f38b
--- /dev/null
+++ b/common/doc/template/mstar/pygments-mstar.css
@@ -0,0 +1,71 @@
+pre.code {
+ margin-left: 2em;
+ margin-right: 2em;
+ background-color: #eeeeee;
+}
+
+pre.code .ln {
+ font-size: small;
+}
+
+.hll { background-color: #ffffcc }
+.c { color: #408080; font-style: italic } /* Comment */
+.err { border: 1px solid #FF0000 } /* Error */
+.k { color: #008000; font-weight: bold } /* Keyword */
+.o { color: #666666 } /* Operator */
+.cm { color: #408080; font-style: italic } /* Comment.Multiline */
+.cp { color: #BC7A00 } /* Comment.Preproc */
+.c1 { color: #408080; font-style: italic } /* Comment.Single */
+.cs { color: #408080; font-style: italic } /* Comment.Special */
+.gd { color: #A00000 } /* Generic.Deleted */
+.ge { font-style: italic } /* Generic.Emph */
+.gr { color: #FF0000 } /* Generic.Error */
+.gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.gi { color: #00A000 } /* Generic.Inserted */
+.go { color: #808080 } /* Generic.Output */
+.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.gs { font-weight: bold } /* Generic.Strong */
+.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.gt { color: #0040D0 } /* Generic.Traceback */
+.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.kp { color: #008000 } /* Keyword.Pseudo */
+.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.kt { color: #B00040 } /* Keyword.Type */
+.m { color: #666666 } /* Literal.Number */
+.s { color: #BA2121 } /* Literal.String */
+.na { color: #7D9029 } /* Name.Attribute */
+.nb { color: #008000 } /* Name.Builtin */
+.nc { color: #0000FF; font-weight: bold } /* Name.Class */
+.no { color: #880000 } /* Name.Constant */
+.nd { color: #AA22FF } /* Name.Decorator */
+.ni { color: #999999; font-weight: bold } /* Name.Entity */
+.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+.nf { color: #0000FF } /* Name.Function */
+.nl { color: #A0A000 } /* Name.Label */
+.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.nt { color: #008000; font-weight: bold } /* Name.Tag */
+.nv { color: #19177C } /* Name.Variable */
+.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.w { color: #bbbbbb } /* Text.Whitespace */
+.mf { color: #666666 } /* Literal.Number.Float */
+.mh { color: #666666 } /* Literal.Number.Hex */
+.mi { color: #666666 } /* Literal.Number.Integer */
+.mo { color: #666666 } /* Literal.Number.Oct */
+.sb { color: #BA2121 } /* Literal.String.Backtick */
+.sc { color: #BA2121 } /* Literal.String.Char */
+.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.s2 { color: #BA2121 } /* Literal.String.Double */
+.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+.sh { color: #BA2121 } /* Literal.String.Heredoc */
+.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+.sx { color: #008000 } /* Literal.String.Other */
+.sr { color: #BB6688 } /* Literal.String.Regex */
+.s1 { color: #BA2121 } /* Literal.String.Single */
+.ss { color: #19177C } /* Literal.String.Symbol */
+.bp { color: #008000 } /* Name.Builtin.Pseudo */
+.vc { color: #19177C } /* Name.Variable.Class */
+.vg { color: #19177C } /* Name.Variable.Global */
+.vi { color: #19177C } /* Name.Variable.Instance */
+.il { color: #666666 } /* Literal.Number.Integer.Long */
diff --git a/common/doc/template/mstar/rst2html-mstar b/common/doc/template/mstar/rst2html-mstar
index 6e0e026d71..501bdd8be6 100755
--- a/common/doc/template/mstar/rst2html-mstar
+++ b/common/doc/template/mstar/rst2html-mstar
@@ -12,12 +12,17 @@ try:
except:
pass
+import os.path
from docutils.core import publish_cmdline, default_description
+from docutils.writers.html4css1 import Writer
import pygments_code_block_directive
import vcs_version_directive
+here = os.path.dirname (os.path.abspath (__file__))
description = __doc__ + default_description
overrides = {
+ 'stylesheet_path': ','.join ((Writer.default_stylesheet_path,
+ os.path.join (here, 'pygments-mstar.css'))),
'math_output': 'HTML',
}
publish_cmdline(writer_name='html', description=description,