-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add process for generating the spec PDF
- Loading branch information
1 parent
c3e8245
commit b6dd009
Showing
6 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.head, .toc-nav, .self-link { | ||
display: none; | ||
} | ||
|
||
#toc span { | ||
margin-top: 0 !important; | ||
} | ||
|
||
#toc { | ||
break-after: page; | ||
} | ||
|
||
|
||
#pdf-title, | ||
#copyright, | ||
/* #copyright-before, */ | ||
#copyright-after { | ||
display: block !important; | ||
} | ||
|
||
#copyright { | ||
border: 2px solid black; | ||
padding: 10px; | ||
break-before: page; | ||
break-after: page; | ||
|
||
* { | ||
line-height: 1; | ||
} | ||
} | ||
|
||
#copyright-before, #copyright-after { | ||
break-before: page; | ||
break-after: page; | ||
} | ||
|
||
|
||
#contents { | ||
margin-top: 0; | ||
} | ||
|
||
dt, h1, h2, h3, h4, h5, h6 { | ||
break-after: avoid; | ||
} | ||
|
||
#print-title, #license, #index { | ||
break-before: page; | ||
} | ||
|
||
@page { | ||
margin-top: 4cm; | ||
margin-bottom: 2.5cm; | ||
size: A4 portrait; | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
This document explains how to generate a PDF version of the spec | ||
|
||
1. Open ./cover.odt, adjust the year, and print it as PDF. | ||
2. Add `<link rel="stylesheet" href="./ecma-style/ecma.css">` to the bikeshed | ||
document. | ||
3. View the print preview of the specification as PDF from a browser | ||
- If needed, add `break-before`/`break-after`/`break-inside` CSS rules to | ||
specific elements to ensure that page breaks are inserted in the right | ||
places. | ||
4. Print as PDF the pages containing the "Table of Contents", "Introduction", | ||
and "copyright notice". Also include the empty page after the copyright. | ||
- Make sure that the copyright notice is on an _odd_ page, by toggling | ||
`display: none` on `#copyright-before`. | ||
- Using https://tools.pdf24.org/en/overlay-pdf, overlay the | ||
./headers-and-footers-roman.pdf on top of the generated PDF to add | ||
headers and footers. | ||
5. Print as PDF pages from the one containing the "Scope" section to the end | ||
- Using https://tools.pdf24.org/en/overlay-pdf, overlay the | ||
./headers-and-footers-numbers.pdf on top of the generated PDF to add | ||
headers and footers. | ||
6. Using https://pdfjoiner.com/, merge the 3 PDFs obtained at the previous | ||
steps. | ||
|
||
This has been verified using Firefox. Results with different browsers may vary. | ||
|
||
The files ./headers-and-footers-numbers.pdf and ./headers-and-footers-roman.pdf | ||
have been generated by adding a lot of empty pages in the template for | ||
specifications from the Ecma drive. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters