Browse Source

build based on 28dad19

gh-pages
zeptodoctor 7 years ago
parent
commit
80442888d4
  1. 2
      stable
  2. 2
      v1
  3. 2
      v1.0
  4. 63
      v1.0.5/assets/arrow.svg
  5. 601
      v1.0.5/assets/documenter.css
  6. 132
      v1.0.5/assets/documenter.js
  7. BIN
      v1.0.5/assets/logo.png
  8. 250
      v1.0.5/assets/search.js
  9. 29
      v1.0.5/customprocessing/index.html
  10. 12
      v1.0.5/documenter/index.html
  11. 17
      v1.0.5/fileformat/index.html
  12. 962
      v1.0.5/generated/example.ipynb
  13. 24
      v1.0.5/generated/example.jl
  14. 357
      v1.0.5/generated/example/index.html
  15. 100
      v1.0.5/generated/notebook.ipynb
  16. 6
      v1.0.5/generated/outputformats.jl
  17. 2
      v1.0.5/index.html
  18. 12
      v1.0.5/outputformats.jl
  19. 38
      v1.0.5/outputformats/index.html
  20. 29
      v1.0.5/pipeline/index.html
  21. 2
      v1.0.5/search/index.html
  22. 323
      v1.0.5/search_index.js
  23. 1
      v1.0.5/siteinfo.js

2
stable

@ -1 +1 @@ @@ -1 +1 @@
v1.0.4
v1.0.5

2
v1

@ -1 +1 @@ @@ -1 +1 @@
v1.0.4
v1.0.5

2
v1.0

@ -1 +1 @@ @@ -1 +1 @@
v1.0.4
v1.0.5

63
v1.0.5/assets/arrow.svg

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16.5mm"
height="8.6603003mm"
viewBox="0 0 58.464567 30.686103"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="arrow.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="14.209234"
inkscape:cy="29.780479"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1053"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1021.6761)">
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 0,1021.6761 35.433071,0 -17.716536,30.6861 z"
id="path4140"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

601
v1.0.5/assets/documenter.css

@ -0,0 +1,601 @@ @@ -0,0 +1,601 @@
/*
* The default CSS style for Documenter.jl generated sites
*
* Heavily inspired by the Julia Sphinx theme
* https://github.com/JuliaLang/JuliaDoc
* which extends the sphinx_rtd_theme
* https://github.com/snide/sphinx_rtd_theme
*
* Part of Documenter.jl
* https://github.com/JuliaDocs/Documenter.jl
*
* License: MIT
*/
/* fonts */
body, input {
font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
color: #222;
text-rendering: optimizeLegibility;
}
pre, code, kbd {
font-family: 'Roboto Mono', Monaco, courier, monospace;
font-size: 0.90em;
}
pre code {
font-size: 1em;
}
a {
color: #2980b9;
text-decoration: none;
}
a:hover {
color: #3091d1;
}
a:visited {
color: #9b59b6;
}
body {
line-height: 1.5;
}
h1 {
font-size: 1.75em;
}
/* Unless the <h1> the is very first thing on the page (i.e. the second element
* in the <article>, * after the <header>, we add some additional styling to it
* to make it stand out a bit more. This way we get a reasonable fallback if CSS3
* selectors are not supported in the browser.
*/
article > h1:not(:nth-child(2)) {
margin: 2.5em 0 0;
padding-bottom: 0.30em;
border-bottom: 1px solid #e5e5e5;
}
h2 {
font-size: 1.50em;
margin: 2.3em 0 0;
padding-bottom: 0.25em;
border-bottom: 1px solid #e5e5e5;
}
h3 {
font-size: 1.25em;
margin: 2.0em 0 0;
}
h4 { font-size: 1.15em; }
h5 { font-size: 1.10em; }
h6 { font-size: 1em; }
h4, h5, h6 {
margin-top: 1.5em;
margin-bottom: 1em;
}
img {
max-width: 100%;
}
table {
border-collapse: collapse;
margin: 1em 0;
}
th, td {
border: 1px solid #e1e4e5;
padding: 0.5em 1em;
}
th {
border-bottom-width: 2px;
}
tr:nth-child(even) {
background-color: #f3f6f6;
}
hr {
border: 0;
border-top: 1px solid #e5e5e5;
}
/* Inline code and code blocks */
code {
padding: 0.1em;
background-color: rgba(0,0,0,.04);
border-radius: 3px;
}
pre {
background-color: #f5f5f5;
border: 1px solid #dddddd;
border-radius: 3px;
padding: 0.5em;
overflow: auto;
}
pre code {
padding: 0;
background-color: initial;
}
kbd {
font-size: 0.70em;
display: inline-block;
padding: 0.1em 0.5em 0.4em 0.5em;
line-height: 1.0em;
color: #444d56;
vertical-align: middle;
background-color: #fafbfc;
border: solid 1px #c6cbd1;
border-bottom-color: #959da5;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #959da5;
}
/* Headers in admonitions and docstrings */
.admonition h1,
article section.docstring h1 {
font-size: 1.25em;
}
.admonition h2,
article section.docstring h2 {
font-size: 1.10em;
}
.admonition h3,
.admonition h4,
.admonition h5,
.admonition h6,
article section.docstring h3,
article section.docstring h4,
article section.docstring h5,
article section.docstring h6 {
font-size: 1em;
}
/* Navigation */
nav.toc {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 20em;
display: flex;
flex-flow: column nowrap;
overflow-y: auto;
padding: 1em 0 0 0;
background-color: #fcfcfc;
box-shadow: inset -14px 0px 5px -12px rgb(210,210,210);
}
nav.toc .logo {
margin: 0 auto;
display: block;
max-height: 6em;
max-width: 18em;
}
nav.toc h1 {
text-align: center;
margin-top: .57em;
margin-bottom: 0;
}
nav.toc select {
display: block;
height: 2em;
flex-shrink: 0;
padding: 0 1.6em 0 1em;
min-width: 7em;
max-width: 90%;
max-width: calc(100% - 5em);
margin: 0 auto;
font-size: .83em;
border: 1px solid #c9c9c9;
border-radius: 1em;
/* TODO: doesn't seem to be centered on Safari */
text-align: center;
text-align-last: center;
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
background: white url("arrow.svg");
background-size: 1.155em;
background-repeat: no-repeat;
background-position: right;
}
nav.toc select:hover {
border: 1px solid #a0a0a0;
}
nav.toc select option {
text-align: center;
}
nav.toc input {
display: block;
height: 2em;
width: 90%;
width: calc(100% - 5em);
margin: 1.2em auto;
padding: 0 1em;
border: 1px solid #c9c9c9;
border-radius: 1em;
font-size: .83em;
}
nav.toc > ul * {
margin: 0;
}
nav.toc > ul {
min-height: 2em;
overflow-y: auto;
margin: 0;
}
nav.toc > ul > li:last-child {
padding-bottom: 1em;
}
nav.toc ul {
color: #404040;
padding: 0;
list-style: none;
}
nav.toc ul .toctext {
color: inherit;
display: block;
}
nav.toc ul a:hover {
color: #fcfcfc;
background-color: #4e4a4a;
}
nav.toc ul.internal a {
color: inherit;
display: block;
}
nav.toc ul.internal a:hover {
background-color: #d6d6d6;
}
nav.toc ul.internal {
background-color: #e3e3e3;
box-shadow: inset -14px 0px 5px -12px rgb(210,210,210);
list-style: none;
}
nav.toc ul.internal li.toplevel {
border-top: 1px solid #909090;
font-weight: bold;
}
nav.toc ul.internal li.toplevel:first-child {
border-top: none;
}
nav.toc .toctext {
padding-top: 0.3em;
padding-bottom: 0.3em;
padding-right: 1em;
}
nav.toc ul .toctext {
padding-left: 1em;
}
nav.toc ul ul .toctext {
padding-left: 2em;
}
nav.toc ul ul ul .toctext {
padding-left: 3em;
}
nav.toc li.current > .toctext {
border-top: 1px solid #c9c9c9;
border-bottom: 1px solid #c9c9c9;
color: #404040;
font-weight: bold;
background-color: white;
}
nav.toc ul::-webkit-scrollbar {
width: .4em;
background: none;
}
nav.toc ul::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #c9c9c9;
}
nav.toc ul::-webkit-scrollbar-thumb:hover {
border-radius: 5px;
background: #aaaaaa;
}
article {
margin-left: 20em;
min-width: 20em;
max-width: 48em;
padding: 2em;
}
article > header {}
article > header div#topbar {
display: none;
}
article > header nav ul {
display: inline-block;
list-style: none;
margin: 0;
padding: 0;
}
article > header nav li {
display: inline-block;
padding-right: 0.2em;
}
article > header nav li:before {
content: "»";
padding-right: 0.2em;
}
article > header .edit-page {
float: right;
}
article > footer {}
article > footer a.prev {
float: left;
}
article > footer a.next {
float: right;
}
article > footer a .direction:after {
content: ": ";
}
article hr {
margin: 1em 0;
}
article section.docstring {
border: 1px solid #ddd;
margin: 0.5em 0;
padding: 0.5em;
border-radius: 3px;
}
article section.docstring .docstring-header {
margin-bottom: 1em;
}
article section.docstring .docstring-binding {
color: #333;
font-weight: bold;
}
article section.docstring .docstring-category {
font-style: italic;
}
article section.docstring a.source-link {
display: block;
font-weight: bold;
}
.nav-anchor,
.nav-anchor:hover,
.nav-anchor:visited {
color: #333;
}
/*
* Admonitions
*
* Colors (title, body)
* warning: #f0b37e #ffedcc (orange)
* note: #6ab0de #e7f2fa (blue)
* tip: #1abc9c #dbfaf4 (green)
*/
.admonition {
border-radius: 3px;
background-color: #eeeeee;
margin: 1em 0;
}
.admonition-title {
border-radius: 3px 3px 0 0;
background-color: #9b9b9b;
padding: 0.15em 0.5em;
}
.admonition-text {
padding: 0.5em;
}
.admonition-text > :first-child {
margin-top: 0;
}
.admonition-text > :last-child {
margin-bottom: 0;
}
.admonition > .admonition-title:before {
font-family: "FontAwesome";
margin-right: 5px;
content: "\f06a";
}
.admonition.warning > .admonition-title {
background-color: #f0b37e;
}
.admonition.warning {
background-color: #ffedcc;
}
.admonition.note > .admonition-title {
background-color: #6ab0de;
}
.admonition.note {
background-color: #e7f2fa;
}
.admonition.tip > .admonition-title {
background-color: #1abc9c;
}
.admonition.tip {
background-color: #dbfaf4;
}
/* footnotes */
.footnote {
padding-left: 0.8em;
border-left: 2px solid #ccc;
}
/* Search page */
#search-results .category {
font-size: smaller;
}
/* Overriding the <code> block style of highligh.js.
* We have to override the padding and the background-color, since we style this
* part ourselves. Specifically, we style the <pre> surrounding the <code>, while
* highlight.js applies the .hljs style directly to the <code> tag.
*/
.hljs {
background-color: transparent;
padding: 0;
}
@media only screen and (max-width: 768px) {
nav.toc {
position: fixed;
width: 16em;
left: -16em;
-webkit-overflow-scrolling: touch;
-webkit-transition-property: left; /* Safari */
-webkit-transition-duration: 0.3s; /* Safari */
transition-property: left;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out; /* Safari */
transition-timing-function: ease-out;
z-index: 2;
box-shadow: 5px 0px 5px 0px rgb(210,210,210);
}
nav.toc.show {
left: 0;
}
article {
margin-left: 0;
padding: 3em 0.9em 0 0.9em; /* top right bottom left */
overflow-wrap: break-word;
}
article > header {
position: fixed;
left: 0;
z-index: 1;
}
article > header nav, hr {
display: none;
}
article > header div#topbar {
display: block; /* is mobile */
position: fixed;
width: 100%;
height: 1.5em;
padding-top: 1em;
padding-bottom: 1em;
background-color: #fcfcfc;
box-shadow: 0 1px 3px rgba(0,0,0,.26);
top: 0;
-webkit-transition-property: top; /* Safari */
-webkit-transition-duration: 0.3s; /* Safari */
transition-property: top;
transition-duration: 0.3s;
}
article > header div#topbar.headroom--unpinned.headroom--not-top.headroom--not-bottom {
top: -4em;
-webkit-transition-property: top; /* Safari */
-webkit-transition-duration: 0.7s; /* Safari */
transition-property: top;
transition-duration: 0.7s;
}
article > header div#topbar span {
width: 80%;
height: 1.5em;
margin-top: -0.1em;
margin-left: 0.9em;
font-size: 1.2em;
overflow: hidden;
}
article > header div#topbar a.fa-bars {
float: right;
padding: 0.6em;
margin-top: -0.6em;
margin-right: 0.3em;
font-size: 1.5em;
}
article > header div#topbar a.fa-bars:visited {
color: #3091d1;
}
article table {
overflow-x: auto;
display: block;
}
article div.MathJax_Display {
overflow: scroll;
}
article span.MathJax {
overflow: hidden;
}
}
@media only screen and (max-width: 320px) {
body {
font-size: 15px;
}
}

132
v1.0.5/assets/documenter.js

