new print.css stylesheet with fonts in cli

This commit is contained in:
manetta 2021-09-01 16:50:02 +02:00
parent ee2629f518
commit aa6e3f305d
6 changed files with 214 additions and 94 deletions

View File

@ -1,5 +1,7 @@
STYLESHEET=volumetric-regimes.css STYLESHEET=volumetric-regimes.css
.PHONY: css
all: run all: run
install: install:

View File

@ -1,105 +1,135 @@
/* Paged.js variables that can be used: :root{
--font-size: 10pt;
--line-height: 15.5pt;
--small-font-size: 7.5pt;
--small-line-height: 1.55;
--first-indent: 7mm;
--second-indent: 20mm;
}
var(--pagedjs-pagebox-width) for the width of your page @font-face{
var(--pagedjs-pagebox-height) for the height of your page font-family: "bitter";
src: url(../fonts/Bitter-SemiBold.ttf);
*/ font-weight: bold;
font-style: normal;
}
@font-face{
font-family: "bitter";
src: url(../fonts/Bitter-Medium.ttf);
font-weight: normal;
font-style: normal;
}
html, body{
hyphens: auto;
font-family: "bitter";
font-size: var(--font-size);
line-height: var(--line-height);
letter-spacing: 0.01em;
/*orphans: 2;*/
/*widows: 2;*/
}
@page{ @page{
size: 152.4mm 228.6mm; size: 152.4mm 228.6mm;
margin: 15mm 20mm 10mm 20mm;
@top-left{ @top-center{
content: string(sectionTitle); content: string(sectiontitle);
width: 100%; font-size: 8pt;
position: absolute; text-transform: uppercase;
top: 2mm; margin-top: 5mm;
text-align: center; }
font-family: monospace; @bottom-center{
font-size: 8pt; content: counter(page);
color: green; font-size: 9pt;
} margin-top: -6mm;
@top-center{ }
/* copying a h1 to a running element */ }
content: string(contributionTitle); @page:right{
position: absolute; margin: 15mm 20mm 17mm 30mm;
top: 7mm; }
left: 0; @page:left{
width: 100%; margin: 15mm 30mm 17mm 20mm;
text-align: center; }
font-family: monospace; @page:first{
font-size: 8pt; background-color: #b89ee6;
color: magenta;
} @top-left{
@bottom-center{ content: "";
bottom-top:5mm; }
font-family: monospace; @top-center{
font-size: 8pt; content: "";
content: counter(page); }
} @bottom-center{
content: "";
}
}
@page nomarks{
@top-left{
content: "";
}
@top-center{
content: "";
}
@bottom-center{
content: "";
}
}
@page:blank{
@top-left{
content: "";
}
@top-center{
content: "---";
}
@bottom-center{
content: "";
}
} }
body{
font-size: 12pt;
line-height: 16pt;
}
/* running headers */
h1{
string-set: sectionTitle content(text);
page-break-before: always;
}
h2{
string-set: contributionTitle content(text);
/*position: running content(text); */ /* This "moves" the H2 out of the flow */
}
div.section{
break-before: left; /* makes sure the new section always starts on the right page */
}
/* section title */
div.section > h2{
}
div.introduction,
div.contribution{
break-before: left; /* makes sure the new section always starts on the right page */
}
/* general elements*/ /* general elements*/
h1{ h1{
font-size: 37pt; string-set: sectiontitle content(text);
line-height: 1.4; font-size: 37pt;
margin: 0; line-height: 1.4;
color: green; margin: 0;
word-break: normal; color: green;
word-break: normal;
hyphens: none;
} }
h2{ h2{
margin: 0 0 32pt 0; string-set: contributiontitle content(text);
page-break-before: always; font-size: 16pt;
color: magenta; line-height: 22pt;
text-align: center; letter-spacing: 0.025em;
margin: 0 0 1em var(--second-indent);
hyphens: none;
} }
h3, h4, h5, h6{ h3{
margin: 0 0 16pt 0; font-size: 100%;
margin: 1em 0 0 var(--second-indent);
page-break-after: avoid;
hyphens: none;
} }
p{ h4, h5, h6{
margin: 0 0 16pt 0; margin: 0 0 1em 0;
page-break-after: avoid;
hyphens: none;
} }
.thumb{ .thumb{
/* image caption */ /* image caption */
font-size: 10pt; font-size: var(--small-font-size);
line-height: 1.25; line-height: var(--small-line-height);
margin: 24pt 16pt 16pt 16pt; margin: 24pt 16pt 16pt 16pt;
page-break-inside: avoid; page-break-inside: avoid;
} }
img{ img{
position: relative; position: relative;
display: block; display: block;
max-width: 100mm; max-width: 100mm;
height: auto; height: auto;
margin: 0 0 8pt 0; margin: 0 0 8pt 0;
} }
pre{ pre{
font-size: 8pt; font-size: 8pt;
@ -108,21 +138,109 @@ pre{
margin: 16pt 16pt; margin: 16pt 16pt;
} }
table{ table{
width: 100%; width: 100%;
} }
sup{ sup{
line-height: 0; line-height: 0;
} }
a, a,
a:visited, a:visited,
a:active, a:active,
a:hover{ a:hover{
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
font-weight: bold; font-weight: bold;
} }
/* specific details */ /* sections */
div.section{
page-break-before: right;
}
/* sub-sections */
div.introduction,
div.contribution{
page-break-before: right;
}
div.introduction h1{
display: none;
}
div.cover.second,
div.multi,
div.series{
page: nomarks;
}
div.cover.second,
div.multi,
div.series{
page-break-after: always;
}
div.appendix{
page-break-before: always;
}
div.cover{
hyphens: none;
margin: -10mm 0 0 10mm;
}
div.cover,
div.cover ul li{
font-size: 17pt;
line-height: 1.4;
color: white;
font-weight: bold;
}
div.cover ul{
padding: 0;
margin: 2em 0;
}
div.cover ul li{
list-style: none;
margin-bottom: 0.5em;
}
div.cover.second,
div.cover.second ul li{
color: black;
}
div.series{
font-size: var(--small-font-size);
line-height: var(--small-line-height);
}
div.series.about{
width: 55%;
}
div.series.colophon{
columns: 2 auto;
column-gap: 5mm;
column-fill: auto;
}
div.index{
}
div.index h3{
margin: 1em 0;
}
div.introduction,
div.contribution{
}
div.introduction p,
div.contribution p{
text-indent: var(--first-indent);
margin: 0;
padding: 0;
}
div.introduction ol.references,
div.contribution ol.references{
/* notes and references */
font-size: var(--small-font-size);
line-height: var(--small-line-height);
columns: 2 auto;
column-gap: 7mm;
margin: 1em 0;
padding: 0;
}
/* specific details, uitzonderingen */
a.external{ a.external{
word-break: break-all; word-break: break-all;
} }

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script src="./js/paged.js" type="text/javascript"></script> <script src="./js/paged.js" type="text/javascript"></script>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<link href="./css/print.css" rel="stylesheet" type="text/css" media="print"> <link href="./css/print.css" rel="stylesheet" type="text/css" media="print">