yamp
Version:
Yet Another Markdown Parser
523 lines (520 loc) • 10.3 kB
CSS
@page {
size: 8.5in 11in;
margin: 0.75in 0.75in 1in 0.75in;
@footnotes {
columns: 2;
margin-top: 2em;
border-top: 0.5px solid #000000;
padding-top: 1em;
}
}
body {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-gap: balance;
-moz-column-gap: balance;
column-gap: balance;
-webkit-column-gap: 0.33in;
-moz-column-gap: 0.33in;
column-gap: 0.33in;
}
.footnote {
float: prince-column-footnote;
}
caption {
caption-side: top;
}
html {
font-size: 9pt;
}
body {
font-family: "Times New Roman", Times, serif;
text-align: justify;
hyphens: auto;
}
h1,
h2,
h3,
h4,
h5,
h6 {
-webkit-column-break-after: avoid;
column-break-after: avoid;
break-after: avoid;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
hyphens: none;
}
h1:not(.counter-skip):before,
h2:not(.counter-skip):before,
h3:not(.counter-skip):before,
h4:not(.counter-skip):before,
h5:not(.counter-skip):before,
h6:not(.counter-skip):before {
margin-right: 0.5em;
}
h1 {
font-size: 1.33333333em;
}
h2 {
font-size: 1.33333333em;
}
h3 {
font-size: 1.22222222em;
}
h4 {
font-size: 1.22222222em;
}
h5 {
font-size: 1.22222222em;
}
h6 {
font-size: 1.22222222em;
}
p {
margin: 0 0 0.5em;
line-height: 1.17;
text-indent: 0;
}
small {
font-size: 0.77777778em;
}
code {
font-family: Courier, monospace;
font-size: 0.88888889em;
font-weight: 400;
white-space: nowrap;
}
q:before {
content: "“";
}
q:after {
content: "”";
}
q > q:before {
content: "‘";
}
q > q:after {
content: "’";
}
table {
width: 100%;
margin: 1.667em 0 1em;
border-collapse: collapse;
}
th,
td {
padding: 0.333em;
border: 0.5px solid #000000;
text-align: center;
}
caption {
margin: 0 0 4pt;
font-weight: bold;
}
figure {
margin: 1.333em 0 2.333em;
text-align: center;
}
figcaption {
font-weight: bold;
}
.footnote {
margin-left: 0.333em;
padding-left: 0.667em;
}
.footnote::footnote-call {
vertical-align: super;
line-height: none;
font-size: 66%;
}
.footnote::footnote-marker {
font-size: 66%;
footnote-style-position: inside;
}
cite {
display: block;
position: relative;
margin-left: 2.5em;
-webkit-column-break-inside: avoid;
column-break-inside: avoid;
break-inside: avoid;
font-style: normal;
text-align: left;
}
cite:before {
position: absolute;
display: inline-block;
margin-left: -2.5em;
}
cite a {
text-decoration: none;
}
a[href^="#"] {
color: inherit;
text-decoration: none;
}
@page {
}
body > :first-child {
counter-reset: page 1;
}
h1:not(.counter-skip) {
counter-increment: section;
}
h2:not(.counter-skip) {
counter-increment: subsection;
}
h3:not(.counter-skip) {
counter-increment: subsubsection;
}
h4:not(.counter-skip) {
counter-increment: subsubsection;
}
h5:not(.counter-skip) {
counter-increment: subsubsubsection;
}
h6:not(.counter-skip) {
counter-increment: subsubsubsubsection;
}
h1.counter-reset {
counter-reset: section;
}
h2.counter-reset {
counter-reset: subsection;
}
h3.counter-reset {
counter-reset: subsubsection;
}
h4.counter-reset {
counter-reset: subsubsection;
}
h5.counter-reset {
counter-reset: subsubsubsection;
}
h6.counter-reset {
counter-reset: subsubsubsubsection;
}
h1:not(.counter-skip):before {
content: "" counter(section, decimal) "";
}
h2:not(.counter-skip):before {
content: "" counter(section, decimal) '.' counter(subsection, decimal) "";
}
h3:not(.counter-skip):before {
content: "" counter(section, decimal) '.' counter(subsection, decimal) '.' counter(subsubsection, decimal) "";
}
h4:not(.counter-skip):before {
content: "" counter(section, decimal) '.' counter(subsection, decimal) '.' counter(subsubsection, decimal) '.' counter(subsubsection, decimal) "";
}
h5:not(.counter-skip):before {
content: "" counter(section, decimal) '.' counter(subsection, decimal) '.' counter(subsubsection, decimal) '.' counter(subsubsection, decimal) '.' counter(subsubsubsection, decimal) "";
}
h6:not(.counter-skip):before {
content: "" counter(section, decimal) '.' counter(subsection, decimal) '.' counter(subsubsection, decimal) '.' counter(subsubsection, decimal) '.' counter(subsubsubsection, decimal) '.' counter(subsubsubsubsection, decimal) "";
}
table {
counter-increment: table;
}
caption:before {
content: "Table " counter(table) ". ";
}
figure {
counter-increment: figure;
}
figcaption:before {
content: "Figure " counter(figure) ". ";
}
.footnote {
counter-increment: footnote;
}
.footnote::footnote-call {
content: counter(footnote);
}
.footnote::footnote-marker {
content: counter(footnote);
}
a[href^="#"] {
content: target-counter(attr(href, url), reference);
}
a[href^="#"]:before {
content: "[";
}
a[href^="#"]:after {
content: "]";
}
a[href^="#"].section {
content: target-counter(attr(href, url), section);
}
a[href^="#"].section:before {
content: "";
}
a[href^="#"].section:after {
content: "";
}
a[href^="#"].subsection {
content: target-counter(attr(href, url), section) "." target-counter(attr(href, url), subsection);
}
a[href^="#"].subsection:before {
content: "";
}
a[href^="#"].subsection:after {
content: "";
}
a[href^="#"].subsubsection {
content: target-counter(attr(href, url), section) "." target-counter(attr(href, url), subsection) "." target-counter(attr(href, url), subsubsection);
}
a[href^="#"].subsubsection:before {
content: "";
}
a[href^="#"].subsubsection:after {
content: "";
}
a[href^="#"].subsubsubsection {
content: target-counter(attr(href, url), section) "." target-counter(attr(href, url), subsection) "." target-counter(attr(href, url), subsubsection) "." target-counter(attr(href, url), subsubsubsection);
}
a[href^="#"].subsubsubsection:before {
content: "";
}
a[href^="#"].subsubsubsection:after {
content: "";
}
a[href^="#"].figure {
content: target-counter(attr(href, url), figure);
}
a[href^="#"].figure:before {
content: "Figure ";
}
a[href^="#"].figure:after {
content: "";
}
a[href^="#"].table {
content: target-counter(attr(href, url), table);
}
a[href^="#"].table:before {
content: "Table ";
}
a[href^="#"].table:after {
content: "";
}
.cites > :not(:first-child):before {
content: none;
}
.cites > :not(:last-child):after {
content: ", ";
}
cite {
counter-increment: reference;
}
cite:before {
content: "[" counter(reference) "]";
}
.col-1 {
-webkit-column-count: 1;
-moz-column-count: 1;
column-count: 1;
}
.col-2 {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
.col-3 {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
}
.col-4 {
-webkit-column-count: 4;
-moz-column-count: 4;
column-count: 4;
}
.col-span {
-webkit-column-span: all;
-moz-column-span: all;
column-span: all;
}
.page-break-after {
-webkit-column-break-after: always;
column-break-after: always;
break-after: always;
}
.page-break-before {
-webkit-column-break-after: always;
column-break-after: always;
break-after: always;
}
.col-break-after {
-webkit-column-break-after: always;
column-break-after: always;
break-after: always;
}
.col-break-before {
-webkit-column-break-after: always;
column-break-after: always;
break-after: always;
}
.counter-skip h1:before,
.counter-skip h2:before,
.counter-skip h3:before,
.counter-skip h4:before,
.counter-skip h5:before,
.counter-skip h6:before,
.counter-skip:before {
margin-right: 0 ;
content: "" ;
}
h1,
h2 {
margin: 1.33333333em 0 0 0;
}
h1 {
text-transform: uppercase;
}
h1:not(.counter-skip):before {
content: "" counter(section) ".";
}
h1 + h2,
h1 + * > h2:first-child {
margin-top: 0;
}
h3,
h4 {
margin: 1.33333333em 0 0 0;
font-style: italic;
font-weight: normal;
}
header {
column-span: all;
margin-bottom: 4em;
font-family: Helvetica, sans-serif;
}
header h2 {
margin: 2em 0;
font-size: 1.333em;
font-weight: normal;
text-align: center;
}
.title {
margin: 0 0 0.333em;
font-family: Helvetica, sans-serif;
font-size: 18pt;
text-align: center;
text-transform: none;
-webkit-column-span: all;
-moz-column-span: all;
column-span: all;
}
.authors {
-webkit-column-gap: 0;
-moz-column-gap: 0;
column-gap: 0;
}
.authors + .authors {
margin-top: 6pt;
}
.author {
-webkit-column-break-inside: avoid;
column-break-inside: avoid;
break-inside: avoid;
-webkit-column-break-after: always;
column-break-after: always;
break-after: always;
text-align: center;
font-size: 10pt;
}
.author a {
color: inherit;
text-decoration: none;
}
.author > :first-child,
.author > :last-child {
font-size: 12pt;
}
.copyright {
height: 1.5in;
float: column-bottom;
font-size: 8pt;
}
.copyright > * {
position: absolute;
left: 0;
bottom: 0;
width: 3.333in;
}
cite {
margin-bottom: 0.333em;
text-align: left;
}
cite a {
text-decoration: none;
}
.appendix {
counter-reset: section;
}
.appendix h1:not(.counter-skip):before {
content: "" counter(section, upper-alpha) "";
}
.appendix h2:not(.counter-skip):before {
content: "" counter(section, upper-alpha) '.' counter(subsection, decimal) "";
}
.appendix h3:not(.counter-skip):before {
content: "" counter(section, upper-alpha) '.' counter(subsection, decimal) '.' counter(subsubsection, decimal) "";
}
.equation {
margin: 3pt 0;
text-align: center;
}
.equation:not(.displaymath) {
position: relative;
counter-increment: equation;
}
.equation:not(.displaymath):after {
content: "(" counter(equation) ")";
position: absolute;
top: 50%;
right: 0;
bottom: 50%;
line-height: 0;
}
.theorem,
.proof,
.definition {
margin: 12pt 0;
}
.theorem:before,
.proof:before,
.definition:before {
margin-left: 9pt;
}
.theorem {
font-style: italic;
}
.theorem:before {
counter-increment: theorem;
content: "Theorem " counter(theorem) ". ";
font-style: normal;
font-variant: small-caps;
}
.proof:before {
counter-increment: proof;
content: "Proof " counter(proof) ". ";
font-style: normal;
font-variant: small-caps;
}
.definition:before {
counter-increment: definition;
content: "Definition " counter(definition) ". ";
font-style: italic;
}
@media screen {
.authors {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
}
.copyright {
display: none;
}
}