Skip to content

Commit 31e7d4b

Browse files
committed
Publishing instructions
1 parent 9c67732 commit 31e7d4b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

PUBLISHING.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generating a PDF from ecmarkup
2+
3+
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: 15th 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 `--old-toc`. 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+
mv images out &&
17+
mv print.css out &&
18+
ecmarkup --assets external --assets-dir out --old-toc spec.html out/index.html
19+
```
20+
21+
Then, from your spec's working directory, run [`prince`](https://www.princexml.com/) to generate your PDF.
22+
23+
```shell
24+
cd path/to/spec
25+
prince --script ./node_modules/ecmarkup/js/print.js out/index.html -o path/to/output.pdf
26+
```
27+
28+
This has been extensively tested with Prince 15. Earlier and later editions not guaranteed.

css/print.css

+12
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@
7979
margin-outside: 13mm;
8080
-prince-page-fill: prefer-fill;
8181

82+
/* Uncomment when producing WIP versions of final standards */
83+
/*
84+
@prince-overlay {
85+
color: rgba(0,0,0,0.15);
86+
content: "WORK IN PROGRESS";
87+
font-family: Arial;
88+
font-weight: bolder;
89+
font-size: 100pt;
90+
transform: rotate(-60deg);
91+
}
92+
*/
93+
8294
@bottom-left {
8395
font-family: Arial;
8496
}

0 commit comments

Comments
 (0)