Allow mathjax in code

This commit is contained in:
flaviut 2014-07-13 21:32:44 -04:00
commit 30027c5f57
3 changed files with 73 additions and 69 deletions

View file

@ -1,20 +1,20 @@
/* pygments-css colorful */ /* pygments-css colorful */
code[class^='language-'] .hll { background-color: #ffffcc } code[class^='language-'] .hll:not([id^='MathJax']) { background-color: #ffffcc }
code[class^='language-'] .c { color: #808080 } /* Comment */ code[class^='language-'] .c:not([id^='MathJax']) { color: #808080 } /* Comment */
code[class^='language-'] .err { color: #F00000; background-color: #F0A0A0 } /* Error */ code[class^='language-'] .err:not([id^='MathJax']) { color: #F00000; background-color: #F0A0A0 } /* Error */
code[class^='language-'] .k { color: #008000; font-weight: bold } /* Keyword */ code[class^='language-'] .k:not([id^='MathJax']) { color: #008000; font-weight: bold } /* Keyword */
code[class^='language-'] .o { color: #303030 } /* Operator */ code[class^='language-'] .o:not([id^='MathJax']) { color: #303030 } /* Operator */
code[class^='language-'] .cm { color: #808080 } /* Comment.Multiline */ code[class^='language-'] .cm:not([id^='MathJax']) { color: #808080 } /* Comment.Multiline */
code[class^='language-'] .cp { color: #507090 } /* Comment.Preproc */ code[class^='language-'] .cp:not([id^='MathJax']) { color: #507090 } /* Comment.Preproc */
code[class^='language-'] .c1 { color: #808080 } /* Comment.Single */ code[class^='language-'] .c1:not([id^='MathJax']) { color: #808080 } /* Comment.Single */
code[class^='language-'] .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ code[class^='language-'] .cs:not([id^='MathJax']) { color: #cc0000; font-weight: bold } /* Comment.Special */
code[class^='language-'] .gd { color: #A00000 } /* Generic.Deleted */ code[class^='language-'] .gd:not([id^='MathJax']) { color: #A00000 } /* Generic.Deleted */
code[class^='language-'] .ge { font-style: italic } /* Generic.Emph */ code[class^='language-'] .ge:not([id^='MathJax']) { font-style: italic } /* Generic.Emph */
code[class^='language-'] .gr { color: #FF0000 } /* Generic.Error */ code[class^='language-'] .gr:not([id^='MathJax']) { color: #FF0000 } /* Generic.Error */
code[class^='language-'] .gh { color: #000080; font-weight: bold } /* Generic.Heading */ code[class^='language-'] .gh:not([id^='MathJax']) { color: #000080; font-weight: bold } /* Generic.Heading */
code[class^='language-'] .gi { color: #00A000 } /* Generic.Inserted */ code[class^='language-'] .gi:not([id^='MathJax']) { color: #00A000 } /* Generic.Inserted */
code[class^='language-'] .go { color: #808080 } /* Generic.Output */ code[class^='language-'] .go:not([id^='MathJax']) { color: #808080 } /* Generic.Output */
code[class^='language-'] .gp { code[class^='language-'] .gp:not([id^='MathJax']) {
color: #c65d09; color: #c65d09;
font-weight: bold; font-weight: bold;
/* NOTE: Hacks to allow copy-paste */ /* NOTE: Hacks to allow copy-paste */
@ -25,48 +25,48 @@ code[class^='language-'] .gp {
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
} /* Generic.Prompt */ } /* Generic.Prompt */
code[class^='language-'] .gs { font-weight: bold } /* Generic.Strong */ code[class^='language-'] .gs:not([id^='MathJax']) { font-weight: bold } /* Generic.Strong */
code[class^='language-'] .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ code[class^='language-'] .gu:not([id^='MathJax']) { color: #800080; font-weight: bold } /* Generic.Subheading */
code[class^='language-'] .gt { color: #0040D0 } /* Generic.Traceback */ code[class^='language-'] .gt:not([id^='MathJax']) { color: #0040D0 } /* Generic.Traceback */
code[class^='language-'] .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ code[class^='language-'] .kc:not([id^='MathJax']) { color: #008000; font-weight: bold } /* Keyword.Constant */
code[class^='language-'] .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ code[class^='language-'] .kd:not([id^='MathJax']) { color: #008000; font-weight: bold } /* Keyword.Declaration */
code[class^='language-'] .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ code[class^='language-'] .kn:not([id^='MathJax']) { color: #008000; font-weight: bold } /* Keyword.Namespace */
code[class^='language-'] .kp { color: #003080; font-weight: bold } /* Keyword.Pseudo */ code[class^='language-'] .kp:not([id^='MathJax']) { color: #003080; font-weight: bold } /* Keyword.Pseudo */
code[class^='language-'] .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ code[class^='language-'] .kr:not([id^='MathJax']) { color: #008000; font-weight: bold } /* Keyword.Reserved */
code[class^='language-'] .kt { color: #303090; font-weight: bold } /* Keyword.Type */ code[class^='language-'] .kt:not([id^='MathJax']) { color: #303090; font-weight: bold } /* Keyword.Type */
code[class^='language-'] .m { color: #6000E0; font-weight: bold } /* Literal.Number */ code[class^='language-'] .m:not([id^='MathJax']) { color: #6000E0; font-weight: bold } /* Literal.Number */
code[class^='language-'] .s { background-color: #fff0f0 } /* Literal.String */ code[class^='language-'] .s:not([id^='MathJax']) { background-color: #fff0f0 } /* Literal.String */
code[class^='language-'] .na { color: #0000C0 } /* Name.Attribute */ code[class^='language-'] .na:not([id^='MathJax']) { color: #0000C0 } /* Name.Attribute */
code[class^='language-'] .nb { color: #007020 } /* Name.Builtin */ code[class^='language-'] .nb:not([id^='MathJax']) { color: #007020 } /* Name.Builtin */
code[class^='language-'] .nc { color: #B00060; font-weight: bold } /* Name.Class */ code[class^='language-'] .nc:not([id^='MathJax']) { color: #B00060; font-weight: bold } /* Name.Class */
code[class^='language-'] .no { color: #003060; font-weight: bold } /* Name.Constant */ code[class^='language-'] .no:not([id^='MathJax']) { color: #003060; font-weight: bold } /* Name.Constant */
code[class^='language-'] .nd { color: #505050; font-weight: bold } /* Name.Decorator */ code[class^='language-'] .nd:not([id^='MathJax']) { color: #505050; font-weight: bold } /* Name.Decorator */
code[class^='language-'] .ni { color: #800000; font-weight: bold } /* Name.Entity */ code[class^='language-'] .ni:not([id^='MathJax']) { color: #800000; font-weight: bold } /* Name.Entity */
code[class^='language-'] .ne { color: #F00000; font-weight: bold } /* Name.Exception */ code[class^='language-'] .ne:not([id^='MathJax']) { color: #F00000; font-weight: bold } /* Name.Exception */
code[class^='language-'] .nf { color: #0060B0; font-weight: bold } /* Name.Function */ code[class^='language-'] .nf:not([id^='MathJax']) { color: #0060B0; font-weight: bold } /* Name.Function */
code[class^='language-'] .nl { color: #907000; font-weight: bold } /* Name.Label */ code[class^='language-'] .nl:not([id^='MathJax']) { color: #907000; font-weight: bold } /* Name.Label */
code[class^='language-'] .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ code[class^='language-'] .nn:not([id^='MathJax']) { color: #0e84b5; font-weight: bold } /* Name.Namespace */
code[class^='language-'] .nt { color: #007000 } /* Name.Tag */ code[class^='language-'] .nt:not([id^='MathJax']) { color: #007000 } /* Name.Tag */
code[class^='language-'] .nv { color: #906030 } /* Name.Variable */ code[class^='language-'] .nv:not([id^='MathJax']) { color: #906030 } /* Name.Variable */
code[class^='language-'] .ow { color: #000000; font-weight: bold } /* Operator.Word */ code[class^='language-'] .ow:not([id^='MathJax']) { color: #000000; font-weight: bold } /* Operator.Word */
code[class^='language-'] .w { color: #bbbbbb } /* Text.Whitespace */ code[class^='language-'] .w:not([id^='MathJax']) { color: #bbbbbb } /* Text.Whitespace */
code[class^='language-'] .mf { color: #6000E0; font-weight: bold } /* Literal.Number.Float */ code[class^='language-'] .mf:not([id^='MathJax']) { color: #6000E0; font-weight: bold } /* Literal.Number.Float */
code[class^='language-'] .mh { color: #005080; font-weight: bold } /* Literal.Number.Hex */ code[class^='language-'] .mh:not([id^='MathJax']) { color: #005080; font-weight: bold } /* Literal.Number.Hex */
code[class^='language-'] .mi { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */ code[class^='language-'] .mi:not([id^='MathJax']) { color: #0000D0; font-weight: bold } /* Literal.Number.Integer */
code[class^='language-'] .mo { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */ code[class^='language-'] .mo:not([id^='MathJax']) { color: #4000E0; font-weight: bold } /* Literal.Number.Oct */
code[class^='language-'] .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ code[class^='language-'] .sb:not([id^='MathJax']) { background-color: #fff0f0 } /* Literal.String.Backtick */
code[class^='language-'] .sc { color: #0040D0 } /* Literal.String.Char */ code[class^='language-'] .sc:not([id^='MathJax']) { color: #0040D0 } /* Literal.String.Char */
code[class^='language-'] .sd { color: #D04020 } /* Literal.String.Doc */ code[class^='language-'] .sd:not([id^='MathJax']) { color: #D04020 } /* Literal.String.Doc */
code[class^='language-'] .s2 { background-color: #fff0f0 } /* Literal.String.Double */ code[class^='language-'] .s2:not([id^='MathJax']) { background-color: #fff0f0 } /* Literal.String.Double */
code[class^='language-'] .se { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ code[class^='language-'] .se:not([id^='MathJax']) { color: #606060; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
code[class^='language-'] .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ code[class^='language-'] .sh:not([id^='MathJax']) { background-color: #fff0f0 } /* Literal.String.Heredoc */
code[class^='language-'] .si { background-color: #e0e0e0 } /* Literal.String.Interpol */ code[class^='language-'] .si:not([id^='MathJax']) { background-color: #e0e0e0 } /* Literal.String.Interpol */
code[class^='language-'] .sx { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */ code[class^='language-'] .sx:not([id^='MathJax']) { color: #D02000; background-color: #fff0f0 } /* Literal.String.Other */
code[class^='language-'] .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ code[class^='language-'] .sr:not([id^='MathJax']) { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
code[class^='language-'] .s1 { background-color: #fff0f0 } /* Literal.String.Single */ code[class^='language-'] .s1:not([id^='MathJax']) { background-color: #fff0f0 } /* Literal.String.Single */
code[class^='language-'] .ss { color: #A06000 } /* Literal.String.Symbol */ code[class^='language-'] .ss:not([id^='MathJax']) { color: #A06000 } /* Literal.String.Symbol */
code[class^='language-'] .bp { color: #007020 } /* Name.Builtin.Pseudo */ code[class^='language-'] .bp:not([id^='MathJax']) { color: #007020 } /* Name.Builtin.Pseudo */
code[class^='language-'] .vc { color: #306090 } /* Name.Variable.Class */ code[class^='language-'] .vc:not([id^='MathJax']) { color: #306090 } /* Name.Variable.Class */
code[class^='language-'] .vg { color: #d07000; font-weight: bold } /* Name.Variable.Global */ code[class^='language-'] .vg:not([id^='MathJax']) { color: #d07000; font-weight: bold } /* Name.Variable.Global */
code[class^='language-'] .vi { color: #3030B0 } /* Name.Variable.Instance */ code[class^='language-'] .vi:not([id^='MathJax']) { color: #3030B0 } /* Name.Variable.Instance */
code[class^='language-'] .il { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */ code[class^='language-'] .il:not([id^='MathJax']) { color: #0000D0; font-weight: bold } /* Literal.Number.Integer.Long */

View file

@ -1,8 +1,8 @@
#main code, code * { color: #675D69; } #main code, code * { color: #675D69; }
code[class^='language-'] .k { color: #143A77; } code[class^='language-'] .k:not([id^='MathJax']) { color: #143A77; }
code[class^='language-'] .kp { color: #8C5DC7; } code[class^='language-'] .kp:not([id^='MathJax']) { color: #8C5DC7; }
code[class^='language-'] .kd { color: #8C5DC7; } code[class^='language-'] .kd:not([id^='MathJax']) { color: #8C5DC7; }
code[class^='language-'] .mi { color: #8C5DC7; } code[class^='language-'] .mi:not([id^='MathJax']) { color: #8C5DC7; }
code[class^='language-'] .s { color: #0060B0; } code[class^='language-'] .s:not([id^='MathJax']) { color: #0060B0; }
code[class^='language-'] .c { color: #91B9A3; } code[class^='language-'] .c:not([id^='MathJax']) { color: #91B9A3; }
code[class^='language-'] .o { color: #009DE7; } code[class^='language-'] .o:not([id^='MathJax']) { color: #009DE7; }

View file

@ -8,8 +8,12 @@
<link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful"> <link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful">
<link rel="stylesheet" href="<%= @items['/stylesheets/fontello/'].path %>"> <link rel="stylesheet" href="<%= @items['/stylesheets/fontello/'].path %>">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['«', '»']]}});
MathJax.Hub.config.tex2jax.skipTags = ["script", "noscript", "style", "textarea", "annotation", "annotation-xml"];
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" async></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" async></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['«', '»']]}});</script>
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>"> <meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
<meta http-equiv="Default-Style" content="colorful"> <meta http-equiv="Default-Style" content="colorful">