@ -0,0 +1,132 @@ @@ -0,0 +1,132 @@
/*
* Part of Documenter.jl
* https://github.com/JuliaDocs/Documenter.jl
*
* License: MIT
*/
requirejs.config({
paths: {
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min',
'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.3/headroom.min',
'mathjax': 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML',
'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min',
'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia.min',
'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia-repl.min',
},
shim: {
'mathjax' : {
exports: "MathJax"
},
'highlight-julia': ['highlight'],
'highlight-julia-repl': ['highlight'],
}
});
// Load MathJax
require(['mathjax'], function(MathJax) {
MathJax.Hub.Config({
"tex2jax": {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: [
"input/TeX",
"output/HTML-CSS",
"output/NativeMML"
],
extensions: [
"MathMenu.js",
"MathZoom.js",
"TeX/AMSmath.js",
"TeX/AMSsymbols.js",
"TeX/autobold.js",
"TeX/autoload-all.js"
]
});
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
})
require(['jquery', 'highlight', 'highlight-julia', 'highlight-julia-repl'], function($, hljs) {
$(document).ready(function() {
hljs.initHighlighting();
})
})
// update the version selector with info from the siteinfo.js and ../versions.js files
require(['jquery'], function($) {
$(document).ready(function() {
var version_selector = $("#version-selector");
// add the current version to the selector based on siteinfo.js, but only if the selector is empty
if (typeof DOCUMENTER_CURRENT_VERSION !== 'undefined' && $('#version-selector > option').length == 0) {
var option = $("<option value='#' selected='selected'>" + DOCUMENTER_CURRENT_VERSION + "</option>");
version_selector.append(option);
}
if (typeof DOC_VERSIONS !== 'undefined') {
var existing_versions = $('#version-selector > option');
var existing_versions_texts = existing_versions.map(function(i,x){return x.text});
DOC_VERSIONS.forEach(function(each) {
var version_url = documenterBaseURL + "/../" + each;
var existing_id = $.inArray(each, existing_versions_texts);
// if not already in the version selector, add it as a new option,
// otherwise update the old option with the URL and enable it
if (existing_id == -1) {
var option = $("<option value='" + version_url + "'>" + each + "</option>");
version_selector.append(option);
} else {
var option = existing_versions[existing_id];
option.value = version_url;
option.disabled = false;
}
});
}
// only show the version selector if the selector has been populated
if ($('#version-selector > option').length > 0) {
version_selector.css("visibility", "visible");
}
// Scroll the navigation bar to the currently selected menu item
$("nav.toc > ul").get(0).scrollTop = $(".current").get(0).offsetTop - $("nav.toc > ul").get(0).offsetTop;
})
})
// mobile
require(['jquery', 'headroom'], function($, Headroom) {
$(document).ready(function() {
var navtoc = $("nav.toc");
$("nav.toc li.current a.toctext").click(function() {
navtoc.toggleClass('show');
});
$("article > header div#topbar a.fa-bars").click(function(ev) {
ev.preventDefault();
navtoc.toggleClass('show');
if (navtoc.hasClass('show')) {
var title = $("article > header div#topbar span").text();
$("nav.toc ul li a:contains('" + title + "')").focus();
}
});
$("article#docs").bind('click', function(ev) {
if ($(ev.target).is('div#topbar a.fa-bars')) {
return;
}
if (navtoc.hasClass('show')) {
navtoc.removeClass('show');
}
});
if ($("article > header div#topbar").css('display') == 'block') {
var headroom = new Headroom(document.querySelector("article > header div#topbar"), {"tolerance": {"up": 10, "down": 10}});
headroom.init();
}
})
})

BIN
v1.0.5/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

250
v1.0.5/assets/search.js

@ -0,0 +1,250 @@ @@ -0,0 +1,250 @@
/*
* Part of Documenter.jl
* https://github.com/JuliaDocs/Documenter.jl
*
* License: MIT
*/
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
function parseUri (str) {
var o = parseUri.options,
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
uri = {},
i = 14;
while (i--) uri[o.key[i]] = m[i] || "";
uri[o.q.name] = {};
uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
if ($1) uri[o.q.name][$1] = $2;
});
return uri;
};
parseUri.options = {
strictMode: false,
key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
q: {
name: "queryKey",
parser: /(?:^|&)([^&=]*)=?([^&]*)/g
},
parser: {
strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
}
};
requirejs.config({
paths: {
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.1/lunr.min',
'lodash': 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min',
}
});
var currentScript = document.currentScript;
require(["jquery", "lunr", "lodash"], function($, lunr, _) {
$("#search-form").submit(function(e) {
e.preventDefault()
})
// list below is the lunr 2.1.3 list minus the intersect with names(Base)
// (all, any, get, in, is, which) and (do, else, for, let, where, while, with)
// ideally we'd just filter the original list but it's not available as a variable
lunr.stopWordFilter = lunr.generateStopWordFilter([
'a',
'able',
'about',
'across',
'after',
'almost',
'also',
'am',
'among',
'an',
'and',
'are',
'as',
'at',
'be',
'because',
'been',
'but',
'by',
'can',
'cannot',
'could',
'dear',
'did',
'does',
'either',
'ever',
'every',
'from',
'got',
'had',
'has',
'have',
'he',
'her',
'hers',
'him',
'his',
'how',
'however',
'i',
'if',
'into',
'it',
'its',
'just',
'least',
'like',
'likely',
'may',
'me',
'might',
'most',
'must',
'my',
'neither',
'no',
'nor',
'not',
'of',
'off',
'often',
'on',
'only',
'or',
'other',
'our',
'own',
'rather',
'said',
'say',
'says',
'she',
'should',
'since',
'so',
'some',
'than',
'that',
'the',
'their',
'them',
'then',
'there',
'these',
'they',
'this',
'tis',
'to',
'too',
'twas',
'us',
'wants',
'was',
'we',
'were',
'what',
'when',
'who',
'whom',
'why',
'will',
'would',
'yet',
'you',
'your'
])
// add . as a separator, because otherwise "title": "Documenter.Anchors.add!"
// would not find anything if searching for "add!", only for the entire qualification
lunr.tokenizer.separator = /[\s\-\.]+/
// custom trimmer that doesn't strip @ and !, which are used in julia macro and function names
lunr.trimmer = function (token) {
return token.update(function (s) {
return s.replace(/^[^a-zA-Z0-9@!]+/, '').replace(/[^a-zA-Z0-9@!]+$/, '')
})
}
lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'juliaStopWordFilter')
lunr.Pipeline.registerFunction(lunr.trimmer, 'juliaTrimmer')
var index = lunr(function () {
this.ref('location')
this.field('title')
this.field('text')
documenterSearchIndex['docs'].forEach(function(e) {
this.add(e)
}, this)
})
var store = {}
documenterSearchIndex['docs'].forEach(function(e) {
store[e.location] = {title: e.title, category: e.category}
})
$(function(){
function update_search(querystring) {
tokens = lunr.tokenizer(querystring)
results = index.query(function (q) {
tokens.forEach(function (t) {
q.term(t.toString(), {
fields: ["title"],
boost: 100,
usePipeline: false,
editDistance: 0,
wildcard: lunr.Query.wildcard.NONE
})
q.term(t.toString(), {
fields: ["title"],
boost: 10,
usePipeline: false,
editDistance: 2,
wildcard: lunr.Query.wildcard.NONE
})
q.term(t.toString(), {
fields: ["text"],
boost: 1,
usePipeline: true,
editDistance: 0,
wildcard: lunr.Query.wildcard.NONE
})
})
})
$('#search-info').text("Number of results: " + results.length)
$('#search-results').empty()
results.forEach(function(result) {
data = store[result.ref]
link = $('<a>')
link.text(data.title)
link.attr('href', documenterBaseURL+'/'+result.ref)
cat = $('<span class="category">('+data.category+')</span>')
li = $('<li>').append(link).append(" ").append(cat)
$('#search-results').append(li)
})
}
function update_search_box() {
querystring = $('#search-query').val()
update_search(querystring)
}
$('#search-query').keyup(_.debounce(update_search_box, 250))
$('#search-query').change(update_search_box)
search_query_uri = parseUri(window.location).queryKey["q"]
if(search_query_uri !== undefined) {
search_query = decodeURIComponent(search_query_uri.replace(/\+/g, '%20'))
$("#search-query").val(search_query)
}
update_search_box();
})
})

29
v1.0.5/customprocessing/index.html

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>5. Custom pre- and post-processing · Literate.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../index.html"><img class="logo" src="../assets/logo.png" alt="Literate.jl logo"/></a><h1>Literate.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../"><strong>1.</strong> Introduction</a></li><li><a class="toctext" href="../fileformat/"><strong>2.</strong> File Format</a></li><li><a class="toctext" href="../pipeline/"><strong>3.</strong> Processing pipeline</a></li><li><a class="toctext" href="../outputformats/"><strong>4.</strong> Output Formats</a></li><li class="current"><a class="toctext" href><strong>5.</strong> Custom pre- and post-processing</a><ul class="internal"></ul></li><li><a class="toctext" href="../documenter/"><strong>6.</strong> Interaction with Documenter.jl</a></li><li><a class="toctext" href="../generated/example/"><strong>7.</strong> Example</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href><strong>5.</strong> Custom pre- and post-processing</a></li></ul><a class="edit-page" href="https://github.com/fredrikekre/Literate.jl/blob/master/docs/src/customprocessing.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>5. Custom pre- and post-processing</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Custom-pre-and-post-processing-1" href="#Custom-pre-and-post-processing-1"><strong>5.</strong> Custom pre- and post-processing</a></h1><p>Since all packages are different, and may have different demands on how to create a nice example for the documentation it is important that the package maintainer does not feel limited by the by default provided syntax that this package offers. While you can generally come a long way by utilizing <a href="../fileformat/#Filtering-Lines-1">line filtering</a> there might be situations where you need to manually hook into the generation and change things. In Literate this is done by letting the user supply custom pre- and post-processing functions that may do transformation of the content.</p><p>All of the generators (<a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a>, <a href="../outputformats/#Literate.notebook"><code>Literate.notebook</code></a> and <a href="../outputformats/#Literate.script"><code>Literate.script</code></a>) accepts <code>preprocess</code> and <code>postprocess</code> keyword arguments. The default &quot;transformation&quot; is the <code>identity</code> function. The input to the transformation functions is a <code>String</code>, and the output should be the transformed <code>String</code>.</p><p><code>preprocess</code> is sent the raw input that is read from the source file (<a href="../pipeline/#Pre-processing-1">modulo the default line ending transformation</a>). <code>postprocess</code> is given different things depending on the output: For markdown and script output <code>postprocess</code> is given the content <code>String</code> just before writing it to the output file, but for notebook output <code>postprocess</code> is given the dictionary representing the notebook, since, in general, this is more useful.</p><h3><a class="nav-anchor" id="Example:-Adding-current-date-1" href="#Example:-Adding-current-date-1">Example: Adding current date</a></h3><p>As an example, lets say we want to splice the date of generation into the output. We could of course update our source file before generating the docs, but we could instead use a <code>preprocess</code> function that splices the date into the source for us. Consider the following source file:</p><pre><code class="language-julia"># # Example
# This example was generated DATEOFTODAY
x = 1 // 3</code></pre><p>where <code>DATEOFTODAY</code> is a placeholder, to make it easier for our <code>preprocess</code> function to find the location. Now, lets define the <code>preprocess</code> function, for example</p><pre><code class="language-julia">function update_date(content)
content = replace(content, &quot;DATEOFTODAY&quot; =&gt; Date(now()))
return content
end</code></pre><p>which would replace every occurrence of <code>&quot;DATEOFTODAY&quot;</code> with the current date. We would now simply give this function to the generator, for example:</p><pre><code class="language-julia">Literate.markdown(&quot;input.jl&quot;, &quot;outputdir&quot;; preprocess = update_date)</code></pre><h3><a class="nav-anchor" id="Example:-Replacing-include-calls-with-included-code-1" href="#Example:-Replacing-include-calls-with-included-code-1">Example: Replacing <code>include</code> calls with included code</a></h3><p>Let&#39;s say that we have some individual example files <code>file1, file2, ...</code> etc. that are <em>runnable</em> and also following the style of Literate. These files could be for example used in the test suite of your package.</p><p>We want to group them all into a single page in our documentation, but we do not want to copy paste the content of <code>file1, ...</code> for robustness: the files are included in the test suite and some changes may occur to them. We want these changes to also be reflected in the documentation.</p><p>A very easy way to do this is using <code>preprocess</code> to interchange <code>include</code> statements with file content. First, create a runnable <code>.jl</code> following the format of Literate</p><pre><code class="language-julia"># # Replace includes
# This is an example to replace `include` calls with the actual file content.
include(&quot;file1.jl&quot;)
# Cool, we just saw the result of the above code snippet. Here is one more:
include(&quot;file2.jl&quot;)</code></pre><p>Let&#39;s say we have saved this file as <code>examples.jl</code>. Then, you want to properly define a pre-processing function:</p><pre><code class="language-julia">function replace_includes(str)
included = [&quot;file1.jl&quot;, &quot;file2.jl&quot;]
# Here the path loads the files from their proper directory,
# which may not be the directory of the `examples.jl` file!
path = &quot;directory/to/example/files/&quot;
for ex in included
content = read(path*ex, String)
str = replace(str, &quot;include(\&quot;$(ex)\&quot;)&quot; =&gt; content)
end
return str
end</code></pre><p>(of course replace <code>included</code> with your respective files)</p><p>Finally, you simply pass this function to e.g. <a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a> as</p><pre><code class="language-julia">Literate.markdown(&quot;examples.jl&quot;, &quot;path/to/save/markdown&quot;;
name = &quot;markdown_file_name&quot;, preprocess = replace_includes)</code></pre><p>and you will see that in the final output file (here <code>markdown_file_name.md</code>) the <code>include</code> statements are replaced with the actual code to be included!</p><p>This approach is used for example in the documentation of the Julia package <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl"><code>TimeseriesPrediction</code></a>, see <a href="https://github.com/JuliaDynamics/DynamicalSystems.jl/blob/master/docs/src/tsprediction/stexamples.jl">here</a> and <a href="https://github.com/JuliaDynamics/DynamicalSystems.jl/blob/master/docs/make.jl#L11-L29">here for the generating script</a></p><footer><hr/><a class="previous" href="../outputformats/"><span class="direction">Previous</span><span class="title"><strong>4.</strong> Output Formats</span></a><a class="next" href="../documenter/"><span class="direction">Next</span><span class="title"><strong>6.</strong> Interaction with Documenter.jl</span></a></footer></article></body></html>

12
v1.0.5/documenter/index.html

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>6. Interaction with Documenter.jl · Literate.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../index.html"><img class="logo" src="../assets/logo.png" alt="Literate.jl logo"/></a><h1>Literate.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../"><strong>1.</strong> Introduction</a></li><li><a class="toctext" href="../fileformat/"><strong>2.</strong> File Format</a></li><li><a class="toctext" href="../pipeline/"><strong>3.</strong> Processing pipeline</a></li><li><a class="toctext" href="../outputformats/"><strong>4.</strong> Output Formats</a></li><li><a class="toctext" href="../customprocessing/"><strong>5.</strong> Custom pre- and post-processing</a></li><li class="current"><a class="toctext" href><strong>6.</strong> Interaction with Documenter.jl</a><ul class="internal"></ul></li><li><a class="toctext" href="../generated/example/"><strong>7.</strong> Example</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href><strong>6.</strong> Interaction with Documenter.jl</a></li></ul><a class="edit-page" href="https://github.com/fredrikekre/Literate.jl/blob/master/docs/src/documenter.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>6. Interaction with Documenter.jl</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Interaction-with-Documenter-1" href="#Interaction-with-Documenter-1"><strong>6.</strong> Interaction with Documenter.jl</a></h1><p>Literate can be used for any purpose, it spits out regular markdown files, and notebooks. Typically, though, these files will be used to render documentation for your package. The generators (<a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a>, <a href="../outputformats/#Literate.notebook"><code>Literate.notebook</code></a> and <a href="../outputformats/#Literate.script"><code>Literate.script</code></a>) supports a keyword argument <code>documenter</code> that lets the generator perform some extra things, keeping in mind that the source code have been written with Documenter.jl in mind. So lets take a look at what will happen if we set <code>documenter = true</code>:</p><h3><a class="nav-anchor" id="[Literate.markdown](@ref):-1" href="#[Literate.markdown](@ref):-1"><a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a>:</a></h3><ul><li>The default code fence will change from<pre><code class="language-none">```julia
# code
```</code></pre>to Documenters <code>@example</code> blocks:<pre><code class="language-none">```@examples $(name)
# code
```</code></pre></li><li>The following <code>@meta</code> block will be added to the top of the markdown page, which redirects the &quot;Edit on GitHub&quot; link on the top of the page to the <em>source file</em> rather than the generated <code>.md</code> file:<pre><code class="language-none">```@meta
EditURL = &quot;$(relpath(inputfile, outputdir))&quot;
```</code></pre></li></ul><h3><a class="nav-anchor" id="[Literate.notebook](@ref):-1" href="#[Literate.notebook](@ref):-1"><a href="../outputformats/#Literate.notebook"><code>Literate.notebook</code></a>:</a></h3><ul><li>Documenter style <code>@ref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code> and <code>@id</code> in the source file without them leaking to the notebook.</li><li>Documenter style markdown math<pre><code class="language-none">```math
\int f dx
```</code></pre>is replaced with notebook compatible<pre><code class="language-none">\begin{equation}
\int f dx
\end{equation}</code></pre></li></ul><h3><a class="nav-anchor" id="[Literate.script](@ref):-1" href="#[Literate.script](@ref):-1"><a href="../outputformats/#Literate.script"><code>Literate.script</code></a>:</a></h3><ul><li>Documenter style <code>@ref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul><footer><hr/><a class="previous" href="../customprocessing/"><span class="direction">Previous</span><span class="title"><strong>5.</strong> Custom pre- and post-processing</span></a><a class="next" href="../generated/example/"><span class="direction">Next</span><span class="title"><strong>7.</strong> Example</span></a></footer></article></body></html>

