mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-20 05:16:09 +00:00
adding nbconvert template
This commit is contained in:
parent
bac7575799
commit
f91dd2be21
@ -311,7 +311,7 @@
|
||||
"source": [
|
||||
"If you're looking at this notebook after it's been exported to HTML, you won't be able to see this interactive pane. However, it looks approximately like this:\n",
|
||||
"\n",
|
||||
""
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -581,7 +581,7 @@
|
||||
"source": [
|
||||
"This syntax highlighting may not show up in the exported HTML, as it is done on the fly with Javascript. The result looks like this in the notebook:\n",
|
||||
"\n",
|
||||
""
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1192,7 +1192,7 @@
|
||||
"source": [
|
||||
"Like with `:info`, the Hoogle directives use the IPython documentation pager to show you their output. You can press Escape to dismiss the pager. If you're reading this in it's HTML form, the output looks like this:\n",
|
||||
"\n",
|
||||
""
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1224,7 +1224,7 @@
|
||||
"source": [
|
||||
"The pager will show you documentation for things that could have that type signature or a similar one. It automatically formats inline Haskell code and hyperlinks the identifiers to their respective Haddock documentations:\n",
|
||||
"\n",
|
||||
""
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
Before ![]() (image error) Size: 29 KiB After ![]() (image error) Size: 29 KiB ![]() ![]() |
Before ![]() (image error) Size: 105 KiB After ![]() (image error) Size: 105 KiB ![]() ![]() |
Before ![]() (image error) Size: 81 KiB After ![]() (image error) Size: 81 KiB ![]() ![]() |
Before ![]() (image error) Size: 12 KiB After ![]() (image error) Size: 12 KiB ![]() ![]() |
@ -7,3 +7,7 @@ c.Session.keyfile = b''
|
||||
|
||||
# Syntax highlight properly in Haskell notebooks.
|
||||
c.NbConvertBase.default_language = "haskell"
|
||||
|
||||
# Where to look for templates.
|
||||
template_path = "/".join(__file__.split("/")[:-1] + ["templates"])
|
||||
c.TemplateExporter.template_path = [template_path]
|
||||
|
161
profile/templates/html_ihaskell.tpl
Normal file
161
profile/templates/html_ihaskell.tpl
Normal file
@ -0,0 +1,161 @@
|
||||
{%- extends 'html_full.tpl' -%}
|
||||
|
||||
|
||||
{%- block header -%}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title>{{resources['metadata']['name']}}</title>
|
||||
|
||||
{% for css in resources.inlining.css -%}
|
||||
<style type="text/css">
|
||||
{{ css }}
|
||||
</style>
|
||||
{% endfor %}
|
||||
|
||||
<style type="text/css">
|
||||
/* Overrides of notebook CSS for static HTML export */
|
||||
body {
|
||||
overflow: visible;
|
||||
padding: 8px;
|
||||
}
|
||||
.input_area {
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 0.2em;
|
||||
border: none;
|
||||
margin: 0px;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Our custom CSS -->
|
||||
<style type="text/css">
|
||||
/*
|
||||
Custom IHaskell CSS.
|
||||
*/
|
||||
|
||||
/* Styles used for the Hoogle display in the pager */
|
||||
.hoogle-doc {
|
||||
display: block;
|
||||
padding-bottom: 1.3em;
|
||||
padding-left: 0.4em;
|
||||
}
|
||||
.hoogle-code {
|
||||
display: block;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
.hoogle-text {
|
||||
display: block;
|
||||
}
|
||||
.hoogle-name {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
}
|
||||
.hoogle-head {
|
||||
font-weight: bold;
|
||||
}
|
||||
.hoogle-sub {
|
||||
display: block;
|
||||
margin-left: 0.4em;
|
||||
}
|
||||
.hoogle-package {
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
.hoogle-module {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Styles used for basic displays */
|
||||
.get-type {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
display: block;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.show-type {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.mono {
|
||||
font-family: monospace;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.err-msg {
|
||||
color: red;
|
||||
font-style: italic;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#unshowable {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.err-msg.in.collapse {
|
||||
padding-top: 0.7em;
|
||||
}
|
||||
|
||||
/* Code that will get highlighted before it is highlighted */
|
||||
.highlight-code {
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Hlint styles */
|
||||
.suggestion-warning {
|
||||
font-weight: bold;
|
||||
color: rgb(200, 130, 0);
|
||||
}
|
||||
.suggestion-error {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
.suggestion-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
init_mathjax = function() {
|
||||
if (window.MathJax) {
|
||||
// MathJax loaded
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
|
||||
},
|
||||
displayAlign: 'left', // Change this to 'center' to center equations.
|
||||
"HTML-CSS": {
|
||||
styles: {'.MathJax_Display': {"margin": 0}}
|
||||
}
|
||||
});
|
||||
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
|
||||
}
|
||||
}
|
||||
init_mathjax();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
{%- endblock header -%}
|
||||
|
||||
{% block body %}
|
||||
<body>
|
||||
{{ super() }}
|
||||
</body>
|
||||
{%- endblock body %}
|
Loading…
x
Reference in New Issue
Block a user