2019-08-03 14:49:50 +00:00
|
|
|
/* generating style
|
|
|
|
pandoc code.text -s --highlight-style pygments -o example18a.html
|
|
|
|
where code.text is an indended code bloc
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
|
|
|
|
-- | Inefficient quicksort in haskell.
|
|
|
|
qsort :: (Enum a) => [a] -> [a]
|
|
|
|
qsort [] = []
|
|
|
|
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
|
|
|
|
qsort (filter (>= x) xs)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
|
|
|
|
*/
|
|
|
|
|
|
|
|
pre {
|
|
|
|
background-color: #ddd;
|
|
|
|
}
|
|
|
|
pre > code.sourceCode { white-space: pre; position: relative; }
|
|
|
|
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
|
|
|
|
pre > code.sourceCode > span:empty { height: 1.2em; }
|
|
|
|
code.sourceCode > span { color: inherit; text-decoration: inherit; }
|
|
|
|
div.sourceCode { margin: 1em 0; }
|
2019-08-05 16:56:42 +00:00
|
|
|
pre.sourceCode { margin: 0; overflow: auto; }
|
2019-08-03 14:49:50 +00:00
|
|
|
@media screen {
|
|
|
|
div.sourceCode { overflow: auto; }
|
|
|
|
}
|
|
|
|
@media print {
|
|
|
|
pre > code.sourceCode { white-space: pre-wrap; }
|
|
|
|
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
|
|
|
|
}
|
|
|
|
pre.numberSource code
|
|
|
|
{ counter-reset: source-line 0; }
|
|
|
|
pre.numberSource code > span
|
|
|
|
{ position: relative; left: -4em; counter-increment: source-line; }
|
|
|
|
pre.numberSource code > span > a:first-child::before
|
|
|
|
{ content: counter(source-line);
|
|
|
|
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
|
|
|
border: none; display: inline-block;
|
|
|
|
-webkit-touch-callout: none; -webkit-user-select: none;
|
|
|
|
-khtml-user-select: none; -moz-user-select: none;
|
|
|
|
-ms-user-select: none; user-select: none;
|
|
|
|
padding: 0 4px; width: 4em;
|
|
|
|
background-color: #ffffff;
|
|
|
|
color: #a0a0a0;
|
|
|
|
}
|
|
|
|
pre.numberSource { margin-left: 3em; border-left: 1px solid #a0a0a0; padding-left: 4px; }
|
|
|
|
div.sourceCode
|
|
|
|
{ color: #1f1c1b; background-color: #ffffff; }
|
|
|
|
@media screen {
|
|
|
|
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
|
|
|
}
|
|
|
|
code span. { color: #1f1c1b; } /* Normal */
|
|
|
|
code span.al { color: #bf0303; background-color: #f7e6e6; font-weight: bold; } /* Alert */
|
|
|
|
code span.an { color: #ca60ca; } /* Annotation */
|
|
|
|
code span.at { color: #0057ae; } /* Attribute */
|
|
|
|
code span.bn { color: #b08000; } /* BaseN */
|
|
|
|
code span.bu { color: #644a9b; font-weight: bold; } /* BuiltIn */
|
|
|
|
code span.cf { color: #1f1c1b; font-weight: bold; } /* ControlFlow */
|
|
|
|
code span.ch { color: #924c9d; } /* Char */
|
|
|
|
code span.cn { color: #aa5500; } /* Constant */
|
|
|
|
code span.co { color: #898887; } /* Comment */
|
|
|
|
code span.cv { color: #0095ff; } /* CommentVar */
|
|
|
|
code span.do { color: #607880; } /* Documentation */
|
|
|
|
code span.dt { color: #0057ae; } /* DataType */
|
|
|
|
code span.dv { color: #b08000; } /* DecVal */
|
|
|
|
code span.er { color: #bf0303; text-decoration: underline; } /* Error */
|
|
|
|
code span.ex { color: #0095ff; font-weight: bold; } /* Extension */
|
|
|
|
code span.fl { color: #b08000; } /* Float */
|
|
|
|
code span.fu { color: #644a9b; } /* Function */
|
|
|
|
code span.im { color: #ff5500; } /* Import */
|
|
|
|
code span.in { color: #b08000; } /* Information */
|
|
|
|
code span.kw { color: #1f1c1b; font-weight: bold; } /* Keyword */
|
|
|
|
code span.op { color: #1f1c1b; } /* Operator */
|
|
|
|
code span.ot { color: #006e28; } /* Other */
|
|
|
|
code span.pp { color: #006e28; } /* Preprocessor */
|
|
|
|
code span.re { color: #0057ae; background-color: #e0e9f8; } /* RegionMarker */
|
|
|
|
code span.sc { color: #3daee9; } /* SpecialChar */
|
|
|
|
code span.ss { color: #ff5500; } /* SpecialString */
|
|
|
|
code span.st { color: #bf0303; } /* String */
|
|
|
|
code span.va { color: #0057ae; } /* Variable */
|
|
|
|
code span.vs { color: #bf0303; } /* VerbatimString */
|
|
|
|
code span.wa { color: #bf0303; } /* Warning */
|