17
v1.0.5/fileformat/index.html

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>2. File Format · Literate.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../index.html"><img class="logo" src="../assets/logo.png" alt="Literate.jl logo"/></a><h1>Literate.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../"><strong>1.</strong> Introduction</a></li><li class="current"><a class="toctext" href><strong>2.</strong> File Format</a><ul class="internal"><li><a class="toctext" href="#Syntax-1"><strong>2.1.</strong> Syntax</a></li><li><a class="toctext" href="#Filtering-Lines-1"><strong>2.2.</strong> Filtering Lines</a></li><li><a class="toctext" href="#Default-Replacements-1"><strong>2.3.</strong> Default Replacements</a></li></ul></li><li><a class="toctext" href="../pipeline/"><strong>3.</strong> Processing pipeline</a></li><li><a class="toctext" href="../outputformats/"><strong>4.</strong> Output Formats</a></li><li><a class="toctext" href="../customprocessing/"><strong>5.</strong> Custom pre- and post-processing</a></li><li><a class="toctext" href="../documenter/"><strong>6.</strong> Interaction with Documenter.jl</a></li><li><a class="toctext" href="../generated/example/"><strong>7.</strong> Example</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href><strong>2.</strong> File Format</a></li></ul><a class="edit-page" href="https://github.com/fredrikekre/Literate.jl/blob/master/docs/src/fileformat.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>2. File Format</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="**2.**-File-Format-1" href="#**2.**-File-Format-1"><strong>2.</strong> File Format</a></h1><p>The source file format for Literate is a regular, commented, julia (<code>.jl</code>) scripts. The idea is that the scripts also serve as documentation on their own and it is also simple to include them in the test-suite, with e.g. <code>include</code>, to make sure the examples stay up do date with other changes in your package.</p><h2><a class="nav-anchor" id="Syntax-1" href="#Syntax-1"><strong>2.1.</strong> Syntax</a></h2><p>The basic syntax is simple:</p><ul><li>lines starting with <code>#</code> are treated as markdown,</li><li>all other lines are treated as julia code.</li></ul><p>Leading whitespace is allowed before <code>#</code>, but it will be removed when generating the output. Since <code>#</code>-lines is treated as markdown we can not use that for regular julia comments, for this you can instead use <code>##</code>, which will render as <code>#</code> in the output.</p><p>Lets look at a simple example:</p><pre><code class="language-julia"># # Rational numbers
#
# In julia rational numbers can be constructed with the `//` operator.
# Lets define two rational numbers, `x` and `y`:
x = 1//3
y = 2//5
# When adding `x` and `y` together we obtain a new rational number:
z = x + y</code></pre><p>In the lines starting with <code>#</code> we can use regular markdown syntax, for example the <code>#</code> used for the heading and the backticks for formatting code. The other lines are regular julia code. We note a couple of things:</p><ul><li>The script is valid julia, which means that we can <code>include</code> it and the example will run (for example in the <code>test/runtests.jl</code> script, to include the example in the test suite).</li><li>The script is &quot;self-explanatory&quot;, i.e. the markdown lines works as comments and thus serve as good documentation on its own.</li></ul><p>For simple use this is all you need to know. The following additional special syntax can also be used:</p><ul><li><code>#md</code>, <code>#nb</code>, <code>#jl</code>, <code>#src</code>: tags to filter lines, see <a href="#Filtering-Lines-1">Filtering Lines</a>,</li><li><code>#-</code>: tag to manually control chunk-splits, see <a href="../pipeline/#Custom-control-over-chunk-splits-1">Custom control over chunk splits</a>.</li></ul><p>There is also some default convenience replacements that will always be performed, see <a href="#Default-Replacements-1">Default Replacements</a>.</p><h2><a class="nav-anchor" id="Filtering-Lines-1" href="#Filtering-Lines-1"><strong>2.2.</strong> Filtering Lines</a></h2><p>It is often useful to filter out lines in the source depending on the output format. For this purpose there are a number of &quot;tokens&quot; that can be used to mark the purpose of certain lines:</p><ul><li><code>#md</code>: line exclusive to markdown output,</li><li><code>#nb</code>: line exclusive to notebook output,</li><li><code>#jl</code>: line exclusive to script output,</li><li><code>#src</code>: line exclusive to the source code and thus filtered out unconditionally.</li></ul><p>Lines <em>starting</em> with one of these tokens are filtered out in the <a href="../pipeline/#Pre-processing-1">preprocessing step</a>.</p><p>Suppose, for example, that we want to include a docstring within a <code>@docs</code> block using Documenter. Obviously we don&#39;t want to include this in the notebook, since <code>@docs</code> is Documenter syntax that the notebook will not understand. This is a case where we can prepend <code>#md</code> to those lines:</p><pre><code class="language-julia">#md # ```@docs
#md # Literate.markdown
#md # Literate.notebook
#md # Literate.markdown
#md # ```</code></pre><p>The lines in the example above would be filtered out in the preprocessing step, unless we are generating a markdown file. When generating a markdown file we would simple remove the leading <code>#md</code> from the lines. Beware that the space after the tag is also removed.</p><p>The <code>#src</code> token can also be placed at the <em>end</em> of a line. This is to make it possible to have code lines exclusive to the source code, and not just comment lines. For example, if the source file is included in the test suite we might want to add a <code>@test</code> at the end without this showing up in the outputs:</p><pre><code class="language-julia">using Test #src
@test result == expected_result #src</code></pre><h2><a class="nav-anchor" id="Default-Replacements-1" href="#Default-Replacements-1"><strong>2.3.</strong> Default Replacements</a></h2><p>The following convenience &quot;macros&quot; are always expanded:</p><ul><li><p><code>@__NAME__</code></p><p>expands to the <code>name</code> keyword argument to <a href="../outputformats/#Literate.markdown"><code>Literate.markdown</code></a>, <a href="../outputformats/#Literate.notebook"><code>Literate.notebook</code></a> and <a href="../outputformats/#Literate.script"><code>Literate.script</code></a> (defaults to the filename of the input file).</p></li><li><p><code>@__REPO__ROOT_URL__</code></p><p>expands to <code>https://github.com/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/blob/master/</code> and is a convenient way to use when you want to link to files outside the doc-build directory. For example <code>@__REPO__ROOT_URL__src/Literate.jl</code> would link to the source of the Literate module.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code></p><p>expands to <code>https://nbviewer.jupyter.org/github/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/blob/gh-pages/$(folder)/</code> where <code>folder</code> is the folder that <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <a href="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>.</p></li></ul><footer><hr/><a class="previous" href="../"><span class="direction">Previous</span><span class="title"><strong>1.</strong> Introduction</span></a><a class="next" href="../pipeline/"><span class="direction">Next</span><span class="title"><strong>3.</strong> Processing pipeline</span></a></footer></article></body></html>

962
v1.0.5/generated/example.ipynb

File diff suppressed because one or more lines are too long

24
v1.0.5/generated/example.jl

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
x = 1//3
y = 2//5
x + y
x * y
function foo()
println("This string is printed to stdout.")
return [1, 2, 3, 4]
end
foo()
using Plots
x = range(0, stop=6π, length=1000)
y1 = sin.(x)
y2 = cos.(x)
plot(x, [y1, y2])
z = 1.0 + 2.0im
# This file was generated using Literate.jl, https://github.com/fredrikekre/Literate.jl

357
v1.0.5/generated/example/index.html

