diff --git a/document/document.mdk b/document/document.mdk
new file mode 100644
index 0000000..806be72
--- /dev/null
+++ b/document/document.mdk
@@ -0,0 +1,74 @@
+[INCLUDE=bootstrap]
+Title : Bootstrap demo document
+Theme : whitely
+Css : nav-example.css
+Col { .col-lg-4 }
+
+~ Begin Container
+~ Masthead
+
+### 记录生活的点点滴滴 {.text-muted}
+
+* {.active} [首页](#)
+* [文章](#)
+* [Ext](#)
+* [Java](#)
+* [Oracle](#)
+* [关于](#)
+* [联系方式](#)
+{.nav; .nav-justified}
+~
+
+~ Jumbotron
+# 迷过一个人 迷过一件事
+By using the bootstrap framework it is easy to create great looking
+webpages that display well both on Mobile and Desktop platforms.
+In madoko, we can directly use any standard bootstrap class names,
+like `Jumbotron` as a custom block!
+{.lead}
+
+[查看全文](mi.html){.btn; .btn-lg; .btn-success; html-role:button}
+~
+
+
+~ Begin Row
+~ Col
+## Ext
+As of v7.0.1, Safari exhibits a bug in which resizing your browser
+horizontally causes rendering errors in the justified nav that are
+cleared upon refreshing.
+{.text-danger}
+
+Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas
+eget quam. Vestibulum id ligula porta felis euismod semper. Fusce
+dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
+fermentum massa.\
+[View details »](#){.btn; .btn-primary; html-role:button}
+~
+
+~ Col
+## Java
+Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas
+eget quam. Vestibulum id ligula porta felis euismod semper. Fusce
+dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
+fermentum massa.\
+[View details »](#){.btn; .btn-primary; html-role:button}
+~
+
+~ Col
+## Oracle
+Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas
+eget quam. Vestibulum id ligula porta felis euismod semper. Fusce
+dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
+fermentum massa. type here. which is amazing.\
+[View details »](#){.btn; .btn-primary; html-role:button}
+~
+
+~ End Row
+
+~ Footer
+© CC 2018
+~
+
+~ End Container
+
diff --git a/document/out/bootstrap.mdk b/document/out/bootstrap.mdk
new file mode 100644
index 0000000..0eb1cfc
--- /dev/null
+++ b/document/out/bootstrap.mdk
@@ -0,0 +1,26 @@
+Version : 3.2.0
+Theme :
+Bootstrap Url : https://maxcdn.bootstrapcdn.com/bootstrap/&version;/
+Bootswatch Url: https://maxcdn.bootstrapcdn.com/bootswatch/&version;/&theme;/bootstrap.min.css
+Css : &bootstrap-url;css/bootstrap.min.css
+Css : &bootstrap-url;css/bootstrap-theme.min.css
+Css : &bootswatch-url;
+Html Meta : http-equiv="X-UA-Compatible" content="IE=edge"
+Html Meta : name="viewport" content="width=device-width, initial-scale=1"
+Heading Depth : 0
+Toc Depth : 2
+Html Header :
+
+
+Html Footer :
+
+
\ No newline at end of file
diff --git a/document/out/document.html b/document/out/document.html
new file mode 100644
index 0000000..6bd5dff
--- /dev/null
+++ b/document/out/document.html
@@ -0,0 +1,440 @@
+
+
+
+
+
+
+
+
+ Bootstrap demo document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A Webpage in Madoko
+
By using the bootstrap framework it is easy to create great looking
+webpages that display well both on Mobile and Desktop platforms.
+In madoko, we can directly use any standard bootstrap class names,
+like Jumbotron as a custom block!
+
Learn about Bootstrap
+
+
+
+
Safari bug warning!
+
As of v7.0.1, Safari exhibits a bug in which resizing your browser
+horizontally causes rendering errors in the justified nav that are
+cleared upon refreshing.
+
Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas
+eget quam. Vestibulum id ligula porta felis euismod semper. Fusce
+dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
+fermentum massa.
+View details »
+
Heading
+
Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas
+eget quam. Vestibulum id ligula porta felis euismod semper. Fusce
+dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
+fermentum massa.
+View details »
+
Heading
+
Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas
+eget quam. Vestibulum id ligula porta felis euismod semper. Fusce
+dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
+fermentum massa. type here. which is amazing.
+View details »
+
+
+
+
+
diff --git a/document/out/madoko.css b/document/out/madoko.css
new file mode 100644
index 0000000..ab7c472
--- /dev/null
+++ b/document/out/madoko.css
@@ -0,0 +1,377 @@
+/* ---------------------------------------------------
+ Various settings to display madoko elements correctly.
+ For example, lines in tables or a table of contents.
+
+ All rules use specific madoko classes and never just
+ a generic element. This means one can safely include
+ this CSS into any web page without affecting non-madoko
+ content.
+----------------------------------------------------*/
+
+/* The table of contents */
+.madoko .toc>.tocblock .tocblock .tocblock {
+ margin-left: 2.25em;
+}
+
+.madoko .toc>.tocblock .tocblock {
+ margin-left: 1.5em;
+}
+
+.madoko .toc-contents>.tocblock>.tocitem {
+ font-weight: bold;
+}
+
+.madoko .toc {
+ margin-top: 1em;
+}
+
+/* Paragraphs */
+.madoko p.para-continue {
+ margin-bottom: 0pt;
+}
+
+.madoko .para-block+p {
+ margin-top: 0pt;
+}
+
+.madoko ul.para-block, .madoko ol.para-block {
+ margin-top: 0pt;
+ margin-bottom: 0pt;
+}
+
+.madoko ul.para-end, .madoko ol.para-end {
+ margin-bottom: 1em;
+}
+
+.madoko dl {
+ margin-left: 0em;
+}
+
+.madoko blockquote {
+ font-style: italic;
+}
+
+/* Local page links do not get an underline unless hovering */
+.madoko a.localref {
+ text-decoration: none;
+}
+.madoko a.localref:hover {
+ text-decoration: underline;
+}
+
+/* Footnotes */
+.madoko .footnotes {
+ font-size: smaller;
+ margin-top: 2em;
+}
+
+.madoko .footnotes hr {
+ width: 50%;
+ text-align: left;
+}
+
+.madoko .footnote {
+ margin-left: 1em;
+}
+.madoko .footnote-before {
+ margin-left: -1em;
+ width: 1em;
+ display: inline-block;
+}
+
+/* Alignment */
+.madoko .align-center, .madoko .align-center>p {
+ text-align: center !important;
+}
+
+.madoko .align-center pre {
+ text-align: left;
+}
+
+.madoko .align-center>* {
+ margin-left: auto !important;
+ margin-right: auto !important;
+}
+
+.madoko .align-left, .madoko .align-left>p {
+ text-align: left !important;
+}
+
+.madoko .align-left>* {
+ margin-left: 0pt !important;
+ margin-right: auto !important;
+}
+
+.madoko .align-right, .madoko .align-right>p {
+ text-align: right !important;
+}
+
+.madoko .align-right>* {
+ margin-left: auto !important;
+ margin-right: 0pt !important;
+}
+
+.madoko .align-center>table,
+.madoko .align-left>table,
+.madoko .align-right>table {
+ text-align: left !important;
+}
+
+
+/* Equations, Figure's etc. */
+.madoko .equation-before {
+ float: right;
+}
+
+/* Bibliography */
+.madoko .bibitem {
+ font-size: smaller;
+}
+
+.madoko .bibsearch {
+ font-size: x-small;
+ text-decoration:none;
+ color: black;
+ font-family: "Segoe UI Symbol", Symbola, serif;
+}
+
+/* General */
+.madoko .block, .madoko .figure, .madoko .bibitem, .madoko .equation, .madoko div.math {
+ margin-top: 1ex;
+ margin-bottom: 1ex;
+}
+
+.madoko .figure {
+ padding: 0.5em;
+ margin-left: 0pt;
+ margin-right: 0pt;
+}
+
+.madoko .hidden {
+ display: none;
+}
+
+.madoko .invisible {
+ visibility: hidden;
+}
+
+.madoko.preview .invisible {
+ visibility: visible;
+ opacity: 0.5;
+}
+
+.madoko code.code, .madoko span.code {
+ white-space: pre-wrap;
+}
+
+.madoko hr, hr.madoko {
+ border: none;
+ border-bottom: black solid 1px;
+ margin-bottom: 0.5ex;
+}
+
+.madoko .framed>*:first-child {
+ margin-top: 0pt;
+}
+.madoko .framed>*:last-child {
+ margin-bottom: 0pt;
+}
+
+/* Lists */
+
+.madoko ul.list-style-type-dash {
+ list-style-type: none !important;
+}
+
+.madoko ul.list-style-type-dash > li:before {
+ content: "\2013";
+ position: absolute;
+ margin-left: -1em;
+}
+
+/* Tables */
+.madoko table.madoko {
+ border-collapse: collapse;
+}
+.madoko td, .madoko th {
+ padding: 0ex 0.5ex;
+ margin: 0pt;
+ vertical-align: top;
+}
+
+.madoko .cell-border-left {
+ border-left: 1px solid black;
+}
+.madoko .cell-border-right {
+ border-right: 1px solid black;
+}
+
+
+.madoko thead>tr:first-child>.cell-line,
+.madoko tbody:first-child>tr:first-child>.cell-line {
+ border-top: 1px solid black;
+ border-bottom: none;
+}
+
+.madoko .cell-line, .madoko .cell-double-line {
+ border-bottom: 1px solid black;
+ border-top: none;
+}
+
+.madoko .cell-double-line {
+ border-top: 1px solid black;
+ padding-top: 1.5px !important;
+}
+
+
+/* Math Pre */
+.madoko .input-mathpre .MathJax_Display {
+ text-align: left !important;
+}
+
+.madoko div.input-mathpre {
+ text-align: left;
+ margin-top: 1.5ex;
+ margin-bottom: 1ex;
+}
+
+.madoko .math-rendering {
+ text-align: left;
+ white-space: pre;
+ color: gray;
+}
+
+.madoko .mathdisplay {
+ text-align: center;
+}
+
+
+/*---------------------------------------------------------------------------
+ Default style for syntax highlighting
+---------------------------------------------------------------------------*/
+
+.madoko .pretty table {
+ border-collapse: collapse;
+}
+.madoko .pretty td {
+ padding: 0em;
+}
+.madoko .pretty td.empty {
+ min-width: 1.5ex;
+}
+.madoko .pretty td.expander {
+ width: 100em;
+}
+
+/* ---------------------------------------------------
+ Styling for full documents
+----------------------------------------------------*/
+body.madoko, .madoko .serif {
+ font-family: Cambria,"Times New Roman","Liberation Serif","Times",serif;
+}
+.madoko .sans-serif {
+ font-family: "Calibri", "Optima", sans-serif;
+}
+.madoko .symbol {
+ font-family: "Segoe UI Symbol", Symbola, serif;
+}
+
+
+body.madoko {
+ -webkit-text-size-adjust: 100%; /* so math displays well on mobile devices */
+ text-rendering: optimizeLegibility;
+}
+
+body.madoko {
+ max-width: 88ex; /* about 88 characters */
+ margin: 1em auto;
+ padding: 0em 2em;
+}
+
+body.preview.madoko {
+ padding: 0em 1em;
+}
+
+.madoko p {
+ text-align: justify;
+}
+
+/* style headings nicer, especially h5 and h6 */
+.madoko h1, .madoko h2, .madoko h3, .madoko h4 {
+ margin-top: 1.22em;
+ margin-bottom: 1ex;
+}
+.madoko h1+p, .madoko h2+p, .madoko h3+p, .madoko h4+p, .madoko h5+p {
+ margin-top: 1ex;
+}
+.madoko h5, .madoko h6 {
+ margin-top: 1ex;
+ font-size: 1em;
+}
+.madoko h5 {
+ margin-bottom: 0.5ex;
+}
+.madoko h5 + p {
+ margin-top: 0.5ex;
+}
+.madoko h6 {
+ margin-bottom: 0pt;
+}
+.madoko h6 + p {
+ margin-top: 0pt;
+}
+
+
+/* Fix monospace display (see http://code.stephenmorley.org/html-and-css/fixing-browsers-broken-monospace-font-handling/) */
+.madoko pre, .madoko code, .madoko kbd, .madoko samp, .madoko tt,
+.madoko .monospace, .madoko .token-indent, .madoko .reveal pre, .madoko .reveal code, .madoko .email {
+ font-family: Consolas,"Andale Mono WT","Andale Mono",Lucida Console,Monaco,monospace,monospace;
+ font-size: 0.85em;
+}
+.madoko pre code, .madoko .token-indent {
+ font-size: 0.95em;
+}
+
+.madoko pre code {
+ font-family: inherit !important;
+}
+
+/* Code prettify */
+.madoko ol.linenums li {
+ background-color: white;
+ list-style-type: decimal;
+}
+
+/* Merging */
+.madoko .remote {
+ background-color: #F0FFF0;
+}
+.madoko .remote + * {
+ margin-top: 0pt;
+}
+
+/* ---------------------------------------------------
+ Print settings
+----------------------------------------------------*/
+
+@media print {
+ body.madoko {
+ font-size: 10pt;
+ }
+ @page {
+ margin: 1in 1.5in;
+ }
+}
+
+/* ---------------------------------------------------
+ Mobile device settings
+----------------------------------------------------*/
+
+@media only screen and (max-device-width:1024px) {
+ body.madoko {
+ padding: 0em 0.5em;
+ }
+ .madoko li {
+ text-align: left;
+ }
+}
diff --git a/document/out/nav-example.css b/document/out/nav-example.css
new file mode 100644
index 0000000..d2aa97c
--- /dev/null
+++ b/document/out/nav-example.css
@@ -0,0 +1,90 @@
+/* Sample css from the bootstrap project for the webpage example */
+
+body {
+ padding-top: 20px;
+}
+
+.footer {
+ padding-top: 40px;
+ padding-bottom: 40px;
+ margin-top: 40px;
+ border-top: 1px solid #eee;
+}
+
+/* Main marketing message and sign up button */
+.jumbotron {
+ text-align: center;
+ background-color: transparent;
+}
+.jumbotron .btn {
+ padding: 14px 24px;
+ font-size: 21px;
+}
+
+/* Customize the nav-justified links to be fill the entire space of the .navbar */
+
+.nav-justified {
+ background-color: #eee;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+}
+.nav-justified > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ margin-bottom: 0;
+ font-weight: bold;
+ color: #777;
+ text-align: center;
+ background-color: #e5e5e5; /* Old browsers */
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); /* FF3.6+ */
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Chrome 10+,Safari 5.1+ */
+ background-image: -o-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Opera 11.10+ */
+ background-image: linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
+ background-repeat: repeat-x; /* Repeat the gradient */
+ border-bottom: 1px solid #d5d5d5;
+}
+.nav-justified > .active > a,
+.nav-justified > .active > a:hover,
+.nav-justified > .active > a:focus {
+ background-color: #ddd;
+ background-image: none;
+ box-shadow: inset 0 3px 7px rgba(0,0,0,.15);
+}
+.nav-justified > li:first-child > a {
+ border-radius: 5px 5px 0 0;
+}
+.nav-justified > li:last-child > a {
+ border-bottom: 0;
+ border-radius: 0 0 5px 5px;
+}
+
+@media (min-width: 768px) {
+ .nav-justified {
+ max-height: 52px;
+ }
+ .nav-justified > li > a {
+ border-right: 1px solid #d5d5d5;
+ border-left: 1px solid #fff;
+ }
+ .nav-justified > li:first-child > a {
+ border-left: 0;
+ border-radius: 5px 0 0 5px;
+ }
+ .nav-justified > li:last-child > a {
+ border-right: 0;
+ border-radius: 0 5px 5px 0;
+ }
+}
+
+/* Responsive: Portrait tablets and up */
+@media screen and (min-width: 768px) {
+ /* Remove the padding we set earlier */
+ .masthead,
+ .marketing,
+ .footer {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
diff --git a/document/out/prelude.mdk b/document/out/prelude.mdk
new file mode 100644
index 0000000..38bdb33
--- /dev/null
+++ b/document/out/prelude.mdk
@@ -0,0 +1,652 @@
+Package : [heading-base={&heading-base;},section-num={&tex-section-num;},bib-label={&bib-label;},fontspec={&font-spec;}]madoko2
+Logo : False
+Tex2 : True
+Maketitle : False
+Heading Depth : 3
+Toc Depth : 3
+Heading Base : 2
+Tex Section Num : False
+Bib Label : True
+Math Mode : static
+Font Spec : True
+Title Running :
+Author Running :
+Bib Search Url :
+Csl Style :
+
+
+Article { html-elem:article }
+Section { html-elem:section }
+Aside { html-elem:aside }
+Nav,.Toc { html-elem:nav }
+
+.Framed { border: solid black 1px }
+Center { .align-center }
+Remote { tight:true; margin-bottom: 0pt }
+
+Pre { input: pre; .para-block; display:block }
+Code { input: pre }
+Hr { .madoko }
+Table { .madoko }
+Dd { html-elem: dd; margin-left: 1.5em }
+Dt { html-elem: dt; font-weight: bold }
+
+FlushLeft { .align-left }
+FlushRight { .align-right }
+Comment { display: none }
+
+Snippet { input: math; display:block; math-full: true }
+Footnote { label: "[@footnote]{.footnote-label}"; line-adjust: 0 }
+@if html {
+ Footnote {
+ before: "[\/^&label;.^]{.footnote-before}";
+ after : "&nl;&&;null;[↩](#back-&id;){.footnote-backref}";
+ }
+}
+
+@if html && (not full) {
+ math svg share paths: false
+ .body.madoko { tag: false; }
+}
+
+
+.Ul-Li { @ul-li; label: "[(@ul-li)]{.ul-li-label}" }
+.Ol-Li { @ol-li; label: "[(@ol-li)]{.ol-li-label}" }
+.Dl-Li { @dl-li; label: "[(@dl-li)]{.dl-li-label}" }
+Ol { @ol-li: decimal }
+Ul { @ul-li: decimal }
+Dl { @dl-li: decimal }
+.li-label { display: inline-block; width: 2.5em; margin-left: -3em; margin-right: 0.5em; text-align: right }
+
+
+.TexRaw { input: texraw }
+.HtmlRaw { input: htmlraw }
+.MathInline { input: math }
+MathDisplay { input: math; .para-block }
+MathPre { input: mathpre; .para-block }
+MathDefs { input: mathdefs; }
+HtmlOnly { input: htmlonly; tag: false }
+Tex { input: tex; tag: false }
+TexOnly { input: texonly; tag: false }
+Bib { input: tex }
+math-inline { input: math }
+math-display { input: math }
+
+.hidden { display: none }
+.noindent { text-indent: 0em }
+.align-center { text-align: center }
+.texturl { .monospace }
+
+.booktable {
+ rule-top-width : 2px;
+ rule-bottom-width : 2px
+ rule-mid-width : 1.35px;
+ thead-tr-font-weight : normal;
+ rule-top-sep : 4pt;
+ rule-bottom-sep : 4pt;
+ rule-mid-sep : 3pt;
+ thead-tr-1-padding-top : 3pt;
+ thead-tr-padding-bottom : 3pt;
+}
+
+
+
+h0 { label: "[@h0]{.heading-label}"; @h0:upper-roman }
+h1 { label: "[@h1]{.heading-label}" }
+h2 { @h1-h2; label: "[@h1.@h1-h2]{.heading-label}" }
+h3 { @h1-h2-h3; label: "[@h1.@h1-h2.@h1-h2-h3]{.heading-label}" }
+h4 { @h1-h2-h3-h4; label: "[@h1.@h1-h2.@h1-h2-h3.@h1-h2-h3-h4]{.heading-label}" }
+
+heading-endperiod: .
+heading-format : &label;&heading-endperiod;
+
+@if heading-depth>=1 {
+ h1 { before: "[&heading-format;]{.heading-before}" }
+}
+@if heading-depth>=2 {
+ h2 { before: "[&heading-format;]{.heading-before}" }
+}
+@if heading-depth>=3 {
+ h3 { before: "[&heading-format;]{.heading-before}" }
+}
+@if heading-depth>=4 {
+ h4 { before: "[&heading-format;]{.heading-before}" }
+}
+@if toc-depth>=0 {
+ h0 { toc; toc-depth:1 }
+}
+@if toc-depth>=1 {
+ h1 { toc }
+}
+@if toc-depth>=2 {
+ h2 { toc }
+}
+@if toc-depth>=3 {
+ h3 { toc }
+}
+@if toc-depth>=4 {
+ h4 { toc }
+}
+
+h1,h2,h3,h4 {
+ toc-line: "&heading-format;&source;";
+}
+
+.tocblock,.tocitem { tight:true }
+
+
+Defaults : True
+
+lowline : _
+qed : [&box;]{float: right}
+vfill : \/
+@if tex {
+ vfill : [\vfill{}]{input: texraw}
+ lowline : ̲
+ qed : [\qed{}]{input: texraw}
+}
+eg : e.g.
+ie : i.e.
+etal : et al.
+
+LogoLatex : $\mbox{\LaTeX}$
+LogoTex : $\mbox{\TeX}$
+LogoLatexe : $\mbox{\LaTeXe}$
+LogoBibtex : $\mbox{\sc{Bib}\TeX}$
+LogoAmstex : $\mbox{\AmSTeX}$
+LogoMadoko : Created with [Madoko.net](https://www.madoko.net).
+.LogoMadoko { display:block; text-align: right; font-size: xx-small; margin-top: 4em; tight: true }
+
+smallskip : []{display: block; margin-bottom: 0.5em }
+medskip : []{display: block; margin-bottom: 1em }
+bigskip : []{display: block; margin-bottom: 2em }
+@if tex {
+ smallskip : [\smallskip]{input:texraw}
+ medskip : [\medskip]{input:texraw}
+ bigskip : [\bigskip]{input:texraw}
+}
+
+
+note-endperiod : &heading-endperiod;
+note-format : **[&caption;]{.note-caption}**¬e-endperiod;&nl;
+
+.Note { display: block; before: "[¬e-format;]{.note-before}"; caption:"&name-note;" }
+.Remark { .Note; caption: "&name-remark;" }
+.Todo { .Note; caption: "&name-todo;" }
+
+
+Equation {
+ label: "[(@equation)]{.equation-label}";
+ replace: '[&label;]{.equation-before}&nl;~ Begin MathDisplay { color: "&color;"; math-full: "&math-full;"; line-adjust:0}&nl;&source;&nl;~ End MathDisplay&nl;';
+ tight: true;
+ line-adjust: 0;
+ .para-block;
+ tex-label-before: "&id;";
+}
+
+Math {
+ replace: '~ Begin MathDisplay { color:"&color;"; math-full:"&math-full;"; line-adjust:0}&nl;&source;&nl;~ End MathDisplay&nl;';
+ tight: true;
+ .para-block
+}
+
+MathPreCenter {
+ tex-env:mdmathprecenter;
+ text-align:center;
+}
+
+theorem-caption-end : &&;br;
+theorem-caption-format: ([&source;]{font-style:italic})
+.theorem-caption { replace: '@if source != "" @then "&theorem-caption-format;"' }
+theorem-caption : [&caption;]{.theorem-caption}&theorem-caption-end;
+
+theorem-endperiod : &heading-endperiod;
+theorem-format : **&name-theorem;\ &label;&theorem-endperiod;** &theorem-caption;
+lemma-format : **&name-lemma;\ &label;&theorem-endperiod;** &theorem-caption;
+proposition-format : **&name-proposition;\ &label;&theorem-endperiod;** &theorem-caption;
+corollary-format : **&name-corollary;\ &label;&theorem-endperiod;** &theorem-caption;
+example-format : **&name-example;\ &label;&theorem-endperiod;** &theorem-caption;
+definition-format : **&name-definition;\ &label;&theorem-endperiod;** &theorem-caption;
+proof-format : **&name-proof;**&theorem-endperiod; &theorem-caption;
+
+Theorem {
+ label: '[@theorem]{.theorem-label}';
+ before: '[&theorem-format;]{.theorem-before}';
+}
+Lemma {
+ label: '[@lemma]{.lemma-label}';
+ before: '[&lemma-format;]{.lemma-before}'
+}
+Proof {
+ before: "[&proof-format;]{.proof-before}";
+ theorem-caption-end: " "
+}
+Proposition {
+ label: '[@proposition]{.proposition-label}';
+ before: '[&proposition-format;]{.proposition-before}';
+}
+Corollary {
+ label: '[@corollary]{.corollary-label}';
+ before: '[&corollary-format;]{.corollary-before}';
+}
+Example {
+ label: '[@example]{.example-label}';
+ before: '[&example-format;]{.example-before}';
+}
+Definition {
+ label: '[@definition]{.definition-label}';
+ before: '[&definition-format;]{.definition-before}';
+}
+Theorem,Lemma,Proof,Corollary,Proposition,Example,Definition {
+ display: block;
+ margin: 1ex 0pt;
+}
+
+
+TableFigure {
+ label: '[@tablefigure]{.table-label}';
+ toc:"tables"; .floating ; float-env: table; float-name: "&name-table;";
+}
+Figure {
+ label: '[@figure]{.figure-label}';
+ toc:"figures"; .floating ; float-env: figure; float-name: "&name-figure;";
+}
+
+WrapFigure {
+ label: '[@wrapfigure]{.wrapfigure-label}';
+ html-elem: figure;
+ .float;
+ float: right;
+ tex-float: outside;
+ width: 40%;
+}
+
+floating-endperiod: .
+floating-format : **&float-name;\ &label;&floating-endperiod;**
+
+.Floating {
+ .align-center;
+ .float;
+ elem : floating;
+ html-elem : figure;
+ toc-line : '&label;. &caption;';
+ after: '&nl;********* {.figureline}&nl;[[&floating-format;]{.caption-before}[&caption;]{.caption-text}]{.figure-caption; html-elem:fig-caption}&nl;{tag:false}&nl;';
+}
+
+SubFigureRow { .columns; .align-center }
+SubFigure {
+ @Figure-SubFigure;
+ @Figure-SubFigure: lower-alpha;
+ label : '@Figure@Figure-SubFigure';
+ fig-label : '(@Figure-SubFigure)';
+ caption : '';
+ after : "&nl;~ Begin SubFigureCaption&nl;&toc-line;&nl;~End SubFigureCaption&nl;";
+ vertical-align: bottom;
+ padding : 0.5ex;
+ tight : true;
+ text-align: center;
+ .column;
+ toc-line : '[&fig-label; ]{.caption-before} &caption;';
+ toc : "figures";
+ toc-depth : 2;
+}
+SubFigureCaption {
+ tight: true;
+ margin-top: 1ex;
+}
+
+toc.toc-contents { before: "# &name-contents; { -; toc:clear; .heading-contents }&nl;" }
+toc.toc-figures { before: "# &name-figures; { -; toc:clear; .heading-figures }&nl;" }
+toc.toc-tables { before: "# &name-tables; { -; toc:clear; .heading-tables }&nl;" }
+
+
+Bibl {
+ @bib;
+}
+.bibitem-label {
+ display: none;
+}
+Bibitem {
+ @bib-bibitem;
+ label : '@bib-bibitem';
+ cite-label: '&label;';
+ bibitem-label: '';
+ tight : true;
+ replace : '@if (bib-search-url!="") and (searchterm!="") @then "&source; [&mglass;](http://&bib-search-url;/search?q=&searchterm;){.bibsearch}"';
+}
+
+@if not (tex) {
+ Bib Search Url: www.bing.com
+ Bibl { before: "# &name-references; { -; .heading-references }&nl;" }
+}
+
+@if not(tex) or (csl-style!="False") {
+ Bibitem { before: '[&bibitem-label;]{.bibitem-before}' }
+}
+@if not(tex) and (csl-style=="False") {
+ Bibitem { bibitem-label:"[&cite-label;]" }
+}
+@if tex and (csl-style!="False") {
+ Bib Label: hide
+ .bibitem-before { tex-cmd:\mdbibitemlabel }
+}
+
+@if tex {
+ bibliography { #sec-bibliography; toc; toc-line: "&name-references;"; tex-label-inner-before:"&id;" }
+}
+
+
+
+
+Html Bib Label Width: 2rem
+
+@if html and not(cite-style~~/^(numeric|super|False)\b/i) {
+ .bibitem-before {
+ display: none;
+ }
+ bibitem {
+ text-indent: -1em;
+ margin-left: 1em;
+ }
+}
+
+@if html and (cite-style~~/^(numeric|super|False)\b/i) {
+ .bibitem-before {
+ padding-right: 0.5em;
+ width : calc(&html-bib-label-width; - 0.5em);
+ text-align : right;
+ font-size : 90%;
+ }
+ bibitem {
+ text-indent: -&html-bib-label-width;;
+ margin-left: &html-bib-label-width;;
+ }
+}
+
+@if html {
+ .bib-doi { font-size: smaller; }
+}
+
+
+
+name-references : References
+name-contents : Contents
+name-figures : Figures
+name-tables : Tables
+name-abstract : Abstract
+
+name-figure : Figure
+name-table : Table
+
+name-note : Note
+name-remark : Remark
+name-todo : Todo
+
+name-theorem : Theorem
+name-lemma : Lemma
+name-proof : Proof
+name-proposition : Proposition
+name-corollary : Corollary
+name-example : Example
+name-definition : Definition
+
+seealso : see also
+sseealso : See also
+
+
+name-and : and
+name-etal : et\ al
+name-editors : editors
+name-eds : eds.
+name-editor : editor
+name-ed : ed.
+name-edby : edited by
+name-edition : edition
+name-edn : edn.
+name-volume : volume
+name-vol : vol.
+name-of : of
+name-number : number
+name-no : no.
+name-in : in
+name-pages : pages
+name-pp : pp.
+name-page : page
+name-p : p.
+name-chapter : chapter
+name-chap : chap.
+name-techreport : Technical Report
+name-techrep : Tech. Rep.
+name-mthesis : Master's thesis
+name-phdthesis : Ph.D. thesis
+name-first : first
+name-firsto : 1st
+name-second : second
+name-secondo : 2nd
+name-third : third
+name-thirdo : 3rd
+name-fourth : fourth
+name-fourtho : 4th
+name-fifth : fifth
+name-fiftho : 5th
+name-st : st
+name-nd : nd
+name-rd : rd
+name-th : th
+name-jan : January
+name-feb : February
+name-mar : March
+name-apr : April
+name-may : May
+name-jun : June
+name-jul : July
+name-aug : August
+name-sep : September
+name-oct : October
+name-nov : November
+name-dec : December
+name-ins : in
+name-inj : in
+
+
+
+.token.keyword { color: blue }
+.token.string.escape { color: gray }
+.token.comment { color: darkgreen }
+.token.constant { color: purple }
+.token.constructor { color: purple }
+.token.type { color: teal }
+.token.type.delimiter { color: teal }
+.token.special { color: navy }
+.token.doc { color: gray }
+.token.meta { color: gray }
+.token.tag { color: navy }
+.token.attribute { color: purple }
+.token.namespace { color: navy }
+.token.title { font-weight: bold }
+
+.token.string,.token.regexp { color: maroon }
+.token.error,.token.invalid { color: red }
+
+.token.number, .token.literal { .constant }
+
+.token.emphasis,.token.italic { font-style: italic }
+.token.strong,.token.bold { font-weight: bold }
+
+pre.pretty, code.pretty { .serif }
+
+.ptoken.identifier { font-style: italic }
+.ptoken.constructor { font-style: italic }
+.ptoken.operator { tex-cmd: "\ppreop" }
+.ptoken.comment { color: gray }
+.ptoken.keyword { .sans-serif }
+
+@if not tex {
+ pre.pretty, code.pretty { font-size: 100% }
+}
+
+@if tex {
+ .token.keyword { color: navy }
+}
+
+
+
+@if html {
+ abstract {
+ before:"**&name-abstract;.** ";
+ margin-left: 3em;
+ margin-right: 3em;
+ font-size: small;
+ }
+}
+
+
+
+HR { tex-cmd: "\mdhr"; display: block }
+Pre { tex-env-outer: mdpre }
+Pre.pretty { tex-env-outer-postfix: pretty }
+Abstract { tex-env: abstract }
+
+H0,H1,H2,H3,H4,H5,H6 { display: block; }
+H0.clearnum,H1.clearnum,H2.clearnum,H3.clearnum,H4.clearnum,H5.clearnum,H6.clearnum {
+ tex-cmd-postfix:"*";
+ toc-line: "&source;";
+}
+
+@if heading-base<=0 {
+ H0 { tex-cmd:"\part" }
+ H1 { tex-cmd:"\part" }
+ H2 { tex-cmd:"\chapter" }
+ H3 { tex-cmd:"\section" }
+ H4 { tex-cmd:"\subsection" }
+ H5 { tex-cmd:"\subsubsection" }
+ H6 { tex-cmd:"\paragraph" }
+}
+@if heading-base==1 {
+ H0 { tex-cmd:"\part" }
+ H1 { tex-cmd:"\chapter" }
+ H2 { tex-cmd:"\section" }
+ H3 { tex-cmd:"\subsection" }
+ H4 { tex-cmd:"\subsubsection" }
+ H5,H6 { tex-cmd:"\paragraph" }
+}
+@if heading-base==2 {
+ H0 { tex-cmd:"\chapter" }
+ H1 { tex-cmd:"\section" }
+ H2 { tex-cmd:"\subsection" }
+ H3 { tex-cmd:"\subsubsection" }
+ H4,H5,H6 { tex-cmd:"\paragraph" }
+}
+@if heading-base>=3 {
+ H0 { tex-cmd:"\section" }
+ H1 { tex-cmd:"\subsection" }
+ H2 { tex-cmd:"\subsubsection" }
+ H3,H4,H5,H6 { tex-cmd:"\paragraph" }
+}
+
+Figure { tex-env-outer: "figure[&tex-float-placement;]"; tex-float-placement: "tbp" }
+TableFigure { tex-env-outer: "table[&tex-float-placement;]"; tex-float-placement: "tbp" }
+.figure-caption { tex-cmd: "\mdcaption" }
+.caption-text { tex-cmd: "\mdcaptiontext" }
+.wide { tex-env-outer-postfix: "*" }
+.figure-label { tex-cmd: "\mdcaptionlabel" }
+.table-label { tex-cmd: "\mdcaptionlabel" }
+
+Li { tex-cmd-before: "\item" }
+Ul { tex-env: "itemize" }
+Ol { tex-env: "enumerate" }
+Dl { tex-env: "mddefinitions" }
+Dt { tex-cmd: "\mddefterm"; .noindent }
+Dd { tex-env: "mddefdata" }
+Code { tex-cmd: "\mdcode" }
+
+Strong { tex-cmd: "\textbf" }
+Em { tex-cmd: "\emph" }
+Sup { tex-cmd: "\mdsup" }
+Sub { tex-cmd: "\mdsub" }
+Del { tex-cmd: "\mddel" }
+BlockQuote{ tex-env: "quote" }
+.Columns { tex-tabcolsep: "0pt" }
+.Column { tex-env-outer: "mdcolumn" }
+.inst { tex-cmd: "\mdinst" }
+.equation-before { tex-cmd: "\mdmathtag" }
+
+Bibliography { tex-env: "thebibliography{&caption;}"; tex-cmd-after: "\par"; tex-cmd-outer-before: "\mdsetrefname{&name-references;}%mdk&nl;" }
+BibItem { tex-cmd-before:"\bibitem&tex-bibitem-args;"; tex-bibitem-args:"&tex-bibitem-label;{&id;}"; tex-bibitem-label:"" }
+.Newblock { tex-cmd-before="\newblock " }
+toc { tex-env:mdtoc }
+tocblock { tex-env:mdtocblock }
+tocitem { tex-cmd:"\mdtocitemx{&data-toc-target;}" }
+
+bibliography { data-hanging-indent:0 }
+bibliography { tex-cmd-outer: "{\mdbibindent{&data-hanging-indent;}%mdk&nl;" }
+
+bibliography.bib-natural, bibliography.bib-textual {
+ tex-cmd-outer: "{\mdsupressbiblabel\mdbibindent{&data-hanging-indent;}";
+}
+
+@if tex2 {
+ Th { font-weight: "bold" }
+}
+
+@if tex and tex-section-num {
+ .heading-before { display: none }
+}
+
+
+TitleBlock,TitleHeader,Title,Subtitle { tight: true }
+TitleNote,TitleFooter,Authors,AuthorRow,Author { tight: true }
+AuthorName,AuthorAddress,AuthorEmail,AuthorNote { tight: true }
+
+
+@if tex {
+ Maketitle: True
+ .serif { font-family: serif; }
+ .sans-serif { font-family: sans-serif }
+ .monospace { font-family: monospace }
+}
+
+@if Maketitle {
+ Author { display: inline-block }
+ TitleBlock { display: inline-block;
+ tex-cmd-inner-after: "\mdtitleauthorrunning{&title-running;}{&author-running;}";
+ }
+ TitleHeader,Authors,AuthorRow { tag: false }
+ Author { tex-cmd-before:"\mdxauthorstart"; tex-cmd-after:"\mdxauthorend"; display:table-cell }
+ TitleBlock { tex-cmd-before:"\mdxtitleblockstart"; tex-cmd-after:"\mdxtitleblockend"; display:block }
+ Title { tex-cmd:"\mdxtitle" }
+ Subtitle { tex-cmd:"\mdxsubtitle" }
+ TitleNote { tex-cmd:"\mdxtitlenote" }
+ TitleFooter { tex-cmd:"\mdxtitlefooter" }
+ AuthorName { tex-cmd:"\mdxauthorname" }
+ AuthorAddress { tex-cmd:"\mdxauthoraddress" }
+ AuthorNote { tex-cmd:"\mdxauthornote" }
+ AuthorEmail { tex-cmd:"\mdxauthoremail" }
+}
+
+@if not Maketitle {
+ TitleBlock,TitleHeader,Authors,TitleFooter { .align-center }
+ TitleBlock,Title,Subtitle,TitleNote { .para-block }
+
+ Authors { width: 80% }
+ AuthorRow { .columns; margin-top: 2ex; width: 100% }
+ Author { .column; text-align: center }
+ .AuthorEmail { .email }
+
+ Title { font-size: xx-large; font-weight: bold; margin-bottom: 0.5ex }
+ Subtitle { font-size: x-large; margin-bottom: 0.5ex }
+ AuthorName { font-size: large }
+ TitleFooter { margin-top: 0.5ex }
+}
\ No newline at end of file