Skip to content

Commit 103c9d5

Browse files
authored
* Add PDF rendering (#109)
* Improve validation * Add patent statement (#104) * Add commit hook * Fix pre line breaks * Improve line breaks (#106) * add support for EG
1 parent aeb3f7f commit 103c9d5

24 files changed

+7090
-663
lines changed

css/smpte.css

Lines changed: 102 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@ h1 {
1919
text-align: right;
2020
text-transform: uppercase;
2121
font-weight: bold;
22-
margin-bottom: 2rem;
22+
}
23+
24+
#revision-text {
25+
font-size: 1rem;
26+
text-align: right;
27+
font-weight: bold;
2328
}
2429

2530
#long-doc-type {
2631
font-size: 1.3rem;
2732
text-transform: uppercase;
2833
font-weight: bold;
34+
margin-top: 2rem;
2935
}
3036

3137

@@ -48,8 +54,8 @@ h1 {
4854

4955
#smpte-logo {
5056
float: right;
51-
width: 250px;
52-
margin: 1rem;
57+
width: 200px;
58+
padding-left: 1rem;
5359
}
5460

5561
/* headers */
@@ -60,6 +66,7 @@ h2 {
6066
margin-bottom: 0;
6167
font-size: 1.5rem;
6268
font-weight: bold;
69+
break-after: avoid;
6370
}
6471

6572
h2 span.heading-label {
@@ -73,6 +80,7 @@ h3 {
7380
margin-bottom: 0;
7481
font-size: 1rem;
7582
font-weight: bold;
83+
break-after: avoid;
7684
}
7785

7886
h3 span.heading-label {
@@ -85,6 +93,7 @@ h4 {
8593
margin-bottom: 0;
8694
font-size: 1rem;
8795
font-weight: bold;
96+
break-after: avoid;
8897
}
8998

9099
h4 span.heading-label {
@@ -96,6 +105,7 @@ h5 {
96105
margin-top: 1.5em;
97106
margin-bottom: 0;
98107
font-size: 1rem;
108+
break-after: avoid;
99109
}
100110

101111
h5 span.heading-label {
@@ -107,6 +117,7 @@ h6 {
107117
margin-top: 1.5em;
108118
margin-bottom: 0;
109119
font-size: 1rem;
120+
break-after: avoid;
110121
}
111122

112123
h6 span.heading-label {
@@ -120,8 +131,30 @@ section {
120131
counter-reset: notes-counter;
121132
}
122133

134+
/* foreword */
135+
136+
#sec-foreword {
137+
break-before: page;
138+
}
139+
140+
/* scope */
141+
142+
#sec-scope {
143+
break-before: page;
144+
}
145+
146+
/* bibliography */
147+
148+
#sec-bibliography {
149+
break-before: page;
150+
}
151+
123152
/* annexes */
124153

154+
section.annex {
155+
break-before: page;
156+
}
157+
125158
section.annex > h2 {
126159
text-align: left;
127160
}
@@ -254,6 +287,8 @@ table > caption {
254287
font-weight: bold;
255288
font-size: 0.8rem;
256289
text-align: center;
290+
break-after: avoid;
291+
break-inside: avoid;
257292
}
258293

259294
/* images */
@@ -286,6 +321,8 @@ figcaption {
286321
font-weight: bold;
287322
font-size: 0.8rem;
288323
text-align: center;
324+
break-before: avoid;
325+
break-inside: avoid;
289326
}
290327

291328
figure {
@@ -337,7 +374,7 @@ pre {
337374

338375
line-height: 1.4;
339376

340-
overflow-x: auto;
377+
white-space: pre-wrap;
341378
}
342379

343380
code {
@@ -349,4 +386,65 @@ code {
349386
#sec-draft-warning {
350387
padding: 1rem;
351388
border: 2px lightblue solid;
389+
}
390+
391+
/* print media */
392+
393+
@media print {
394+
395+
#sec-toc ol li a::after {
396+
content: target-counter(attr(href), page);
397+
float: right;
398+
}
399+
400+
#doc-designator {
401+
string-set: pub-designator content(text);
402+
}
403+
404+
#doc-status {
405+
string-set: pub-status content(text);
406+
}
407+
408+
#copyright-text {
409+
string-set: doc-copyright content(text);
410+
}
411+
412+
@page:first {
413+
@top-right {
414+
content: "";
415+
}
416+
}
417+
418+
@page {
419+
@top-right {
420+
content: string(pub-designator);
421+
width: 20rem;
422+
font-size: 10px;
423+
font-weight: bold;
424+
}
425+
426+
@bottom-left {
427+
content: string(doc-copyright);
428+
width: 35em;
429+
font-size: 10px;
430+
font-weight: bold;
431+
}
432+
433+
@bottom-right {
434+
content: "Page " counter(page) " of " counter(pages);
435+
width: 20rem;
436+
font-size: 10px;
437+
font-weight: bold;
438+
}
439+
440+
margin: 0.75in;
441+
padding: 0.1in 0;
442+
}
443+
444+
445+
html {
446+
font-size: 12px;
447+
max-width: none;
448+
}
449+
352450
}

0 commit comments

Comments
 (0)