@ -0,0 +1,357 @@ @@ -0,0 +1,357 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>7. Example · Literate.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link href="../../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../../index.html"><img class="logo" src="../../assets/logo.png" alt="Literate.jl logo"/></a><h1>Literate.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="../../search/"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../../"><strong>1.</strong> Introduction</a></li><li><a class="toctext" href="../../fileformat/"><strong>2.</strong> File Format</a></li><li><a class="toctext" href="../../pipeline/"><strong>3.</strong> Processing pipeline</a></li><li><a class="toctext" href="../../outputformats/"><strong>4.</strong> Output Formats</a></li><li><a class="toctext" href="../../customprocessing/"><strong>5.</strong> Custom pre- and post-processing</a></li><li><a class="toctext" href="../../documenter/"><strong>6.</strong> Interaction with Documenter.jl</a></li><li class="current"><a class="toctext" href><strong>7.</strong> Example</a><ul class="internal"></ul></li></ul></nav><article id="docs"><header><nav><ul><li><a href><strong>7.</strong> Example</a></li></ul><a class="edit-page" href="https://github.com/fredrikekre/Literate.jl/blob/master/examples/example.jl"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>7. Example</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="**7.**-Example-1" href="#**7.**-Example-1"><strong>7.</strong> Example</a></h1><p>This is an example generated with Literate based on this source file: <a href="https://github.com/fredrikekre/Literate.jl/blob/master/examples/example.jl"><code>example.jl</code></a>. You are seeing the html-output which Documenter have generated based on a markdown file generated with Literate. The corresponding notebook can be found here: <a href="https://nbviewer.jupyter.org/github/fredrikekre/Literate.jl/blob/gh-pages/v1.0.5/generated/example.ipynb"><code>example.ipynb</code></a>, and the plain script output can be found here: <a href="../example.jl"><code>example.jl</code></a>.</p><p>It is recommended to have the <a href="https://github.com/fredrikekre/Literate.jl/blob/master/examples/example.jl">source file</a> available when reading this, to better understand how the syntax in the source file corresponds to the output you are seeing.</p><h3><a class="nav-anchor" id="Basic-syntax-1" href="#Basic-syntax-1">Basic syntax</a></h3><p>The basic syntax for Literate is simple, lines starting with <code>#</code> is interpreted as markdown, and all the other lines are interpreted as code. Here is some code:</p><div><pre><code class="language-julia">x = 1//3
y = 2//5</code></pre><pre><code class="language-none">2//5</code></pre></div><p>In markdown sections we can use markdown syntax. For example, we can write <em>text in italic font</em>, <strong>text in bold font</strong> and use <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">links</a>.</p><p>It is possible to filter out lines depending on the output using the <code>#md</code>, <code>#nb</code>, <code>#jl</code> and <code>#src</code> tags (see <a href="../../fileformat/#Filtering-Lines-1">Filtering Lines</a>):</p><ul><li>This line starts with <code>#md</code> and is thus only visible in the markdown output.</li></ul><p>The source file is parsed in chunks of markdown and code. Starting a line with <code>#-</code> manually inserts a chunk break. For example, if we want to display the output of the following operations we may insert <code>#-</code> in between. These two code blocks will now end up in different <code>@example</code>-blocks in the markdown output, and two different notebook cells in the notebook output.</p><div><pre><code class="language-julia">x + y</code></pre><pre><code class="language-none">11//15</code></pre></div><div><pre><code class="language-julia">x * y</code></pre><pre><code class="language-none">2//15</code></pre></div><h3><a class="nav-anchor" id="Output-Capturing-1" href="#Output-Capturing-1">Output Capturing</a></h3><p>Code chunks are by default placed in Documenter <code>@example</code> blocks in the generated markdown. This means that the output will be captured in a block when Documenter is building the docs. In notebooks the output is captured in output cells, if the <code>execute</code> keyword argument is set to true. Output to <code>stdout</code>/<code>stderr</code> is also captured.</p><div><pre><code class="language-julia">function foo()
println(&quot;This string is printed to stdout.&quot;)
return [1, 2, 3, 4]
end
foo()</code></pre><pre><code class="language-none">This string is printed to stdout.
4-element Array{Int64,1}:
1
2
3
4</code></pre></div><p>Both Documenter&#39;s <code>@example</code> block and notebooks can display images. Here is an example where we generate a simple plot using the <a href="https://github.com/JuliaPlots/Plots.jl">Plots.jl</a> package</p><div><pre><code class="language-julia">using Plots
x = range(0, stop=6π, length=1000)
y1 = sin.(x)
y2 = cos.(x)
plot(x, [y1, y2])</code></pre><?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="400" viewBox="0 0 2400 1600">
<defs>
<clipPath id="clip7300">
<rect x="0" y="0" width="2000" height="2000"/>
</clipPath>
</defs>
<defs>
<clipPath id="clip7301">
<rect x="0" y="0" width="2400" height="1600"/>
</clipPath>
</defs>
<polygon clip-path="url(#clip7301)" points="
0,1600 2400,1600 2400,0 0,0
" fill="#ffffff" fill-rule="evenodd" fill-opacity="1"/>
<defs>
<clipPath id="clip7302">
<rect x="480" y="0" width="1681" height="1600"/>
</clipPath>
</defs>
<polygon clip-path="url(#clip7301)" points="
94.4882,1537.01 2321.26,1537.01 2321.26,47.2441 94.4882,47.2441
" fill="#ffffff" fill-rule="evenodd" fill-opacity="1"/>
<defs>
<clipPath id="clip7303">
<rect x="94" y="47" width="2228" height="1491"/>
</clipPath>
</defs>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
157.51,1537.01 157.51,47.2441
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
714.745,1537.01 714.745,47.2441
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
1271.98,1537.01 1271.98,47.2441
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
1829.22,1537.01 1829.22,47.2441
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
94.4882,1494.85 2321.26,1494.85
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
94.4882,1143.49 2321.26,1143.49
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
94.4882,792.13 2321.26,792.13
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
94.4882,440.769 2321.26,440.769
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none" points="
94.4882,89.4072 2321.26,89.4072
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,1537.01 2321.26,1537.01
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,1537.01 94.4882,47.2441
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
157.51,1537.01 157.51,1514.66
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
714.745,1537.01 714.745,1514.66
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
1271.98,1537.01 1271.98,1514.66
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
1829.22,1537.01 1829.22,1514.66
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,1494.85 127.89,1494.85
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,1143.49 127.89,1143.49
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,792.13 127.89,792.13
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,440.769 127.89,440.769
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
94.4882,89.4072 127.89,89.4072
"/>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;" transform="rotate(0, 157.51, 1591.01)" x="157.51" y="1591.01">0</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;" transform="rotate(0, 714.745, 1591.01)" x="714.745" y="1591.01">5</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;" transform="rotate(0, 1271.98, 1591.01)" x="1271.98" y="1591.01">10</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;" transform="rotate(0, 1829.22, 1591.01)" x="1829.22" y="1591.01">15</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;" transform="rotate(0, 70.4882, 1512.35)" x="70.4882" y="1512.35">-1.0</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;" transform="rotate(0, 70.4882, 1160.99)" x="70.4882" y="1160.99">-0.5</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;" transform="rotate(0, 70.4882, 809.63)" x="70.4882" y="809.63">0.0</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;" transform="rotate(0, 70.4882, 458.269)" x="70.4882" y="458.269">0.5</text>
</g>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;" transform="rotate(0, 70.4882, 106.907)" x="70.4882" y="106.907">1.0</text>
</g>
<polyline clip-path="url(#clip7303)" style="stroke:#009af9; stroke-width:4; stroke-opacity:1; fill:none" points="
157.51,792.13 159.613,778.871 161.716,765.618 163.819,752.373 165.921,739.143 168.024,725.932 170.127,712.744 172.23,699.585 174.333,686.458 176.436,673.369
178.538,660.323 180.641,647.323 182.744,634.375 184.847,621.483 186.95,608.651 189.052,595.886 191.155,583.189 193.258,570.568 195.361,558.025 197.464,545.566
199.567,533.194 201.669,520.914 203.772,508.731 205.875,496.649 207.978,484.673 210.081,472.805 212.184,461.051 214.286,449.416 216.389,437.902 218.492,426.514
220.595,415.256 222.698,404.133 224.801,393.148 226.903,382.305 229.006,371.607 231.109,361.06 233.212,350.665 235.315,340.428 237.418,330.352 239.52,320.44
241.623,310.697 243.726,301.124 245.829,291.726 247.932,282.507 250.035,273.469 252.137,264.615 254.24,255.95 256.343,247.475 258.446,239.194 260.549,231.11
262.652,223.226 264.754,215.544 266.857,208.068 268.96,200.799 271.063,193.741 273.166,186.896 275.269,180.267 277.371,173.855 279.474,167.663 281.577,161.694
283.68,155.949 285.783,150.431 287.886,145.141 289.988,140.081 292.091,135.254 294.194,130.66 296.297,126.302 298.4,122.181 300.503,118.298 302.605,114.656
304.708,111.254 306.811,108.095 308.914,105.18 311.017,102.509 313.12,100.083 315.222,97.904 317.325,95.9721 319.428,94.2879 321.531,92.8522 323.634,91.6655
325.736,90.7281 327.839,90.0404 329.942,89.6027 332.045,89.415 334.148,89.4776 336.251,89.7903 338.353,90.353 340.456,91.1656 342.559,92.2277 344.662,93.539
346.765,95.099 348.868,96.9071 350.97,98.9627 353.073,101.265 355.176,103.814 357.279,106.607 359.382,109.644 361.485,112.925 363.587,116.447 365.69,120.21
367.793,124.212 369.896,128.452 371.999,132.928 374.102,137.638 376.204,142.582 378.307,147.757 380.41,153.161 382.513,158.793 384.616,164.651 386.719,170.731
388.821,177.033 390.924,183.554 393.027,190.292 395.13,197.244 397.233,204.407 399.336,211.78 401.438,219.36 403.541,227.143 405.644,235.127 407.747,243.31
409.85,251.688 411.953,260.259 414.055,269.019 416.158,277.965 418.261,287.094 420.364,296.403 422.467,305.889 424.57,315.547 426.672,325.376 428.775,335.37
430.878,345.527 432.981,355.843 435.084,366.314 437.187,376.937 439.289,387.708 441.392,398.623 443.495,409.678 445.598,420.869 447.701,432.192 449.804,443.643
451.906,455.219 454.009,466.914 456.112,478.725 458.215,490.648 460.318,502.678 462.42,514.811 464.523,527.042 466.626,539.368 468.729,551.785 470.832,564.286
472.935,576.869 475.037,589.528 477.14,602.26 479.243,615.059 481.346,627.921 483.449,640.842 485.552,653.817 487.654,666.84 489.757,679.909 491.86,693.017
493.963,706.161 496.066,719.335 498.169,732.535 500.271,745.756 502.374,758.994 504.477,772.244 506.58,785.5 508.683,798.759 510.786,812.016 512.888,825.266
514.991,838.504 517.094,851.725 519.197,864.925 521.3,878.099 523.403,891.243 525.505,904.351 527.608,917.419 529.711,930.443 531.814,943.418 533.917,956.338
536.02,969.201 538.122,982 540.225,994.731 542.328,1007.39 544.431,1019.97 546.534,1032.48 548.637,1044.89 550.739,1057.22 552.842,1069.45 554.945,1081.58
557.048,1093.61 559.151,1105.53 561.254,1117.35 563.356,1129.04 565.459,1140.62 567.562,1152.07 569.665,1163.39 571.768,1174.58 573.871,1185.64 575.973,1196.55
578.076,1207.32 580.179,1217.95 582.282,1228.42 584.385,1238.73 586.488,1248.89 588.59,1258.88 590.693,1268.71 592.796,1278.37 594.899,1287.86 597.002,1297.17
599.104,1306.29 601.207,1315.24 603.31,1324 605.413,1332.57 607.516,1340.95 609.619,1349.13 611.721,1357.12 613.824,1364.9 615.927,1372.48 618.03,1379.85
620.133,1387.02 622.236,1393.97 624.338,1400.71 626.441,1407.23 628.544,1413.53 630.647,1419.61 632.75,1425.47 634.853,1431.1 636.955,1436.5 639.058,1441.68
641.161,1446.62 643.264,1451.33 645.367,1455.81 647.47,1460.05 649.572,1464.05 651.675,1467.81 653.778,1471.33 655.881,1474.62 657.984,1477.65 660.087,1480.45
662.189,1482.99 664.292,1485.3 666.395,1487.35 668.498,1489.16 670.601,1490.72 672.704,1492.03 674.806,1493.09 676.909,1493.91 679.012,1494.47 681.115,1494.78
683.218,1494.84 685.321,1494.66 687.423,1494.22 689.526,1493.53 691.629,1492.59 693.732,1491.41 695.835,1489.97 697.938,1488.29 700.04,1486.36 702.143,1484.18
704.246,1481.75 706.349,1479.08 708.452,1476.16 710.555,1473.01 712.657,1469.6 714.76,1465.96 716.863,1462.08 718.966,1457.96 721.069,1453.6 723.172,1449.01
725.274,1444.18 727.377,1439.12 729.48,1433.83 731.583,1428.31 733.686,1422.57 735.788,1416.6 737.891,1410.4 739.994,1403.99 742.097,1397.36 744.2,1390.52
746.303,1383.46 748.405,1376.19 750.508,1368.72 752.611,1361.03 754.714,1353.15 756.817,1345.07 758.92,1336.78 761.022,1328.31 763.125,1319.64 765.228,1310.79
767.331,1301.75 769.434,1292.53 771.537,1283.14 773.639,1273.56 775.742,1263.82 777.845,1253.91 779.948,1243.83 782.051,1233.59 784.154,1223.2 786.256,1212.65
788.359,1201.96 790.462,1191.11 792.565,1180.13 794.668,1169 796.771,1157.75 798.873,1146.36 800.976,1134.84 803.079,1123.21 805.182,1111.45 807.285,1099.59
809.388,1087.61 811.49,1075.53 813.593,1063.35 815.696,1051.07 817.799,1038.69 819.902,1026.23 822.005,1013.69 824.107,1001.07 826.21,988.374 828.313,975.608
830.416,962.777 832.519,949.885 834.622,936.937 836.724,923.937 838.827,910.891 840.93,897.802 843.033,884.675 845.136,871.516 847.239,858.328 849.341,845.117
851.444,831.886 853.547,818.642 855.65,805.388 857.753,792.13 859.856,778.871 861.958,765.618 864.061,752.373 866.164,739.143 868.267,725.932 870.37,712.744
872.473,699.585 874.575,686.458 876.678,673.369 878.781,660.323 880.884,647.323 882.987,634.375 885.089,621.483 887.192,608.651 889.295,595.886 891.398,583.189
893.501,570.568 895.604,558.025 897.706,545.566 899.809,533.194 901.912,520.914 904.015,508.731 906.118,496.649 908.221,484.673 910.323,472.805 912.426,461.051
914.529,449.416 916.632,437.902 918.735,426.514 920.838,415.256 922.94,404.133 925.043,393.148 927.146,382.305 929.249,371.607 931.352,361.06 933.455,350.665
935.557,340.428 937.66,330.352 939.763,320.44 941.866,310.697 943.969,301.124 946.072,291.726 948.174,282.507 950.277,273.469 952.38,264.615 954.483,255.95
956.586,247.475 958.689,239.194 960.791,231.11 962.894,223.226 964.997,215.544 967.1,208.068 969.203,200.799 971.306,193.741 973.408,186.896 975.511,180.267
977.614,173.855 979.717,167.663 981.82,161.694 983.923,155.949 986.025,150.431 988.128,145.141 990.231,140.081 992.334,135.254 994.437,130.66 996.54,126.302
998.642,122.181 1000.75,118.298 1002.85,114.656 1004.95,111.254 1007.05,108.095 1009.16,105.18 1011.26,102.509 1013.36,100.083 1015.46,97.904 1017.57,95.9721
1019.67,94.2879 1021.77,92.8522 1023.88,91.6655 1025.98,90.7281 1028.08,90.0404 1030.18,89.6027 1032.29,89.415 1034.39,89.4776 1036.49,89.7903 1038.6,90.353
1040.7,91.1656 1042.8,92.2277 1044.9,93.539 1047.01,95.099 1049.11,96.9071 1051.21,98.9627 1053.32,101.265 1055.42,103.814 1057.52,106.607 1059.62,109.644
1061.73,112.925 1063.83,116.447 1065.93,120.21 1068.04,124.212 1070.14,128.452 1072.24,132.928 1074.34,137.638 1076.45,142.582 1078.55,147.757 1080.65,153.161
1082.76,158.793 1084.86,164.651 1086.96,170.731 1089.06,177.033 1091.17,183.554 1093.27,190.292 1095.37,197.244 1097.48,204.407 1099.58,211.78 1101.68,219.36
1103.78,227.143 1105.89,235.127 1107.99,243.31 1110.09,251.688 1112.2,260.259 1114.3,269.019 1116.4,277.965 1118.5,287.094 1120.61,296.403 1122.71,305.889
1124.81,315.547 1126.92,325.376 1129.02,335.37 1131.12,345.527 1133.22,355.843 1135.33,366.314 1137.43,376.937 1139.53,387.708 1141.63,398.623 1143.74,409.678
1145.84,420.869 1147.94,432.192 1150.05,443.643 1152.15,455.219 1154.25,466.914 1156.35,478.725 1158.46,490.648 1160.56,502.678 1162.66,514.811 1164.77,527.042
1166.87,539.368 1168.97,551.785 1171.07,564.286 1173.18,576.869 1175.28,589.528 1177.38,602.26 1179.49,615.059 1181.59,627.921 1183.69,640.842 1185.79,653.817
1187.9,666.84 1190,679.909 1192.1,693.017 1194.21,706.161 1196.31,719.335 1198.41,732.535 1200.51,745.756 1202.62,758.994 1204.72,772.244 1206.82,785.5
1208.93,798.759 1211.03,812.016 1213.13,825.266 1215.23,838.504 1217.34,851.725 1219.44,864.925 1221.54,878.099 1223.65,891.243 1225.75,904.351 1227.85,917.419
1229.95,930.443 1232.06,943.418 1234.16,956.338 1236.26,969.201 1238.37,982 1240.47,994.731 1242.57,1007.39 1244.67,1019.97 1246.78,1032.48 1248.88,1044.89
1250.98,1057.22 1253.08,1069.45 1255.19,1081.58 1257.29,1093.61 1259.39,1105.53 1261.5,1117.35 1263.6,1129.04 1265.7,1140.62 1267.8,1152.07 1269.91,1163.39
1272.01,1174.58 1274.11,1185.64 1276.22,1196.55 1278.32,1207.32 1280.42,1217.95 1282.52,1228.42 1284.63,1238.73 1286.73,1248.89 1288.83,1258.88 1290.94,1268.71
1293.04,1278.37 1295.14,1287.86 1297.24,1297.17 1299.35,1306.29 1301.45,1315.24 1303.55,1324 1305.66,1332.57 1307.76,1340.95 1309.86,1349.13 1311.96,1357.12
1314.07,1364.9 1316.17,1372.48 1318.27,1379.85 1320.38,1387.02 1322.48,1393.97 1324.58,1400.71 1326.68,1407.23 1328.79,1413.53 1330.89,1419.61 1332.99,1425.47
1335.1,1431.1 1337.2,1436.5 1339.3,1441.68 1341.4,1446.62 1343.51,1451.33 1345.61,1455.81 1347.71,1460.05 1349.82,1464.05 1351.92,1467.81 1354.02,1471.33
1356.12,1474.62 1358.23,1477.65 1360.33,1480.45 1362.43,1482.99 1364.53,1485.3 1366.64,1487.35 1368.74,1489.16 1370.84,1490.72 1372.95,1492.03 1375.05,1493.09
1377.15,1493.91 1379.25,1494.47 1381.36,1494.78 1383.46,1494.84 1385.56,1494.66 1387.67,1494.22 1389.77,1493.53 1391.87,1492.59 1393.97,1491.41 1396.08,1489.97
1398.18,1488.29 1400.28,1486.36 1402.39,1484.18 1404.49,1481.75 1406.59,1479.08 1408.69,1476.16 1410.8,1473.01 1412.9,1469.6 1415,1465.96 1417.11,1462.08
1419.21,1457.96 1421.31,1453.6 1423.41,1449.01 1425.52,1444.18 1427.62,1439.12 1429.72,1433.83 1431.83,1428.31 1433.93,1422.57 1436.03,1416.6 1438.13,1410.4
1440.24,1403.99 1442.34,1397.36 1444.44,1390.52 1446.55,1383.46 1448.65,1376.19 1450.75,1368.72 1452.85,1361.03 1454.96,1353.15 1457.06,1345.07 1459.16,1336.78
1461.27,1328.31 1463.37,1319.64 1465.47,1310.79 1467.57,1301.75 1469.68,1292.53 1471.78,1283.14 1473.88,1273.56 1475.98,1263.82 1478.09,1253.91 1480.19,1243.83
1482.29,1233.59 1484.4,1223.2 1486.5,1212.65 1488.6,1201.96 1490.7,1191.11 1492.81,1180.13 1494.91,1169 1497.01,1157.75 1499.12,1146.36 1501.22,1134.84
1503.32,1123.21 1505.42,1111.45 1507.53,1099.59 1509.63,1087.61 1511.73,1075.53 1513.84,1063.35 1515.94,1051.07 1518.04,1038.69 1520.14,1026.23 1522.25,1013.69
1524.35,1001.07 1526.45,988.374 1528.56,975.608 1530.66,962.777 1532.76,949.885 1534.86,936.937 1536.97,923.937 1539.07,910.891 1541.17,897.802 1543.28,884.675
1545.38,871.516 1547.48,858.328 1549.58,845.117 1551.69,831.886 1553.79,818.642 1555.89,805.388 1558,792.13 1560.1,778.871 1562.2,765.618 1564.3,752.373
1566.41,739.143 1568.51,725.932 1570.61,712.744 1572.72,699.585 1574.82,686.458 1576.92,673.369 1579.02,660.323 1581.13,647.323 1583.23,634.375 1585.33,621.483
1587.43,608.651 1589.54,595.886 1591.64,583.189 1593.74,570.568 1595.85,558.025 1597.95,545.566 1600.05,533.194 1602.15,520.914 1604.26,508.731 1606.36,496.649
1608.46,484.673 1610.57,472.805 1612.67,461.051 1614.77,449.416 1616.87,437.902 1618.98,426.514 1621.08,415.256 1623.18,404.133 1625.29,393.148 1627.39,382.305
1629.49,371.607 1631.59,361.06 1633.7,350.665 1635.8,340.428 1637.9,330.352 1640.01,320.44 1642.11,310.697 1644.21,301.124 1646.31,291.726 1648.42,282.507
1650.52,273.469 1652.62,264.615 1654.73,255.95 1656.83,247.475 1658.93,239.194 1661.03,231.11 1663.14,223.226 1665.24,215.544 1667.34,208.068 1669.45,200.799
1671.55,193.741 1673.65,186.896 1675.75,180.267 1677.86,173.855 1679.96,167.663 1682.06,161.694 1684.17,155.949 1686.27,150.431 1688.37,145.141 1690.47,140.081
1692.58,135.254 1694.68,130.66 1696.78,126.302 1698.89,122.181 1700.99,118.298 1703.09,114.656 1705.19,111.254 1707.3,108.095 1709.4,105.18 1711.5,102.509
1713.6,100.083 1715.71,97.904 1717.81,95.9721 1719.91,94.2879 1722.02,92.8522 1724.12,91.6655 1726.22,90.7281 1728.32,90.0404 1730.43,89.6027 1732.53,89.415
1734.63,89.4776 1736.74,89.7903 1738.84,90.353 1740.94,91.1656 1743.04,92.2277 1745.15,93.539 1747.25,95.099 1749.35,96.9071 1751.46,98.9627 1753.56,101.265
1755.66,103.814 1757.76,106.607 1759.87,109.644 1761.97,112.925 1764.07,116.447 1766.18,120.21 1768.28,124.212 1770.38,128.452 1772.48,132.928 1774.59,137.638
1776.69,142.582 1778.79,147.757 1780.9,153.161 1783,158.793 1785.1,164.651 1787.2,170.731 1789.31,177.033 1791.41,183.554 1793.51,190.292 1795.62,197.244
1797.72,204.407 1799.82,211.78 1801.92,219.36 1804.03,227.143 1806.13,235.127 1808.23,243.31 1810.34,251.688 1812.44,260.259 1814.54,269.019 1816.64,277.965
1818.75,287.094 1820.85,296.403 1822.95,305.889 1825.05,315.547 1827.16,325.376 1829.26,335.37 1831.36,345.527 1833.47,355.843 1835.57,366.314 1837.67,376.937
1839.77,387.708 1841.88,398.623 1843.98,409.678 1846.08,420.869 1848.19,432.192 1850.29,443.643 1852.39,455.219 1854.49,466.914 1856.6,478.725 1858.7,490.648
1860.8,502.678 1862.91,514.811 1865.01,527.042 1867.11,539.368 1869.21,551.785 1871.32,564.286 1873.42,576.869 1875.52,589.528 1877.63,602.26 1879.73,615.059
1881.83,627.921 1883.93,640.842 1886.04,653.817 1888.14,666.84 1890.24,679.909 1892.35,693.017 1894.45,706.161 1896.55,719.335 1898.65,732.535 1900.76,745.756
1902.86,758.994 1904.96,772.244 1907.07,785.5 1909.17,798.759 1911.27,812.016 1913.37,825.266 1915.48,838.504 1917.58,851.725 1919.68,864.925 1921.79,878.099
1923.89,891.243 1925.99,904.351 1928.09,917.419 1930.2,930.443 1932.3,943.418 1934.4,956.338 1936.5,969.201 1938.61,982 1940.71,994.731 1942.81,1007.39
1944.92,1019.97 1947.02,1032.48 1949.12,1044.89 1951.22,1057.22 1953.33,1069.45 1955.43,1081.58 1957.53,1093.61 1959.64,1105.53 1961.74,1117.35 1963.84,1129.04
1965.94,1140.62 1968.05,1152.07 1970.15,1163.39 1972.25,1174.58 1974.36,1185.64 1976.46,1196.55 1978.56,1207.32 1980.66,1217.95 1982.77,1228.42 1984.87,1238.73
1986.97,1248.89 1989.08,1258.88 1991.18,1268.71 1993.28,1278.37 1995.38,1287.86 1997.49,1297.17 1999.59,1306.29 2001.69,1315.24 2003.8,1324 2005.9,1332.57
2008,1340.95 2010.1,1349.13 2012.21,1357.12 2014.31,1364.9 2016.41,1372.48 2018.52,1379.85 2020.62,1387.02 2022.72,1393.97 2024.82,1400.71 2026.93,1407.23
2029.03,1413.53 2031.13,1419.61 2033.24,1425.47 2035.34,1431.1 2037.44,1436.5 2039.54,1441.68 2041.65,1446.62 2043.75,1451.33 2045.85,1455.81 2047.95,1460.05
2050.06,1464.05 2052.16,1467.81 2054.26,1471.33 2056.37,1474.62 2058.47,1477.65 2060.57,1480.45 2062.67,1482.99 2064.78,1485.3 2066.88,1487.35 2068.98,1489.16
2071.09,1490.72 2073.19,1492.03 2075.29,1493.09 2077.39,1493.91 2079.5,1494.47 2081.6,1494.78 2083.7,1494.84 2085.81,1494.66 2087.91,1494.22 2090.01,1493.53
2092.11,1492.59 2094.22,1491.41 2096.32,1489.97 2098.42,1488.29 2100.53,1486.36 2102.63,1484.18 2104.73,1481.75 2106.83,1479.08 2108.94,1476.16 2111.04,1473.01
2113.14,1469.6 2115.25,1465.96 2117.35,1462.08 2119.45,1457.96 2121.55,1453.6 2123.66,1449.01 2125.76,1444.18 2127.86,1439.12 2129.97,1433.83 2132.07,1428.31
2134.17,1422.57 2136.27,1416.6 2138.38,1410.4 2140.48,1403.99 2142.58,1397.36 2144.69,1390.52 2146.79,1383.46 2148.89,1376.19 2150.99,1368.72 2153.1,1361.03
2155.2,1353.15 2157.3,1345.07 2159.4,1336.78 2161.51,1328.31 2163.61,1319.64 2165.71,1310.79 2167.82,1301.75 2169.92,1292.53 2172.02,1283.14 2174.12,1273.56
2176.23,1263.82 2178.33,1253.91 2180.43,1243.83 2182.54,1233.59 2184.64,1223.2 2186.74,1212.65 2188.84,1201.96 2190.95,1191.11 2193.05,1180.13 2195.15,1169
2197.26,1157.75 2199.36,1146.36 2201.46,1134.84 2203.56,1123.21 2205.67,1111.45 2207.77,1099.59 2209.87,1087.61 2211.98,1075.53 2214.08,1063.35 2216.18,1051.07
2218.28,1038.69 2220.39,1026.23 2222.49,1013.69 2224.59,1001.07 2226.7,988.374 2228.8,975.608 2230.9,962.777 2233,949.885 2235.11,936.937 2237.21,923.937
2239.31,910.891 2241.42,897.802 2243.52,884.675 2245.62,871.516 2247.72,858.328 2249.83,845.117 2251.93,831.886 2254.03,818.642 2256.14,805.388 2258.24,792.13
"/>
<polyline clip-path="url(#clip7303)" style="stroke:#e26f46; stroke-width:4; stroke-opacity:1; fill:none" points="
157.51,89.4072 159.613,89.5323 161.716,89.9075 163.819,90.5327 165.921,91.4077 168.024,92.5322 170.127,93.9057 172.23,95.5278 174.333,97.3978 176.436,99.5152
178.538,101.879 180.641,104.489 182.744,107.343 184.847,110.442 186.95,113.783 189.052,117.365 191.155,121.188 193.258,125.25 195.361,129.549 197.464,134.083
199.567,138.853 201.669,143.854 203.772,149.087 205.875,154.548 207.978,160.237 210.081,166.15 212.184,172.286 214.286,178.643 216.389,185.218 218.492,192.01
220.595,199.015 222.698,206.231 224.801,213.656 226.903,221.286 229.006,229.12 231.109,237.155 233.212,245.387 235.315,253.813 237.418,262.431 239.52,271.238
241.623,280.23 243.726,289.405 245.829,298.758 247.932,308.287 250.035,317.989 252.137,327.859 254.24,337.894 256.343,348.091 258.446,358.447 260.549,368.956
262.652,379.616 264.754,390.424 266.857,401.374 268.96,412.463 271.063,423.687 273.166,435.043 275.269,446.526 277.371,458.131 279.474,469.856 281.577,481.695
283.68,493.645 285.783,505.701 287.886,517.859 289.988,530.115 292.091,542.464 294.194,554.902 296.297,567.425 298.4,580.027 300.503,592.705 302.605,605.454
304.708,618.269 306.811,631.146 308.914,644.081 311.017,657.068 313.12,670.103 315.222,683.182 317.325,696.3 319.428,709.451 321.531,722.633 323.634,735.838
325.736,749.064 327.839,762.305 329.942,775.557 332.045,788.815 334.148,802.074 336.251,815.329 338.353,828.577 340.456,841.811 342.559,855.027 344.662,868.221
346.765,881.388 348.868,894.523 350.97,907.622 353.073,920.68 355.176,933.692 357.279,946.653 359.382,959.56 361.485,972.406 363.587,985.189 365.69,997.903
367.793,1010.54 369.896,1023.11 371.999,1035.59 374.102,1047.98 376.204,1060.28 378.307,1072.49 380.41,1084.6 382.513,1096.6 384.616,1108.5 386.719,1120.28
388.821,1131.95 390.924,1143.49 393.027,1154.91 395.13,1166.2 397.233,1177.36 399.336,1188.38 401.438,1199.26 403.541,1209.99 405.644,1220.58 407.747,1231.01
409.85,1241.29 411.953,1251.4 414.055,1261.36 416.158,1271.14 418.261,1280.76 420.364,1290.2 422.467,1299.46 424.57,1308.55 426.672,1317.45 428.775,1326.16
430.878,1334.68 432.981,1343.01 435.084,1351.15 437.187,1359.08 439.289,1366.81 441.392,1374.34 443.495,1381.66 445.598,1388.77 447.701,1395.67 449.804,1402.36
451.906,1408.82 454.009,1415.07 456.112,1421.09 458.215,1426.9 460.318,1432.47 462.42,1437.82 464.523,1442.94 466.626,1447.82 468.729,1452.47 470.832,1456.89
472.935,1461.07 475.037,1465.01 477.14,1468.72 479.243,1472.18 481.346,1475.4 483.449,1478.37 485.552,1481.11 487.654,1483.59 489.757,1485.83 491.86,1487.83
493.963,1489.57 496.066,1491.07 498.169,1492.32 500.271,1493.32 502.374,1494.07 504.477,1494.57 506.58,1494.82 508.683,1494.82 510.786,1494.57 512.888,1494.07
514.991,1493.32 517.094,1492.32 519.197,1491.07 521.3,1489.57 523.403,1487.83 525.505,1485.83 527.608,1483.59 529.711,1481.11 531.814,1478.37 533.917,1475.4
536.02,1472.18 538.122,1468.72 540.225,1465.01 542.328,1461.07 544.431,1456.89 546.534,1452.47 548.637,1447.82 550.739,1442.94 552.842,1437.82 554.945,1432.47
557.048,1426.9 559.151,1421.09 561.254,1415.07 563.356,1408.82 565.459,1402.36 567.562,1395.67 569.665,1388.77 571.768,1381.66 573.871,1374.34 575.973,1366.81
578.076,1359.08 580.179,1351.15 582.282,1343.01 584.385,1334.68 586.488,1326.16 588.59,1317.45 590.693,1308.55 592.796,1299.46 594.899,1290.2 597.002,1280.76
599.104,1271.14 601.207,1261.36 603.31,1251.4 605.413,1241.29 607.516,1231.01 609.619,1220.58 611.721,1209.99 613.824,1199.26 615.927,1188.38 618.03,1177.36
620.133,1166.2 622.236,1154.91 624.338,1143.49 626.441,1131.95 628.544,1120.28 630.647,1108.5 632.75,1096.6 634.853,1084.6 636.955,1072.49 639.058,1060.28
641.161,1047.98 643.264,1035.59 645.367,1023.11 647.47,1010.54 649.572,997.903 651.675,985.189 653.778,972.406 655.881,959.56 657.984,946.653 660.087,933.692
662.189,920.68 664.292,907.622 666.395,894.523 668.498,881.388 670.601,868.221 672.704,855.027 674.806,841.811 676.909,828.577 679.012,815.329 681.115,802.074
683.218,788.815 685.321,775.557 687.423,762.305 689.526,749.064 691.629,735.838 693.732,722.633 695.835,709.451 697.938,696.3 700.04,683.182 702.143,670.103
704.246,657.068 706.349,644.081 708.452,631.146 710.555,618.269 712.657,605.454 714.76,592.705 716.863,580.027 718.966,567.425 721.069,554.902 723.172,542.464
725.274,530.115 727.377,517.859 729.48,505.701 731.583,493.645 733.686,481.695 735.788,469.856 737.891,458.131 739.994,446.526 742.097,435.043 744.2,423.687
746.303,412.463 748.405,401.374 750.508,390.424 752.611,379.616 754.714,368.956 756.817,358.447 758.92,348.091 761.022,337.894 763.125,327.859 765.228,317.989
767.331,308.287 769.434,298.758 771.537,289.405 773.639,280.23 775.742,271.238 777.845,262.431 779.948,253.813 782.051,245.387 784.154,237.155 786.256,229.12
788.359,221.286 790.462,213.656 792.565,206.231 794.668,199.015 796.771,192.01 798.873,185.218 800.976,178.643 803.079,172.286 805.182,166.15 807.285,160.237
809.388,154.548 811.49,149.087 813.593,143.854 815.696,138.853 817.799,134.083 819.902,129.549 822.005,125.25 824.107,121.188 826.21,117.365 828.313,113.783
830.416,110.442 832.519,107.343 834.622,104.489 836.724,101.879 838.827,99.5152 840.93,97.3978 843.033,95.5278 845.136,93.9057 847.239,92.5322 849.341,91.4077
851.444,90.5327 853.547,89.9075 855.65,89.5323 857.753,89.4072 859.856,89.5323 861.958,89.9075 864.061,90.5327 866.164,91.4077 868.267,92.5322 870.37,93.9057
872.473,95.5278 874.575,97.3978 876.678,99.5152 878.781,101.879 880.884,104.489 882.987,107.343 885.089,110.442 887.192,113.783 889.295,117.365 891.398,121.188
893.501,125.25 895.604,129.549 897.706,134.083 899.809,138.853 901.912,143.854 904.015,149.087 906.118,154.548 908.221,160.237 910.323,166.15 912.426,172.286
914.529,178.643 916.632,185.218 918.735,192.01 920.838,199.015 922.94,206.231 925.043,213.656 927.146,221.286 929.249,229.12 931.352,237.155 933.455,245.387
935.557,253.813 937.66,262.431 939.763,271.238 941.866,280.23 943.969,289.405 946.072,298.758 948.174,308.287 950.277,317.989 952.38,327.859 954.483,337.894
956.586,348.091 958.689,358.447 960.791,368.956 962.894,379.616 964.997,390.424 967.1,401.374 969.203,412.463 971.306,423.687 973.408,435.043 975.511,446.526
977.614,458.131 979.717,469.856 981.82,481.695 983.923,493.645 986.025,505.701 988.128,517.859 990.231,530.115 992.334,542.464 994.437,554.902 996.54,567.425
998.642,580.027 1000.75,592.705 1002.85,605.454 1004.95,618.269 1007.05,631.146 1009.16,644.081 1011.26,657.068 1013.36,670.103 1015.46,683.182 1017.57,696.3
1019.67,709.451 1021.77,722.633 1023.88,735.838 1025.98,749.064 1028.08,762.305 1030.18,775.557 1032.29,788.815 1034.39,802.074 1036.49,815.329 1038.6,828.577
1040.7,841.811 1042.8,855.027 1044.9,868.221 1047.01,881.388 1049.11,894.523 1051.21,907.622 1053.32,920.68 1055.42,933.692 1057.52,946.653 1059.62,959.56
1061.73,972.406 1063.83,985.189 1065.93,997.903 1068.04,1010.54 1070.14,1023.11 1072.24,1035.59 1074.34,1047.98 1076.45,1060.28 1078.55,1072.49 1080.65,1084.6
1082.76,1096.6 1084.86,1108.5 1086.96,1120.28 1089.06,1131.95 1091.17,1143.49 1093.27,1154.91 1095.37,1166.2 1097.48,1177.36 1099.58,1188.38 1101.68,1199.26
1103.78,1209.99 1105.89,1220.58 1107.99,1231.01 1110.09,1241.29 1112.2,1251.4 1114.3,1261.36 1116.4,1271.14 1118.5,1280.76 1120.61,1290.2 1122.71,1299.46
1124.81,1308.55 1126.92,1317.45 1129.02,1326.16 1131.12,1334.68 1133.22,1343.01 1135.33,1351.15 1137.43,1359.08 1139.53,1366.81 1141.63,1374.34 1143.74,1381.66
1145.84,1388.77 1147.94,1395.67 1150.05,1402.36 1152.15,1408.82 1154.25,1415.07 1156.35,1421.09 1158.46,1426.9 1160.56,1432.47 1162.66,1437.82 1164.77,1442.94
1166.87,1447.82 1168.97,1452.47 1171.07,1456.89 1173.18,1461.07 1175.28,1465.01 1177.38,1468.72 1179.49,1472.18 1181.59,1475.4 1183.69,1478.37 1185.79,1481.11
1187.9,1483.59 1190,1485.83 1192.1,1487.83 1194.21,1489.57 1196.31,1491.07 1198.41,1492.32 1200.51,1493.32 1202.62,1494.07 1204.72,1494.57 1206.82,1494.82
1208.93,1494.82 1211.03,1494.57 1213.13,1494.07 1215.23,1493.32 1217.34,1492.32 1219.44,1491.07 1221.54,1489.57 1223.65,1487.83 1225.75,1485.83 1227.85,1483.59
1229.95,1481.11 1232.06,1478.37 1234.16,1475.4 1236.26,1472.18 1238.37,1468.72 1240.47,1465.01 1242.57,1461.07 1244.67,1456.89 1246.78,1452.47 1248.88,1447.82
1250.98,1442.94 1253.08,1437.82 1255.19,1432.47 1257.29,1426.9 1259.39,1421.09 1261.5,1415.07 1263.6,1408.82 1265.7,1402.36 1267.8,1395.67 1269.91,1388.77
1272.01,1381.66 1274.11,1374.34 1276.22,1366.81 1278.32,1359.08 1280.42,1351.15 1282.52,1343.01 1284.63,1334.68 1286.73,1326.16 1288.83,1317.45 1290.94,1308.55
1293.04,1299.46 1295.14,1290.2 1297.24,1280.76 1299.35,1271.14 1301.45,1261.36 1303.55,1251.4 1305.66,1241.29 1307.76,1231.01 1309.86,1220.58 1311.96,1209.99
1314.07,1199.26 1316.17,1188.38 1318.27,1177.36 1320.38,1166.2 1322.48,1154.91 1324.58,1143.49 1326.68,1131.95 1328.79,1120.28 1330.89,1108.5 1332.99,1096.6
1335.1,1084.6 1337.2,1072.49 1339.3,1060.28 1341.4,1047.98 1343.51,1035.59 1345.61,1023.11 1347.71,1010.54 1349.82,997.903 1351.92,985.189 1354.02,972.406
1356.12,959.56 1358.23,946.653 1360.33,933.692 1362.43,920.68 1364.53,907.622 1366.64,894.523 1368.74,881.388 1370.84,868.221 1372.95,855.027 1375.05,841.811
1377.15,828.577 1379.25,815.329 1381.36,802.074 1383.46,788.815 1385.56,775.557 1387.67,762.305 1389.77,749.064 1391.87,735.838 1393.97,722.633 1396.08,709.451
1398.18,696.3 1400.28,683.182 1402.39,670.103 1404.49,657.068 1406.59,644.081 1408.69,631.146 1410.8,618.269 1412.9,605.454 1415,592.705 1417.11,580.027
1419.21,567.425 1421.31,554.902 1423.41,542.464 1425.52,530.115 1427.62,517.859 1429.72,505.701 1431.83,493.645 1433.93,481.695 1436.03,469.856 1438.13,458.131
1440.24,446.526 1442.34,435.043 1444.44,423.687 1446.55,412.463 1448.65,401.374 1450.75,390.424 1452.85,379.616 1454.96,368.956 1457.06,358.447 1459.16,348.091
1461.27,337.894 1463.37,327.859 1465.47,317.989 1467.57,308.287 1469.68,298.758 1471.78,289.405 1473.88,280.23 1475.98,271.238 1478.09,262.431 1480.19,253.813
1482.29,245.387 1484.4,237.155 1486.5,229.12 1488.6,221.286 1490.7,213.656 1492.81,206.231 1494.91,199.015 1497.01,192.01 1499.12,185.218 1501.22,178.643
1503.32,172.286 1505.42,166.15 1507.53,160.237 1509.63,154.548 1511.73,149.087 1513.84,143.854 1515.94,138.853 1518.04,134.083 1520.14,129.549 1522.25,125.25
1524.35,121.188 1526.45,117.365 1528.56,113.783 1530.66,110.442 1532.76,107.343 1534.86,104.489 1536.97,101.879 1539.07,99.5152 1541.17,97.3978 1543.28,95.5278
1545.38,93.9057 1547.48,92.5322 1549.58,91.4077 1551.69,90.5327 1553.79,89.9075 1555.89,89.5323 1558,89.4072 1560.1,89.5323 1562.2,89.9075 1564.3,90.5327
1566.41,91.4077 1568.51,92.5322 1570.61,93.9057 1572.72,95.5278 1574.82,97.3978 1576.92,99.5152 1579.02,101.879 1581.13,104.489 1583.23,107.343 1585.33,110.442
1587.43,113.783 1589.54,117.365 1591.64,121.188 1593.74,125.25 1595.85,129.549 1597.95,134.083 1600.05,138.853 1602.15,143.854 1604.26,149.087 1606.36,154.548
1608.46,160.237 1610.57,166.15 1612.67,172.286 1614.77,178.643 1616.87,185.218 1618.98,192.01 1621.08,199.015 1623.18,206.231 1625.29,213.656 1627.39,221.286
1629.49,229.12 1631.59,237.155 1633.7,245.387 1635.8,253.813 1637.9,262.431 1640.01,271.238 1642.11,280.23 1644.21,289.405 1646.31,298.758 1648.42,308.287
1650.52,317.989 1652.62,327.859 1654.73,337.894 1656.83,348.091 1658.93,358.447 1661.03,368.956 1663.14,379.616 1665.24,390.424 1667.34,401.374 1669.45,412.463
1671.55,423.687 1673.65,435.043 1675.75,446.526 1677.86,458.131 1679.96,469.856 1682.06,481.695 1684.17,493.645 1686.27,505.701 1688.37,517.859 1690.47,530.115
1692.58,542.464 1694.68,554.902 1696.78,567.425 1698.89,580.027 1700.99,592.705 1703.09,605.454 1705.19,618.269 1707.3,631.146 1709.4,644.081 1711.5,657.068
1713.6,670.103 1715.71,683.182 1717.81,696.3 1719.91,709.451 1722.02,722.633 1724.12,735.838 1726.22,749.064 1728.32,762.305 1730.43,775.557 1732.53,788.815
1734.63,802.074 1736.74,815.329 1738.84,828.577 1740.94,841.811 1743.04,855.027 1745.15,868.221 1747.25,881.388 1749.35,894.523 1751.46,907.622 1753.56,920.68
1755.66,933.692 1757.76,946.653 1759.87,959.56 1761.97,972.406 1764.07,985.189 1766.18,997.903 1768.28,1010.54 1770.38,1023.11 1772.48,1035.59 1774.59,1047.98
1776.69,1060.28 1778.79,1072.49 1780.9,1084.6 1783,1096.6 1785.1,1108.5 1787.2,1120.28 1789.31,1131.95 1791.41,1143.49 1793.51,1154.91 1795.62,1166.2
1797.72,1177.36 1799.82,1188.38 1801.92,1199.26 1804.03,1209.99 1806.13,1220.58 1808.23,1231.01 1810.34,1241.29 1812.44,1251.4 1814.54,1261.36 1816.64,1271.14
1818.75,1280.76 1820.85,1290.2 1822.95,1299.46 1825.05,1308.55 1827.16,1317.45 1829.26,1326.16 1831.36,1334.68 1833.47,1343.01 1835.57,1351.15 1837.67,1359.08
1839.77,1366.81 1841.88,1374.34 1843.98,1381.66 1846.08,1388.77 1848.19,1395.67 1850.29,1402.36 1852.39,1408.82 1854.49,1415.07 1856.6,1421.09 1858.7,1426.9
1860.8,1432.47 1862.91,1437.82 1865.01,1442.94 1867.11,1447.82 1869.21,1452.47 1871.32,1456.89 1873.42,1461.07 1875.52,1465.01 1877.63,1468.72 1879.73,1472.18
1881.83,1475.4 1883.93,1478.37 1886.04,1481.11 1888.14,1483.59 1890.24,1485.83 1892.35,1487.83 1894.45,1489.57 1896.55,1491.07 1898.65,1492.32 1900.76,1493.32
1902.86,1494.07 1904.96,1494.57 1907.07,1494.82 1909.17,1494.82 1911.27,1494.57 1913.37,1494.07 1915.48,1493.32 1917.58,1492.32 1919.68,1491.07 1921.79,1489.57
1923.89,1487.83 1925.99,1485.83 1928.09,1483.59 1930.2,1481.11 1932.3,1478.37 1934.4,1475.4 1936.5,1472.18 1938.61,1468.72 1940.71,1465.01 1942.81,1461.07
1944.92,1456.89 1947.02,1452.47 1949.12,1447.82 1951.22,1442.94 1953.33,1437.82 1955.43,1432.47 1957.53,1426.9 1959.64,1421.09 1961.74,1415.07 1963.84,1408.82
1965.94,1402.36 1968.05,1395.67 1970.15,1388.77 1972.25,1381.66 1974.36,1374.34 1976.46,1366.81 1978.56,1359.08 1980.66,1351.15 1982.77,1343.01 1984.87,1334.68
1986.97,1326.16 1989.08,1317.45 1991.18,1308.55 1993.28,1299.46 1995.38,1290.2 1997.49,1280.76 1999.59,1271.14 2001.69,1261.36 2003.8,1251.4 2005.9,1241.29
2008,1231.01 2010.1,1220.58 2012.21,1209.99 2014.31,1199.26 2016.41,1188.38 2018.52,1177.36 2020.62,1166.2 2022.72,1154.91 2024.82,1143.49 2026.93,1131.95
2029.03,1120.28 2031.13,1108.5 2033.24,1096.6 2035.34,1084.6 2037.44,1072.49 2039.54,1060.28 2041.65,1047.98 2043.75,1035.59 2045.85,1023.11 2047.95,1010.54
2050.06,997.903 2052.16,985.189 2054.26,972.406 2056.37,959.56 2058.47,946.653 2060.57,933.692 2062.67,920.68 2064.78,907.622 2066.88,894.523 2068.98,881.388
2071.09,868.221 2073.19,855.027 2075.29,841.811 2077.39,828.577 2079.5,815.329 2081.6,802.074 2083.7,788.815 2085.81,775.557 2087.91,762.305 2090.01,749.064
2092.11,735.838 2094.22,722.633 2096.32,709.451 2098.42,696.3 2100.53,683.182 2102.63,670.103 2104.73,657.068 2106.83,644.081 2108.94,631.146 2111.04,618.269
2113.14,605.454 2115.25,592.705 2117.35,580.027 2119.45,567.425 2121.55,554.902 2123.66,542.464 2125.76,530.115 2127.86,517.859 2129.97,505.701 2132.07,493.645
2134.17,481.695 2136.27,469.856 2138.38,458.131 2140.48,446.526 2142.58,435.043 2144.69,423.687 2146.79,412.463 2148.89,401.374 2150.99,390.424 2153.1,379.616
2155.2,368.956 2157.3,358.447 2159.4,348.091 2161.51,337.894 2163.61,327.859 2165.71,317.989 2167.82,308.287 2169.92,298.758 2172.02,289.405 2174.12,280.23
2176.23,271.238 2178.33,262.431 2180.43,253.813 2182.54,245.387 2184.64,237.155 2186.74,229.12 2188.84,221.286 2190.95,213.656 2193.05,206.231 2195.15,199.015
2197.26,192.01 2199.36,185.218 2201.46,178.643 2203.56,172.286 2205.67,166.15 2207.77,160.237 2209.87,154.548 2211.98,149.087 2214.08,143.854 2216.18,138.853
2218.28,134.083 2220.39,129.549 2222.49,125.25 2224.59,121.188 2226.7,117.365 2228.8,113.783 2230.9,110.442 2233,107.343 2235.11,104.489 2237.21,101.879
2239.31,99.5152 2241.42,97.3978 2243.52,95.5278 2245.62,93.9057 2247.72,92.5322 2249.83,91.4077 2251.93,90.5327 2254.03,89.9075 2256.14,89.5323 2258.24,89.4072
"/>
<polygon clip-path="url(#clip7301)" points="
1958.43,312.204 2249.26,312.204 2249.26,130.764 1958.43,130.764
" fill="#ffffff" fill-rule="evenodd" fill-opacity="1"/>
<polyline clip-path="url(#clip7301)" style="stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none" points="
1958.43,312.204 2249.26,312.204 2249.26,130.764 1958.43,130.764 1958.43,312.204
"/>
<polyline clip-path="url(#clip7301)" style="stroke:#009af9; stroke-width:4; stroke-opacity:1; fill:none" points="
1982.43,191.244 2126.43,191.244
"/>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:start;" transform="rotate(0, 2150.43, 208.744)" x="2150.43" y="208.744">y1</text>
</g>
<polyline clip-path="url(#clip7301)" style="stroke:#e26f46; stroke-width:4; stroke-opacity:1; fill:none" points="
1982.43,251.724 2126.43,251.724
"/>
<g clip-path="url(#clip7301)">
<text style="fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:start;" transform="rotate(0, 2150.43, 269.224)" x="2150.43" y="269.224">y2</text>
</g>
</svg>
</div><h3><a class="nav-anchor" id="Custom-processing-1" href="#Custom-processing-1">Custom processing</a></h3><p>It is possible to give Literate custom pre- and post-processing functions. For example, here we insert two placeholders, which we will replace with something else at time of generation. We have here replaced our placeholders with <code>z</code> and <code>1.0 + 2.0im</code>:</p><div><pre><code class="language-julia">z = 1.0 + 2.0im</code></pre><pre><code class="language-none">1.0 + 2.0im</code></pre></div><h3><a class="nav-anchor" id="documenter-interaction-1" href="#documenter-interaction-1">Documenter.jl interaction</a></h3><p>In the source file it is possible to use Documenter.jl style references, such as <code>@ref</code> and <code>@id</code>. These will be filtered out in the notebook output. For example, <a href="#documenter-interaction-1">here is a link</a>, but it is only visible as a link if you are reading the markdown output. We can also use equations:</p><div>\[\int_\Omega \nabla v \cdot \nabla u\ \mathrm{d}\Omega = \int_\Omega v f\ \mathrm{d}\Omega\]</div><p>using Documenters math syntax. Documenters syntax is automatically changed to <code>\begin{equation} ... \end{equation}</code> in the notebook output to display correctly.</p><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p><footer><hr/><a class="previous" href="../../documenter/"><span class="direction">Previous</span><span class="title"><strong>6.</strong> Interaction with Documenter.jl</span></a></footer></article></body></html>

