Split out CSS; attempt to get section numbering (grrr!)
This commit is contained in:
parent
4716b4f4e9
commit
96c46c19b4
|
@ -1,2 +1,2 @@
|
||||||
preserve.pdf: preserve.md
|
preserve.pdf: preserve.md preserve.css
|
||||||
google-chrome --headless --disable-gpu --print-to-pdf=$@ http://localhost:4000/preserve.html
|
google-chrome --headless --disable-gpu --print-to-pdf=$@ http://localhost:4000/preserve.html
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
body {
|
||||||
|
font-family: palatino, "Palatino Linotype", "Palatino LT STD", "URW Palladio L", "TeX Gyre Pagella", serif;
|
||||||
|
}
|
||||||
|
@media screen {
|
||||||
|
body { padding-top: 2rem; max-width: 40em; margin: auto; font-size: 120%; }
|
||||||
|
hr { display: none; }
|
||||||
|
}
|
||||||
|
@media print {
|
||||||
|
@page { margin: 4rem 0rem 4.333rem 0rem; }
|
||||||
|
body { margin-left: 4.5rem; margin-right: 4.5rem; }
|
||||||
|
h1, h2 { page-break-before: always; margin-top: 0; }
|
||||||
|
h1:first-of-type, h2:first-of-type { page-break-before: auto; }
|
||||||
|
hr+* { page-break-before: always; margin-top: 0; }
|
||||||
|
hr { display: none; }
|
||||||
|
}
|
||||||
|
h1, h2, h3, h4, h5, h6 { margin-left: -1rem; color: #4f81bd; }
|
||||||
|
h2 { border-bottom: solid #4f81bd 1px; }
|
||||||
|
pre, code { background-color: #eee; font-family: "DejaVu Sans Mono", monospace; }
|
||||||
|
code { font-size: 75%; }
|
||||||
|
pre { padding: 0.33rem; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
counter-reset: section 0 subsection 0;
|
||||||
|
}
|
||||||
|
h2::before, h3::before {
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
right: 2.33em;
|
||||||
|
font-size: 75%;
|
||||||
|
text-align: right;
|
||||||
|
width: 2em;
|
||||||
|
margin-right: -2em;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
h2::before {
|
||||||
|
counter-reset: subsection 0;
|
||||||
|
counter-increment: section;
|
||||||
|
content: counter(section) ". ";
|
||||||
|
}
|
||||||
|
h3::before {
|
||||||
|
counter-increment: subsection;
|
||||||
|
content: counter(section) "." counter(subsection) ". ";
|
||||||
|
}
|
|
@ -1,26 +1,7 @@
|
||||||
---
|
---
|
||||||
---
|
---
|
||||||
<title>Preserves: an Expressive Data Language</title>
|
<title>Preserves: an Expressive Data Language</title>
|
||||||
<style>
|
<link rel="stylesheet" href="preserve.css">
|
||||||
body { font-family: palatino, "Palatino Linotype", "Palatino LT STD", "URW Palladio L", "TeX Gyre Pagella", serif; }
|
|
||||||
@media screen {
|
|
||||||
body { padding-top: 2rem; max-width: 40em; margin: auto; font-size: 120%; }
|
|
||||||
hr { display: none; }
|
|
||||||
}
|
|
||||||
@media print {
|
|
||||||
@page { margin: 4rem 4rem 4.333rem 3rem; }
|
|
||||||
body { margin-left: 2rem; margin-right 2rem; }
|
|
||||||
h1, h2 { page-break-before: always; margin-top: 0; }
|
|
||||||
h1:first-of-type, h2:first-of-type { page-break-before: auto; }
|
|
||||||
hr+* { page-break-before: always; margin-top: 0; }
|
|
||||||
hr { display: none; }
|
|
||||||
}
|
|
||||||
h1, h2, h3, h4, h5, h6 { margin-left: -1rem; color: #4f81bd; }
|
|
||||||
h2 { border-bottom: solid #4f81bd 1px; }
|
|
||||||
pre, code { background-color: #eee; font-family: "DejaVu Sans Mono", monospace; }
|
|
||||||
code { font-size: 75%; }
|
|
||||||
pre { padding: 0.33rem; }
|
|
||||||
</style>
|
|
||||||
|
|
||||||
# Preserves: an Expressive Data Language
|
# Preserves: an Expressive Data Language
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue