diff --git a/PUBLISHING.md b/PUBLISHING.md new file mode 100644 index 00000000..3c6e7ea0 --- /dev/null +++ b/PUBLISHING.md @@ -0,0 +1,28 @@ +# Generating a PDF from ecmarkup + +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: + +``` +title: ECMAScript® 2024 Internationalization API Specification +shortname: ECMA-402 +version: 11th Edition +date: 2024-06-25 +``` + +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: + +```shell +mkdir -p out && +mv images out && +mv print.css out && +ecmarkup --assets external --assets-dir out --old-toc spec.html out/index.html +``` + +Then, from your spec's working directory, run [`prince`](https://www.princexml.com/) to generate your PDF. + +```shell +cd path/to/spec +prince --script ./node_modules/ecmarkup/js/print.js out/index.html -o path/to/output.pdf +``` + +This has been extensively tested with Prince 15. Earlier and later editions not guaranteed. diff --git a/img/calendar.png b/img/calendar.png index 5d1515c1..0d89b122 100644 Binary files a/img/calendar.png and b/img/calendar.png differ diff --git a/img/ecma-header.svg b/img/ecma-header.svg new file mode 100644 index 00000000..5eaffa9d --- /dev/null +++ b/img/ecma-header.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/ecma-logo.svg b/img/ecma-logo.svg index 9fee7c8f..32020be0 100644 --- a/img/ecma-logo.svg +++ b/img/ecma-logo.svg @@ -1,120 +1 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/package.json b/package.json index f8627ed0..6ad0bbbc 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build-only": "npm run build-to -- out/index.html --assets-dir=out", "build": "npm run build-only -- --lint-spec --strict", "build-for-pdf": "npm run build -- --old-toc", + "pdf": "npm run build-for-pdf && prince --script ./node_modules/ecmarkup/js/print.js out/index.html -o out/ECMA-402.pdf", "test": "npm run build-to -- --lint-spec /dev/null", "watch": "npm run build -- --watch" }, diff --git a/spec/annexes.html b/spec/annexes.html index 41c70a56..656dcf57 100644 --- a/spec/annexes.html +++ b/spec/annexes.html @@ -183,7 +183,7 @@
This specification is authored on GitHub in a plaintext source format called Ecmarkup. Ecmarkup is an HTML and Markdown dialect that provides a framework and toolset for authoring ECMAScript specifications in plaintext and processing the specification into a full-featured HTML rendering that follows the editorial conventions for this document. Ecmarkup builds on and integrates a number of other formats and technologies including Grammarkdown for defining syntax and Ecmarkdown for authoring algorithm steps. PDF renderings of this specification are produced by printing the HTML rendering to a PDF.
+This specification is authored on GitHub in a plaintext source format called Ecmarkup. Ecmarkup is an HTML and Markdown dialect that provides a framework and toolset for authoring ECMAScript specifications in plaintext and processing the specification into a full-featured HTML rendering that follows the editorial conventions for this document. Ecmarkup builds on and integrates a number of other formats and technologies including Grammarkdown for defining syntax and Ecmarkdown for authoring algorithm steps. PDF renderings of this specification are produced using PrinceXML.
Prior editions of this specification were authored using Word—the Ecmarkup source text that formed the basis of this edition was produced by converting the ECMAScript 2015 Word document to Ecmarkup using an automated conversion tool.
diff --git a/spec/introduction.html b/spec/introduction.html index b888cfa3..7d55201b 100644 --- a/spec/introduction.html +++ b/spec/introduction.html @@ -48,10 +48,9 @@Introduction
Richard Gibson, Ujjwal Sharma
- ECMA-402, 10th Edition Project Editors + ECMA-402, 10th & 11th Edition Project Editors- Richard Gibson, Ujjwal Sharma
diff --git a/spec/listformat.html b/spec/listformat.html index 49f03ce7..cc58398c 100644 --- a/spec/listformat.html +++ b/spec/listformat.html @@ -240,7 +240,7 @@
- ECMA-402, 11th Edition Project Editors + This Ecma Standard was developed by Technical Committee 39 and was adopted by the General Assembly of June 2024.
- description
- - It deconstructs the pattern string into a List of parts. +
It deconstructs the pattern string into a List of parts.
_placeables_ is a Record whose keys are placeables tokens used in the pattern string, and values are parts Records (as from PartitionPattern) which will be used in the result List to represent the token part. Example: diff --git a/spec/numberformat.html b/spec/numberformat.html index 87b1cd0a..ee41f716 100644 --- a/spec/numberformat.html +++ b/spec/numberformat.html @@ -947,7 +947,7 @@
- Numbering System +Numbering System Digits