100
v1.0.5/generated/notebook.ipynb

@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
{
"cells": [
{
"outputs": [],
"cell_type": "markdown",
"source": [
"# Rational numbers\n",
"\n",
"In julia rational numbers can be constructed with the `//` operator.\n",
"Lets define two rational numbers, `x` and `y`:"
],
"metadata": {}
},
{
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "1//3"
},
"metadata": {},
"execution_count": 1
}
],
"cell_type": "code",
"source": [
"x = 1//3"
],
"metadata": {},
"execution_count": 1
},
{
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "2//5"
},
"metadata": {},
"execution_count": 2
}
],
"cell_type": "code",
"source": [
"y = 2//5"
],
"metadata": {},
"execution_count": 2
},
{
"outputs": [],
"cell_type": "markdown",
"source": [
"When adding `x` and `y` together we obtain a new rational number:"
],
"metadata": {}
},
{
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": "11//15"
},
"metadata": {},
"execution_count": 3
}
],
"cell_type": "code",
"source": [
"z = x + y"
],
"metadata": {},
"execution_count": 3
},
{
"outputs": [],
"cell_type": "markdown",
"source": [
"*This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*"
],
"metadata": {}
}
],
"nbformat_minor": 3,
"metadata": {
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.0.3"
},
"kernelspec": {
"name": "julia-1.0",
"display_name": "Julia 1.0.3",
"language": "julia"
}
},
"nbformat": 4
}

