Browse Source

backup of the print.css work

master
manetta 3 years ago
parent
commit
3769fe33de
  1. 309
      command-line/css/print.css

309
command-line/css/print.css

@ -31,13 +31,45 @@
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
} }
@font-face{ @font-face{
font-family: "bitter_semi"; font-family: "bitter_semi";
src: url(../fonts/Bitter-SemiBold.ttf); src: url(../fonts/Bitter-SemiBold.ttf);
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face{
font-family: "mono";
src: url(../fonts/AnkaCoder-C75-r.ttf);
font-weight: normal;
font-style: normal;
}
@font-face{
font-family: "mono";
src: url(../fonts/AnkaCoder-C75-i.ttf);
font-weight: normal;
font-style: italic;
}
@font-face{
font-family: "mono";
src: url(../fonts/AnkaCoder-C75-b.ttf);
font-weight: bold;
font-style: normal;
}
/* custom markers */
div.page-break{
page-break-after: always;
}
div.column-break{
break-after: column !important;
}
div.no-hyphens{
hyphens: none !important;
}
/* general */
html, body{ html, body{
font-family: "bitter"; font-family: "bitter";
@ -53,7 +85,11 @@ html, body{
@page{ @page{
/*size: 152.4mm 228.6mm;*/ /* Size of the online PDF */ /*size: 152.4mm 228.6mm;*/ /* Size of the online PDF */
/*size: 152mm 229mm;*/ /* Size listed in cover generator of Lightning Source */ /*size: 152mm 229mm;*/ /* Size listed in cover generator of Lightning Source */
size: 164mm 237mm; /* Size of the printed DB06 book */ /*size: 164mm 237mm;*/ /* Size of the physical printed DB06 book */
size: 152.4mm 228.6mm;
bleed: 3mm; /* required bleed by lightningsource */
marks: crop cross;
@bottom-center{ @bottom-center{
content: counter(page); content: counter(page);
@ -62,10 +98,10 @@ html, body{
} }
} }
@page:right{ @page:right{
margin: 15mm 20mm 17mm 30mm; margin: 14.758mm 18mm 21.225mm 29.125mm;
} }
@page:left{ @page:left{
margin: 15mm 30mm 17mm 20mm; margin: 14.758mm 29.125mm 21.225mm 18mm;
} }
@page:right{ @page:right{
/* running header: contribution title (h2) */ /* running header: contribution title (h2) */
@ -85,17 +121,57 @@ html, body{
margin-top: 5mm; margin-top: 5mm;
} }
} }
/*@page section{ @page section{
background-color: lightgray;
@top-center{ @top-center{
content: none; content: none;
} }
}*/ }
@page introduction{ @page section:first{
/* exception running-header for the introduction */ @bottom-center{
content: none;
}
}
/* section title pages */
@page:nth(28){
background-color: lightgray;
}
@page:nth(29){
background-color: lightgray;
}
@page:nth(98){
background-color: lightgray;
}
@page:nth(99){
background-color: lightgray;
}
@page:nth(160){
background-color: lightgray;
}
@page:nth(161){
background-color: lightgray;
}
@page:nth(204){
background-color: lightgray;
}
@page:nth(205){
background-color: lightgray;
}
@page:nth(256){
background-color: lightgray;
}
@page:nth(257){
background-color: lightgray;
}
@page:nth(312){
background-color: lightgray;
}
@page:nth(313){
background-color: lightgray;
}
@page contribution:first{
/* exception for running-header on the first page of a contribution */
@top-center{ @top-center{
content: element(introductiontitle); content: none;
} }
} }
@page:first{ @page:first{
@ -148,33 +224,35 @@ html, body{
} }
} }
/* sections */ /* sections -- page flows */
div.section{ div.section{
/*page: main;*/ page: section;
/* force an extra blank page before each section ... */ /* force an extra blank page before each section ... */
page-break-before: always; page-break-before: always;
} }
div.section.preface_and_introduction{ div.section.preface_and_introduction{
/*page: main;*/
/* reset this extra page break for the preface + introduction section (does not work?) */ /* reset this extra page break for the preface + introduction section (does not work?) */
page-break-before: none !important; /*page-break-before: none !important;*/
} }
div.section h1{ div.section h1{
/*page: section;*/
/* ... and make sure that each section starts on the right */ /* ... and make sure that each section starts on the right */
page-break-before: right; page-break-before: right;
} }
/* sub-sections -- page flows */ /* sub-sections -- page flows */
div.multi, div.multi,
div.preface, div.preface,
div.introduction, div.introduction,
div.contribution{ div.contribution{
page-break-before: right; page-break-before: right;
} }
div.introduction{ div.preface,
page: introduction; div.acknowledgements,
div.introduction,
div.contribution{
page: contribution;
} }
div.section.nomarks, div.section.nomarks,
div.section.toc{ div.section.toc{
@ -260,10 +338,16 @@ div.toc *{
div.toc a::before{ div.toc a::before{
content: target-counter(attr(href url), page); content: target-counter(attr(href url), page);
float: left; float: left;
margin-left: -22mm;
font-weight: normal; font-weight: normal;
/* right aligned */
/* margin-left: -22mm;
text-align: right; text-align: right;
width: 15mm; width: 15mm;*/
/* right aligned */
margin-left: -13mm;
width: 13mm;
} }
div.toc p{ div.toc p{
margin-top: 1em; margin-top: 1em;
@ -304,29 +388,7 @@ div.contribution{
div.contribution h2 + p > b{ div.contribution h2 + p > b{
font-weight: normal; font-weight: normal;
} }
ol.references,
ul /* This is tricky as it has no class, so these styles are applied to ALL ul elements */{
/* notes and references */
font-size: var(--small-font-size);
line-height: var(--small-line-height);
columns: 2 auto;
column-gap: 7mm;
margin: 0 1em;
padding: 0;
}
/* exceptions of columns */
div.cover ul,
div.toc ul{
columns: unset;
}
ul li{
list-style: none;
text-indent: -1em;
}
div.cover ul li,
div.toc ul li{
text-indent: 0;
}
div.item_index{ div.item_index{
hyphens: none; hyphens: none;
} }
@ -349,9 +411,10 @@ div.item_index{
/* Invasive imagination and its agential cuts - figures */ /* Invasive imagination and its agential cuts - figures */
div.two-columns{ div.two-columns{
columns: 2 auto; columns: 2 auto;
column-fill: auto;
} }
div.two-columns div.thumb img{ div.two-columns div.thumb img{
width: 55mm !important; width: 50mm !important;
display: inline-block; display: inline-block;
} }
@ -365,23 +428,41 @@ h1{
word-break: normal; word-break: normal;
hyphens: none; hyphens: none;
} }
/* h1's are followed by a <span class="running-header"></span> */ /* h1's are followed by a <span class="running-header-section"></span> */
.running-header{ .running-header-section{
position: running(sectiontitle); position: running(sectiontitle);
} }
h2{ h2{
/* Contribution titles */ /* Contribution titles */
string-set: contributiontitle content(text) !important; /* using data attributes in HTML to save short versions of the title -- edited on the wiki */ string-set: contributiontitle content(text) !important;
font-family: "bitter_semi"; font-family: "bitter_semi";
font-size: 16pt; font-size: 16pt;
line-height: 22pt; line-height: 22pt;
letter-spacing: 0.025em; letter-spacing: 0.025em;
margin: 0 0 1em var(--second-indent); margin: -1em 0 1em var(--second-indent);
hyphens: none; hyphens: none;
} }
div.preface .running-header, /* author names */
div.introduction .running-header{ div.preface h2,
position: running(introductiontitle); div.introduction h2,
div.contribution h2{
margin-bottom: 0.5em !important;
}
div.preface h2 + p,
div.introduction h2 + p,
div.contribution h2 + p{
margin-left: var(--second-indent);
font-weight: normal;
}
div.preface h2 + p > b,
div.introduction h2 + p > b,
div.contribution h2 + p > b{
font-weight: normal !important;
}
/* introduction running-header exception */
.running-header-contribution{
string-set: contributiontitle content(text) !important;
display: none;
} }
h3{ h3{
/* Sub-headers + Notes/References sections + TOC headers*/ /* Sub-headers + Notes/References sections + TOC headers*/
@ -399,11 +480,11 @@ h4{
/* Sub-sub-headers */ /* Sub-sub-headers */
font-size: 100%; font-size: 100%;
page-break-after: avoid; page-break-after: avoid;
margin: 1em 0 0 var(--second-indent); margin: 1em 0 1em var(--first-indent);
hyphens: none; hyphens: none;
/*font-style: italic;*/ font-style: italic;
font-weight: normal; font-weight: normal;
text-decoration: underline; /*text-decoration: underline;*/
} }
h5, h6{ h5, h6{
margin: 0 0 1em 0; margin: 0 0 1em 0;
@ -417,14 +498,23 @@ p{
} }
/* all exceptions on the text-indent */ /* all exceptions on the text-indent */
div.toc p, div.toc p,
h2 + p, /* author name */
h2 + p, h2 + p,
h2 + p + p + blockquote + p,
div.contribution h2 + p + p + div.thumb,
div.contribution h2 + p + p + div.thumb + p,
div.contribution h2 + p + div.thumb,
h3 + p, h3 + p,
h3 + div.thumb + p,
h4 + p,
div.series p, div.series p,
div.cover p, div.cover p,
div.biographies p, div.biographies p,
div.previously_published p, div.previously_published p,
div.backcover p, div.backcover p,
blockquote p{ blockquote p,
pre + p,
blockquote + p{
text-indent: unset !important; text-indent: unset !important;
} }
div.previously_published p, div.previously_published p,
@ -432,50 +522,124 @@ p{
div.series p{ div.series p{
margin-bottom: 1em; margin-bottom: 1em;
} }
div.contribution ul > li{
list-style: none;
}
div.contribution ul > li:before {
/*content: "- ";*/
margin-left: -4mm;
margin-right: 2mm;
}
ol.references,
h3 + ul /* This is tricky as "references" has no class */{
/* notes and references */
font-size: var(--small-font-size);
line-height: var(--small-line-height);
columns: 2 auto;
column-gap: 7mm;
margin: 0 1em;
padding: 0;
}
h3 + ul > li{
list-style: none;
text-indent: -1em;
}
/* exceptions of columns */
div.cover ul,
div.toc ul{
columns: unset;
list-style: none;
}
div.appendix ul > li,
div.cover ul > li,
div.toc ul > li{
text-indent: 0;
}
div.appendix ul > li:before,
div.cover ul > li:before,
div.toc ul > li:before,{
content: "" !important;
}
img{ img{
position: relative; position: relative;
display: block; display: block;
width: 115mm; /* estimation of the full text width */ width: 105mm; /* full text width */
height: auto; height: auto;
max-height: 200mm; max-height: 200mm;
margin: 1em 0 1em 0; margin: 1em 0 1em 0;
/* PRINT PDF - GRAYSCALE */
/*filter: grayscale(100%);*/
} }
div.thumb{ div.thumb{
/* sometimes wrapper of img + image caption */ /* sometimes wrapper of img + image caption */
font-size: var(--small-font-size); font-size: var(--small-font-size);
line-height: var(--small-line-height); line-height: var(--small-line-height);
margin: 1em var(--first-indent); margin: 1em 0 1em var(--first-indent);
page-break-inside: avoid; page-break-inside: avoid;
break-inside: avoid;
hyphens: none; hyphens: none;
} }
div.thumb div.thumbinner{
width: unset !important;
}
div.thumb img{ div.thumb img{
margin-left: -7mm !important; /* same as first-indent but inverted */ margin-left: -7mm !important; /* same as first-indent but inverted */
} }
div.portrait div.thumb img{
width: auto !important;
min-width: 75mm;
}
div.fullpage{ div.fullpage{
page: fullpage !important; page: fullpage !important;
} }
div.fullpage div.thumb img{ div.fullpage div.thumb{
width: 164mm; margin: 0 !important;
height: 237mm; }
max-height: 237mm; div.fullpage div.thumb img{
margin: -3mm 0 0mm -7mm !important; /* PREVIEW PDF -- these sizes only apply for the preview view! no bleed */
} /*width: 152.4mm;
/* exception for the "circluding" contribution */ max-width: none;
div.fullpage.circluding div.thumb img{ height: 228.6mm;
height: auto !important; max-height: 228.6mm;
width: 155mm !important; margin: -3mm 0 0mm -7mm !important;*/
margin: 3mm 0 5mm -2mm !important;
/* PRINT PDF -- these sizes only apply when the bleed is turned on */
width: 155.4mm;
max-width: none;
height: auto;
max-height: 234.6mm;
margin-top: -6mm !important;
margin-bottom: 0 !important;
}
div.fullpage.left div.thumb img{
margin-left: -10mm !important;
}
div.fullpage.right div.thumb img{
margin-left: -7mm !important;
}
div.special_image_treatment.userinfo img{
width: auto !important;
max-width: auto !important;
height: 180mm !important;
max-height: 180mm !important;
} }
pre{ pre{
font-size: 8pt; font-family: "mono";
line-height: 1.8; font-size: 9pt;
white-space: normal; line-height: 13pt;
margin: 1em var(--first-indent); hyphens: none;
white-space: pre-wrap;
margin: 1em 0 1em var(--second-indent);
} }
blockquote{ blockquote{
margin: 0 0 0 var(--second-indent); margin: 0 0 0 var(--second-indent);
font-style: italic; font-style: italic;
} }
blockquote.pull{
margin: 1em 0 1em var(--second-indent) !important;
}
table{ table{
width: 100%; width: 100%;
} }
@ -496,6 +660,7 @@ a:active,
a:hover{ a:hover{
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
page-break-inside: avoid;
} }
/* specific details, uitzonderingen */ /* specific details, uitzonderingen */

Loading…
Cancel
Save