You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to keep the css together but it doesn't feel super logically grouped so I wound up rearranging everything. Sorry future git-blamer. Units of measurements are all over the place, here's what defines them:
- mm for page-related units
- pt for text-related units
- em for horizontal units
- ex for vertical units
Highly specific rules come from a loyalty to the Ecma specification template first, previous years' standards second. There should be no changes that impact screen rendering; changes to the primary stylesheet come from inline styles that existed in both ECMA-262 and ECMA-402.
- Remove print css from Spec file
- Remove styles from inline assets test
- Add publishing instructions
- Small tweaks to allow ecmarkup to generate print-friendly PDFs beyond just 262 & 402
- Use font-face to make sure all the characters are rendered as we wish, including 0 with slash, double-stroke F, and infinity
- Dynamically generate PDF covers based on frontmatter (TODO: Ecma-endorsed proposal cover?)
- Make sure year is being properly inserted into footers
In order to produce a PDF, the front matter `title`, `shortname`, `version`, and `date` are **mandatory**. If generating a final annual edition, date should reflect the date of the Ecma GA which will ratify the Standard. For example:
4
+
5
+
```
6
+
title: ECMAScript® 2024 Language Specification
7
+
shortname: ECMA-262
8
+
version: 15<sup>th</sup> Edition
9
+
date: 2024-06-25
10
+
```
11
+
12
+
To generate markup for use in PDF conversion, make sure to include the options `--assets`, `--assets-dir`, and `--printable`. If you have images and styles to include, make sure to move them into your assets directory before running `ecmarkup`. For example:
13
+
14
+
```shell
15
+
mkdir -p out &&
16
+
cp -R images out &&
17
+
ecmarkup --assets external --assets-dir out --printable spec.html out/index.html
18
+
```
19
+
20
+
Then, from your spec's working directory, run [`prince`](https://www.princexml.com/) to generate your PDF.
21
+
22
+
```shell
23
+
cd path/to/spec
24
+
prince --script ./node_modules/ecmarkup/js/print.js out/index.html -o path/to/output.pdf
25
+
```
26
+
27
+
This has been extensively tested with Prince 15. Earlier and later editions not guaranteed.
0 commit comments