6
v1.0.5/generated/outputformats.jl

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
x = 1//3
y = 2//5
z = x + y

2
v1.0.5/index.html

File diff suppressed because one or more lines are too long

12
v1.0.5/outputformats.jl

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
# # Rational numbers
#
# In julia rational numbers can be constructed with the `//` operator.
# Lets define two rational numbers, `x` and `y`:
x = 1//3
#-
y = 2//5
# When adding `x` and `y` together we obtain a new rational number:
z = x + y

38
v1.0.5/outputformats/index.html

File diff suppressed because one or more lines are too long

29
v1.0.5/pipeline/index.html

File diff suppressed because one or more lines are too long

2
v1.0.5/search/index.html

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · Literate.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../index.html"><img class="logo" src="../assets/logo.png" alt="Literate.jl logo"/></a><h1>Literate.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../"><strong>1.</strong> Introduction</a></li><li><a class="toctext" href="../fileformat/"><strong>2.</strong> File Format</a></li><li><a class="toctext" href="../pipeline/"><strong>3.</strong> Processing pipeline</a></li><li><a class="toctext" href="../outputformats/"><strong>4.</strong> Output Formats</a></li><li><a class="toctext" href="../customprocessing/"><strong>5.</strong> Custom pre- and post-processing</a></li><li><a class="toctext" href="../documenter/"><strong>6.</strong> Interaction with Documenter.jl</a></li><li><a class="toctext" href="../generated/example/"><strong>7.</strong> Example</a></li></ul></nav><article><header><nav><ul><li>Search</li></ul></nav><hr/><div id="topbar"><span>Search</span><a class="fa fa-bars" href="#"></a></div></header><h1>Search</h1><p id="search-info">Number of results: <span id="search-results-number">loading...</span></p><ul id="search-results"></ul></article></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>

323
v1.0.5/search_index.js

@ -0,0 +1,323 @@ @@ -0,0 +1,323 @@
var documenterSearchIndex = {"docs": [
{
"location": "#",
"page": "1. Introduction",
"title": "1. Introduction",
"category": "page",
"text": ""
},
{
"location": "#**1.**-Introduction-1",
"page": "1. Introduction",
"title": "1. Introduction",
"category": "section",
"text": "Welcome to the documentation for Literate – a simplistic package for Literate Programming."
},
{
"location": "#What?-1",
"page": "1. Introduction",
"title": "What?",
"category": "section",
"text": "Literate is a package that generates markdown pages (for e.g. Documenter.jl), and Jupyter notebooks, from the same source file. There is also an option to \"clean\" the source from all metadata, and produce a pure Julia script.The main design goal is simplicity. It should be simple to use, and the syntax should be simple. In short, all you have to do is to write a commented julia script!The public interface consists mainly of three functions, all of which take the same script file as input, but generate different output:Literate.markdown: generates a markdown file\nLiterate.notebook: generates an (optionally executed) notebook\nLiterate.script: generates a plain script file, removing all metadata and special syntax."
},
{
"location": "#Why?-1",
"page": "1. Introduction",
"title": "Why?",
"category": "section",
"text": "Examples are (probably) the best way to showcase your awesome package, and examples are often the best way for a new user to learn how to use it. It is therefore important that the documentation of your package contains examples for users to read and study. However, people are different, and we all prefer different ways of trying out a new package. Some people wants to RTFM, others want to explore the package interactively in, for example, a notebook, and some people wants to study the source code. The aim of Literate is to make it easy to give the user all of these options, while still keeping maintenance to a minimum.It is quite common that packages have \"example notebooks\" to showcase the package. Notebooks are great for showcasing a package, but they are not so great with version control, like git. The reason being that a notebook is a very \"rich\" format since it contains output and other metadata. Changes to the notebook thus result in large diffs, which makes it harder to review the actual changes.It is also common that packages include examples in the documentation, for example by using Documenter.jl @example-blocks. This is also great, but it is not quite as interactive as a notebook, for the users who prefer that.Literate tries to solve the problems above by creating the output as a part of the doc build. Literate generates the output based on a single source file which makes it easier to maintain, test, and keep the manual and your example notebooks in sync."
},
{
"location": "fileformat/#",
"page": "2. File Format",
"title": "2. File Format",
"category": "page",
"text": ""
},
{
"location": "fileformat/#**2.**-File-Format-1",
"page": "2. File Format",
"title": "2. File Format",
"category": "section",
"text": "The source file format for Literate is a regular, commented, julia (.jl) scripts. The idea is that the scripts also serve as documentation on their own and it is also simple to include them in the test-suite, with e.g. include, to make sure the examples stay up do date with other changes in your package."
},
{
"location": "fileformat/#Syntax-1",
"page": "2. File Format",
"title": "2.1. Syntax",
"category": "section",
"text": "The basic syntax is simple:lines starting with # are treated as markdown,\nall other lines are treated as julia code.Leading whitespace is allowed before #, but it will be removed when generating the output. Since #-lines is treated as markdown we can not use that for regular julia comments, for this you can instead use ##, which will render as # in the output.Lets look at a simple example:# # Rational numbers\n#\n# In julia rational numbers can be constructed with the `//` operator.\n# Lets define two rational numbers, `x` and `y`:\n\nx = 1//3\ny = 2//5\n\n# When adding `x` and `y` together we obtain a new rational number:\n\nz = x + yIn the lines starting with # we can use regular markdown syntax, for example the # used for the heading and the backticks for formatting code. The other lines are regular julia code. We note a couple of things:The script is valid julia, which means that we can include it and the example will run (for example in the test/runtests.jl script, to include the example in the test suite).\nThe script is \"self-explanatory\", i.e. the markdown lines works as comments and thus serve as good documentation on its own.For simple use this is all you need to know. The following additional special syntax can also be used:#md, #nb, #jl, #src: tags to filter lines, see Filtering Lines,\n#-: tag to manually control chunk-splits, see Custom control over chunk splits.There is also some default convenience replacements that will always be performed, see Default Replacements."
},
{
"location": "fileformat/#Filtering-Lines-1",
"page": "2. File Format",
"title": "2.2. Filtering Lines",
"category": "section",
"text": "It is often useful to filter out lines in the source depending on the output format. For this purpose there are a number of \"tokens\" that can be used to mark the purpose of certain lines:#md: line exclusive to markdown output,\n#nb: line exclusive to notebook output,\n#jl: line exclusive to script output,\n#src: line exclusive to the source code and thus filtered out unconditionally.Lines starting with one of these tokens are filtered out in the preprocessing step.Suppose, for example, that we want to include a docstring within a @docs block using Documenter. Obviously we don\'t want to include this in the notebook, since @docs is Documenter syntax that the notebook will not understand. This is a case where we can prepend #md to those lines:#md # ```@docs\n#md # Literate.markdown\n#md # Literate.notebook\n#md # Literate.markdown\n#md # ```The lines in the example above would be filtered out in the preprocessing step, unless we are generating a markdown file. When generating a markdown file we would simple remove the leading #md from the lines. Beware that the space after the tag is also removed.The #src token can also be placed at the end of a line. This is to make it possible to have code lines exclusive to the source code, and not just comment lines. For example, if the source file is included in the test suite we might want to add a @test at the end without this showing up in the outputs:using Test #src\n@test result == expected_result #src"
},
{
"location": "fileformat/#Default-Replacements-1",
"page": "2. File Format",
"title": "2.3. Default Replacements",
"category": "section",
"text": "The following convenience \"macros\" are always expanded:@__NAME__\nexpands to the name keyword argument to Literate.markdown, Literate.notebook and Literate.script (defaults to the filename of the input file).\n@__REPO__ROOT_URL__\nexpands to https://github.com/$(ENV[\"TRAVIS_REPO_SLUG\"])/blob/master/ and is a convenient way to use when you want to link to files outside the doc-build directory. For example @__REPO__ROOT_URL__src/Literate.jl would link to the source of the Literate module.\n@__NBVIEWER_ROOT_URL__\nexpands to https://nbviewer.jupyter.org/github/$(ENV[\"TRAVIS_REPO_SLUG\"])/blob/gh-pages/$(folder)/ where folder is the folder that Documenter.deploydocs deploys too. This can be used if you want a link that opens the generated notebook in http://nbviewer.jupyter.org/."
},
{
"location": "pipeline/#",
"page": "3. Processing pipeline",
"title": "3. Processing pipeline",
"category": "page",
"text": ""
},
{
"location": "pipeline/#**3.**-Processing-pipeline-1",
"page": "3. Processing pipeline",
"title": "3. Processing pipeline",
"category": "section",
"text": "The generation of output follows the same pipeline for all output formats:Pre-processing\nParsing\nDocument generation\nPost-processing\nWriting to file"
},
{
"location": "pipeline/#Pre-processing-1",
"page": "3. Processing pipeline",
"title": "3.1. Pre-processing",
"category": "section",
"text": "The first step is pre-processing of the input file. The file is read to a String. The first processing step is to apply the user specified pre-processing function, see Custom pre- and post-processing.The next step is to perform all of the built-in default replacements. CRLF style line endings (\"\\r\\n\") are replaced with LF line endings (\"\\n\") to simplify internal processing. Next, line filtering is performed, see Filtering Lines, meaning that lines starting with #md, #nb or #jl are handled (either just the token itself is removed, or the full line, depending on the output target). The last pre-processing step is to expand the convenience \"macros\" described in Default Replacements is expanded."
},
{
"location": "pipeline/#Parsing-1",
"page": "3. Processing pipeline",
"title": "3.2. Parsing",
"category": "section",
"text": "After the preprocessing the file is parsed. The first step is to categorize each line and mark them as either markdown or code according to the rules described in the Syntax section. Lets consider the example from the previous section with each line categorized:# # Rational numbers <- markdown\n# <- markdown\n# In julia rational numbers can be constructed with the `//` operator. <- markdown\n# Lets define two rational numbers, `x` and `y`: <- markdown\n <- code\nx = 1 // 3 <- code\ny = 2 // 5 <- code\n <- code\n# When adding `x` and `y` together we obtain a new rational number: <- markdown\n <- code\nz = x + y <- codeIn the next step the lines are grouped into \"chunks\" of markdown and code. This is done by simply collecting adjacent lines of the same \"type\" into chunks:# # Rational numbers ┐\n# │\n# In julia rational numbers can be constructed with the `//` operator. │ markdown\n# Lets define two rational numbers, `x` and `y`: ┘\n ┐\nx = 1 // 3 │\ny = 2 // 5 │ code\n ┘\n# When adding `x` and `y` together we obtain a new rational number: ] markdown\n ┐\nz = x + y ┘ codeIn the last parsing step all empty leading and trailing lines for each chunk are removed, but empty lines within the same block are kept. The leading # tokens are also removed from the markdown chunks. Finally we would end up with the following 4 chunks:Chunks #1:# Rational numbers\n\nIn julia rational numbers can be constructed with the `//` operator.\nLets define two rational numbers, `x` and `y`:Chunk #2:x = 1 // 3\ny = 2 // 5Chunk #3:When adding `x` and `y` together we obtain a new rational number:Chunk #4:z = x + yIt is then up to the Document generation step to decide how these chunks should be treated."
},
{
"location": "pipeline/#Custom-control-over-chunk-splits-1",
"page": "3. Processing pipeline",
"title": "Custom control over chunk splits",
"category": "section",
"text": "Sometimes it is convenient to be able to manually control how the chunks are split. For example, if you want to split a block of code into two, such that they end up in two different @example blocks or notebook cells. The #- token can be used for this purpose. All lines starting with #- are used as \"chunk-splitters\":x = 1 // 3\ny = 2 // 5\n#-\nz = x + yThe example above would result in two consecutive code-chunks.tip: Tip\nThe rest of the line, after #-, is discarded, so it is possible to use e.g. #------------- as a chunk splitter, which may make the source code more readable."
},
{
"location": "pipeline/#Document-generation-1",
"page": "3. Processing pipeline",
"title": "3.3. Document generation",
"category": "section",
"text": "After the parsing it is time to generate the output. What is done in this step is very different depending on the output target, and it is describe in more detail in the Output format sections: Markdown Output, Notebook Output and Script Output. Using the default settings, the following is happening:Markdown output: markdown chunks are printed as-is, code chunks are put inside a code fence (defaults to @example-blocks),\nNotebook output: markdown chunks are printed in markdown cells, code chunks are put in code cells,\nScript output: markdown chunks are discarded, code chunks are printed as-is."
},
{
"location": "pipeline/#Post-processing-1",
"page": "3. Processing pipeline",
"title": "3.4. Post-processing",
"category": "section",
"text": "When the document is generated the user, again, has the option to hook-into the generation with a custom post-processing function. The reason is that one might want to change things that are only visible in the rendered document. See Custom pre- and post-processing."
},
{
"location": "pipeline/#Writing-to-file-1",
"page": "3. Processing pipeline",
"title": "3.5. Writing to file",
"category": "section",
"text": "The last step of the generation is writing to file. The result is written to $(outputdir)/$(name)(.md|.ipynb|.jl) where outputdir is the output directory supplied by the user (for example docs/generated), and name is a user supplied filename. It is recommended to add the output directory to .gitignore since the idea is that the generated documents will be generated as part of the build process rather than beeing files in the repo."
},
{
"location": "outputformats/#",
"page": "4. Output Formats",
"title": "4. Output Formats",
"category": "page",
"text": ""
},
{
"location": "outputformats/#Output-Formats-1",
"page": "4. Output Formats",
"title": "4. Output Formats",
"category": "section",
"text": "When the source is parsed, and have been processed it is time to render the output. We will consider the following source snippet:import Markdown\nMarkdown.parse(\"```julia\\n\" * rstrip(read(\"outputformats.jl\", String)) * \"\\n```\")and see how this is rendered in each of the output formats."
},
{
"location": "outputformats/#Literate.markdown",
"page": "4. Output Formats",
"title": "Literate.markdown",
"category": "function",
"text": "Literate.markdown(inputfile, outputdir; kwargs...)\n\nGenerate a markdown file from inputfile and write the result to the directoryoutputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .md. name is also used to name all the @example blocks, and to replace @__NAME__. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\ndocumenter: boolean that tells if the output is intended to use with Documenter.jl. Defaults to true. See the the manual section on Interaction with Documenter.\ncodefence: A Pair of opening and closing code fence. Defaults to\n\"```@example $(name)\" => \"```\"\nif documenter = true and\n\"```julia\" => \"```\"\nif documenter = false.\ncredit: boolean that controls the addition of This file was generated with Literate.jl ... to the bottom of the page. If you find Literate.jl useful then feel free to keep this to the default, which is true.\n\n\n\n\n\n"
},
{
"location": "outputformats/#Markdown-Output-1",
"page": "4. Output Formats",
"title": "4.1. Markdown Output",
"category": "section",
"text": "The (default) markdown output of the source snippet above is as followsimport Markdown\nfile = joinpath(@__DIR__, \"../src/generated/name.md\")\nstr = \"````markdown\\n\" * rstrip(read(file, String)) * \"\\n````\"\nrm(file)\nMarkdown.parse(str)We note that lines starting with # are printed as regular markdown, and the code lines have been wrapped in @example blocks. We also note that an @meta block have been added, that sets the EditURL variable. This is used by Documenter to redirect the \"Edit on GitHub\" link for the page, see Interaction with Documenter.Some of the output rendering can be controlled with keyword arguments to Literate.markdown:Literate.markdown"
},
{
"location": "outputformats/#Literate.notebook",
"page": "4. Output Formats",
"title": "Literate.notebook",
"category": "function",
"text": "Literate.notebook(inputfile, outputdir; kwargs...)\n\nGenerate a notebook from inputfile and write the result to outputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .ipynb. name is also used to replace @__NAME__. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\nexecute: a boolean deciding if the generated notebook should also be executed or not. Defaults to true. The current working directory is set to outputdir when executing the notebook.\ndocumenter: boolean that says if the source contains Documenter.jl specific things to filter out during notebook generation. Defaults to true. See the the manual section on Interaction with Documenter.\ncredit: boolean that controls the addition of This file was generated with Literate.jl ... to the bottom of the page. If you find Literate.jl useful then feel free to keep this to the default, which is true.\n\n\n\n\n\n"
},
{
"location": "outputformats/#Notebook-Output-1",
"page": "4. Output Formats",
"title": "4.2. Notebook Output",
"category": "section",
"text": "The (default) notebook output of the source snippet can be seen here: notebook.ipynb.We note that lines starting with # are placed in markdown cells, and the code lines have been placed in code cells. By default the notebook is also executed and output cells populated. The current working directory is set to the specified output directory the notebook is executed. Some of the output rendering can be controlled with keyword arguments to Literate.notebook:Literate.notebook"
},
{
"location": "outputformats/#Literate.script",
"page": "4. Output Formats",
"title": "Literate.script",
"category": "function",
"text": "Literate.script(inputfile, outputdir; kwargs...)\n\nGenerate a plain script file from inputfile and write the result to outputdir.\n\nKeyword arguments:\n\nname: name of the output file, excluding .jl. name is also used to replace @__NAME__. Defaults to the filename of inputfile.\npreprocess, postprocess: custom pre- and post-processing functions, see the Custom pre- and post-processing section of the manual. Defaults to identity.\ndocumenter: boolean that says if the source contains Documenter.jl specific things to filter out during script generation. Defaults to true. See the the manual section on Interaction with Documenter.\nkeep_comments: boolean that, if set to true, keeps markdown lines as comments in the output script. Defaults to false.\ncredit: boolean that controls the addition of This file was generated with Literate.jl ... to the bottom of the page. If you find Literate.jl useful then feel free to keep this to the default, which is true.\n\n\n\n\n\n"
},
{
"location": "outputformats/#Script-Output-1",
"page": "4. Output Formats",
"title": "4.3. Script Output",
"category": "section",
"text": "The (default) script output of the source snippet above is as followsimport Markdown\nfile = joinpath(@__DIR__, \"../src/generated/outputformats.jl\")\nstr = \"```julia\\n\" * rstrip(read(file, String)) * \"\\n```\"\nrm(file)\nMarkdown.parse(str)We note that lines starting with # are removed and only the code lines have been kept. Some of the output rendering can be controlled with keyword arguments to Literate.script:Literate.script"
},
{
"location": "customprocessing/#",
"page": "5. Custom pre- and post-processing",
"title": "5. Custom pre- and post-processing",
"category": "page",
"text": ""
},
{
"location": "customprocessing/#Custom-pre-and-post-processing-1",
"page": "5. Custom pre- and post-processing",
"title": "5. Custom pre- and post-processing",
"category": "section",
"text": "Since all packages are different, and may have different demands on how to create a nice example for the documentation it is important that the package maintainer does not feel limited by the by default provided syntax that this package offers. While you can generally come a long way by utilizing line filtering there might be situations where you need to manually hook into the generation and change things. In Literate this is done by letting the user supply custom pre- and post-processing functions that may do transformation of the content.All of the generators (Literate.markdown, Literate.notebook and Literate.script) accepts preprocess and postprocess keyword arguments. The default \"transformation\" is the identity function. The input to the transformation functions is a String, and the output should be the transformed String.preprocess is sent the raw input that is read from the source file (modulo the default line ending transformation). postprocess is given different things depending on the output: For markdown and script output postprocess is given the content String just before writing it to the output file, but for notebook output postprocess is given the dictionary representing the notebook, since, in general, this is more useful."
},
{
"location": "customprocessing/#Example:-Adding-current-date-1",
"page": "5. Custom pre- and post-processing",
"title": "Example: Adding current date",
"category": "section",
"text": "As an example, lets say we want to splice the date of generation into the output. We could of course update our source file before generating the docs, but we could instead use a preprocess function that splices the date into the source for us. Consider the following source file:# # Example\n# This example was generated DATEOFTODAY\n\nx = 1 // 3where DATEOFTODAY is a placeholder, to make it easier for our preprocess function to find the location. Now, lets define the preprocess function, for examplefunction update_date(content)\n content = replace(content, \"DATEOFTODAY\" => Date(now()))\n return content\nendwhich would replace every occurrence of \"DATEOFTODAY\" with the current date. We would now simply give this function to the generator, for example:Literate.markdown(\"input.jl\", \"outputdir\"; preprocess = update_date)"
},
{
"location": "customprocessing/#Example:-Replacing-include-calls-with-included-code-1",
"page": "5. Custom pre- and post-processing",
"title": "Example: Replacing include calls with included code",
"category": "section",
"text": "Let\'s say that we have some individual example files file1, file2, ... etc. that are runnable and also following the style of Literate. These files could be for example used in the test suite of your package.We want to group them all into a single page in our documentation, but we do not want to copy paste the content of file1, ... for robustness: the files are included in the test suite and some changes may occur to them. We want these changes to also be reflected in the documentation.A very easy way to do this is using preprocess to interchange include statements with file content. First, create a runnable .jl following the format of Literate# # Replace includes\n# This is an example to replace `include` calls with the actual file content.\n\ninclude(\"file1.jl\")\n\n# Cool, we just saw the result of the above code snippet. Here is one more:\n\ninclude(\"file2.jl\")Let\'s say we have saved this file as examples.jl. Then, you want to properly define a pre-processing function:function replace_includes(str)\n\n included = [\"file1.jl\", \"file2.jl\"]\n\n # Here the path loads the files from their proper directory,\n # which may not be the directory of the `examples.jl` file!\n path = \"directory/to/example/files/\"\n\n for ex in included\n content = read(path*ex, String)\n str = replace(str, \"include(\\\"$(ex)\\\")\" => content)\n end\n return str\nend(of course replace included with your respective files)Finally, you simply pass this function to e.g. Literate.markdown asLiterate.markdown(\"examples.jl\", \"path/to/save/markdown\";\n name = \"markdown_file_name\", preprocess = replace_includes)and you will see that in the final output file (here markdown_file_name.md) the include statements are replaced with the actual code to be included!This approach is used for example in the documentation of the Julia package TimeseriesPrediction, see here and here for the generating script"
},
{
"location": "documenter/#",
"page": "6. Interaction with Documenter.jl",
"title": "6. Interaction with Documenter.jl",
"category": "page",
"text": ""
},
{
"location": "documenter/#Interaction-with-Documenter-1",
"page": "6. Interaction with Documenter.jl",
"title": "6. Interaction with Documenter.jl",
"category": "section",
"text": "Literate can be used for any purpose, it spits out regular markdown files, and notebooks. Typically, though, these files will be used to render documentation for your package. The generators (Literate.markdown, Literate.notebook and Literate.script) supports a keyword argument documenter that lets the generator perform some extra things, keeping in mind that the source code have been written with Documenter.jl in mind. So lets take a look at what will happen if we set documenter = true:"
},
{
"location": "documenter/#[Literate.markdown](@ref):-1",
"page": "6. Interaction with Documenter.jl",
"title": "Literate.markdown:",
"category": "section",
"text": "The default code fence will change from\n```julia\n# code\n```\nto Documenters @example blocks:\n```@examples $(name)\n# code\n```\nThe following @meta block will be added to the top of the markdown page, which redirects the \"Edit on GitHub\" link on the top of the page to the source file rather than the generated .md file:\n```@meta\nEditURL = \"$(relpath(inputfile, outputdir))\"\n```"
},
{
"location": "documenter/#[Literate.notebook](@ref):-1",
"page": "6. Interaction with Documenter.jl",
"title": "Literate.notebook:",
"category": "section",
"text": "Documenter style @refs and @id will be removed. This means that you can use @ref and @id in the source file without them leaking to the notebook.\nDocumenter style markdown math\n```math\n\\int f dx\n```\nis replaced with notebook compatible\n\\begin{equation}\n\\int f dx\n\\end{equation}"
},
{
"location": "documenter/#[Literate.script](@ref):-1",
"page": "6. Interaction with Documenter.jl",
"title": "Literate.script:",
"category": "section",
"text": "Documenter style @refs and @id will be removed. This means that you can use @ref and @id in the source file without them leaking to the script."
},
{
"location": "generated/example/#",
"page": "7. Example",
"title": "7. Example",
"category": "page",
"text": "EditURL = \"https://github.com/fredrikekre/Literate.jl/blob/master/examples/example.jl\""
},
{
"location": "generated/example/#**7.**-Example-1",
"page": "7. Example",
"title": "7. Example",
"category": "section",
"text": "This is an example generated with Literate based on this source file: example.jl. You are seeing the html-output which Documenter have generated based on a markdown file generated with Literate. The corresponding notebook can be found here: example.ipynb, and the plain script output can be found here: example.jl.It is recommended to have the source file available when reading this, to better understand how the syntax in the source file corresponds to the output you are seeing."
},
{
"location": "generated/example/#Basic-syntax-1",
"page": "7. Example",
"title": "Basic syntax",
"category": "section",
"text": "The basic syntax for Literate is simple, lines starting with # is interpreted as markdown, and all the other lines are interpreted as code. Here is some code:x = 1//3\ny = 2//5In markdown sections we can use markdown syntax. For example, we can write text in italic font, text in bold font and use links.It is possible to filter out lines depending on the output using the #md, #nb, #jl and #src tags (see Filtering Lines):This line starts with #md and is thus only visible in the markdown output.The source file is parsed in chunks of markdown and code. Starting a line with #- manually inserts a chunk break. For example, if we want to display the output of the following operations we may insert #- in between. These two code blocks will now end up in different @example-blocks in the markdown output, and two different notebook cells in the notebook output.x + yx * y"
},
{
"location": "generated/example/#Output-Capturing-1",
"page": "7. Example",
"title": "Output Capturing",
"category": "section",
"text": "Code chunks are by default placed in Documenter @example blocks in the generated markdown. This means that the output will be captured in a block when Documenter is building the docs. In notebooks the output is captured in output cells, if the execute keyword argument is set to true. Output to stdout/stderr is also captured.function foo()\n println(\"This string is printed to stdout.\")\n return [1, 2, 3, 4]\nend\n\nfoo()Both Documenter\'s @example block and notebooks can display images. Here is an example where we generate a simple plot using the Plots.jl packageusing Plots\nx = range(0, stop=6π, length=1000)\ny1 = sin.(x)\ny2 = cos.(x)\nplot(x, [y1, y2])"
},
{
"location": "generated/example/#Custom-processing-1",
"page": "7. Example",
"title": "Custom processing",
"category": "section",
"text": "It is possible to give Literate custom pre- and post-processing functions. For example, here we insert two placeholders, which we will replace with something else at time of generation. We have here replaced our placeholders with z and 1.0 + 2.0im:z = 1.0 + 2.0im"
},
{
"location": "generated/example/#documenter-interaction-1",
"page": "7. Example",
"title": "Documenter.jl interaction",
"category": "section",
"text": "In the source file it is possible to use Documenter.jl style references, such as @ref and @id. These will be filtered out in the notebook output. For example, here is a link, but it is only visible as a link if you are reading the markdown output. We can also use equations:int_Omega nabla v cdot nabla u mathrmdOmega = int_Omega v f mathrmdOmegausing Documenters math syntax. Documenters syntax is automatically changed to \\begin{equation} ... \\end{equation} in the notebook output to display correctly.This page was generated using Literate.jl."
},
]}

1
v1.0.5/siteinfo.js

@ -0,0 +1 @@ @@ -0,0 +1 @@
var DOCUMENTER_CURRENT_VERSION = "v1.0.5";
Loading…
Cancel
Save