-
Notifications
You must be signed in to change notification settings - Fork 756
Description
TL;DR: Change JIS-B5 and JIS-B4 to JIS B5 and JIS B4.
In November 2015 it has been discussed whether to include several additional page size keywords into CSS Page. Subsequently, Japanese JIS-B4 and JIS-B5 have been added. They had already been supported by Antenna House Formatter due to strong local demand.
Prince and Antenna House actually both support additional keywords, but with inconsistencies. I didn’t find relevant documentation for Weasyprint and Vivliostyle. I quote the tables below, but I actually wonder if CSS can learn from these and do better.
size: <length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]
auto is currently UA-dependent, but maybe it could be specified as defaulting to – if included – PA4, the (rounded) intersection of ISO A4 and ANSI A (better known as US Letter): 210mm × 280mm.
Most paper sizes for printers are specified with default portrait orientation, i.e. smaller size first, and <length>{1,2} has width first and optional height second. Some sizes are primarily used in landscape orientation and therefore they have been implemented with large size first: id-1, id-2, id-3 and ledger. Except for the first one, which is the common size of plastic cards (at 2.125in 3.37in), they are landscape aliases of other sizes: A7, A6 and tabloid, respectively. Since ledger (not tabloid) is currently specified as a portrait format, it should be clarified whether the implementations (intentionally) are non-comformant there and if it’s a bug in the spec.
International paper sizes
The ISO sizes – series A and B defined in ISO 216 and series C in ISO 269 – have been adopted by many national standardization bodies. Some have extended definitions for special purposes, e.g. the RA series from ISO 217, German DIN 2A0 or the Swedish SIS D–G series and, of course, the Japanese B series (JIS P 0138). Most of them are of limited interest to CSS authors, at least with consumer printers.
| Size | CSS | Prince | Antenna House |
|---|---|---|---|
| 26mm × 37mm | — | A10 |
— |
| 28mm × 40mm | — | C10 |
— |
| 31mm × 44mm | — | B10 |
— |
| 37mm × 52mm | — | A9 |
— |
| 40mm × 57mm | — | C9 |
— |
| 44mm × 62mm | — | B9 |
— |
| 52mm × 74mm | — | A8 |
— |
| 57mm × 81mm | — | C8 |
— |
| 62mm × 88mm | — | B8 |
— |
| 74mm × 105mm | — | A7, ID-2 |
— |
| 81mm × 114mm | — | C7 |
— |
| 88mm × 125mm | — | B7, ID-3 |
— |
| 105mm × 148mm | — | A6 |
A6 |
| 114mm × 162mm | — | C6 |
ISO-C6 |
| 125mm × 176mm | — | B6 |
ISO-B6, B6 |
| 128mm × 182mm | — | — | JIS-B6 |
| 148mm × 210mm | A5 |
A5 |
A5 |
| 162mm × 229mm | — | C5 |
ISO-C5 |
| 176mm × 250mm | B5 |
B5 |
ISO-B5, B5 |
| 182mm × 257mm | JIS-B5 |
— | JIS-B5 |
| 210mm × 297mm | A4 |
A4 |
A4 |
| 229mm × 324mm | — | C4 |
ISO-C4 |
| 250mm × 353mm | B4 |
B4 |
ISO-B4, B4 |
| 257mm × 364mm | JIS-B4 |
— | JIS-B4 |
| 297mm × 420mm | A3 |
A3 |
A3 |
| 324mm × 458mm | — | C3 |
ISO-C3 |
| 353mm × 500mm | — | B3 |
— |
| 420mm × 594mm | — | A2 |
— |
| 458mm × 648mm | — | C2 |
— |
| 500mm × 707mm | — | B2 |
— |
| 594mm × 841mm | — | A1 |
— |
| 648mm × 917mm | — | C1 |
— |
| 707mm × 1000mm | — | B1 |
— |
| 841mm × 1189mm | — | A0 |
— |
| 917mm × 1297mm | — | C0 |
— |
| 1000mm × 1414mm | — | B0 |
— |
I believe it could be beneficial to have <paper-size> accept two keywords, an optional one for the system (e.g. JIS) and a mandatory one for the size (e.g. B4).
standard|auto(default, depends on the size)iso|internationallocaljis|japan|japaneseansi|us|america|american|arch
One question is whether iso legal and international letter would compute to A4 and US A4 to letter.
Another question is whether UAs with local settings for Japan should equal standard B4 to JIS B4.
Other metric paper sizes
| Size | CSS | Prince | Antenna House | elsewhere |
|---|---|---|---|---|
| 53.98mm × 85.6mm | — | ID-1 |
— | creditcard |
| 100mm × 148mm | — | — | Hagaki |
postcard |
| 110mm × 220mm | — | — | ISO-DL |
DL, DLE |
| 210mm × 280mm | — | — | — | PA4, L4 |
| 210mm × 330mm | — | — | Folio |
F4 |
| 215mm × 280mm | — | — | — | P4 |
| 215mm × 305mm | — | — | — | RA4 |
- ID-1 is actually metricated 2⅛in × 3.37in.
- DL is an envelope-only size, fitting folded A4, but Wikipedia calls it “DLE” to distinguish it from ⅓ A4 “DL” (99mm × 210mm).
- PA4 or L4 is
A4cut toletterheight orlettercut toA4width (ifletterequalled P4 instead of ANSI-A). FolioisUS-Foliocut toA4width and Wikipedia has it under the lemma F4. ISO 217 RA4 is, probably by coincidence, roughly 8.5in × 12in, i.e. betweenletterandlegalorfolio/us-folio.- Canadian standards P1–P6 have US sizes rounded to the closest half-centimeter; CAN P4 is rounded
letteror ANSI A. - There are some inofficial ‘plus’ sizes, e.g. ‘A4+’, mostly for photo printing.
American standard paper sizes
| Size | CSS | Prince | Antenna House |
|---|---|---|---|
| 5.5in × 8.5in | — | US-Statement |
Statement |
| 7.25in × 10.5in | — | US-Executive |
Executive |
| 8in × 11in | — | US-Government |
Government-Letter |
| 8.5in × 11in | letter |
US-Letter, ansi-a |
Letter |
| 8.5in × 13in | — | US-Folio |
— |
| 8.5in × 14in | legal |
US-Legal |
Legal |
| 9in × 12in | — | arch-a |
— |
| 11in × 17in | ledger |
US-Ledger, ansi-b |
Ledger |
US-Tabloid |
Tabloid |
||
| 12in × 18in | — | arch-b |
— |
| 17in × 22in | — | ansi-c |
C |
| 18in × 24in | — | arch-c |
— |
| 22in × 34in | — | ansi-d |
D |
| 24in × 36in | — | arch-d |
— |
| 30in × 42in | — | arch-e1 |
— |
| 34in × 44in | — | ansi-e |
E |
| 36in × 48in | — | arch-e |
— |
arch() could be defined as rounding up both sides to the next multiple of 6in, or of 3in for measures smaller than, say, 10in.
Other American paper sizes
The sizes foolscap, crown, demy, royal, imperial come in three variants each: octavo has the longer side of quarto halved and folio has its shorter side doubled. Two of these could be implemented as functions or modifier keywords for all paper sizes, so that either quarto(A4) would equal A5 or that octavo A5 was A7. half and quarter should work equally well (with a respective note on traditional terminology) and then double or quad/quadruple would also be possible, but maybe that’s not worth the hassle at all.
I’m not sure I like the alternative idea of folio(A4, 0.5) = A3, folio(A4, 2) = A5 and either folio(A4, 3) or folio(A4, 4) = A6. (Without the comma if you want and could be called fold() instead.)
| Size | CSS | Prince | Antenna House |
|---|---|---|---|
| 4.25in × 6.75in | — | foolscap-octavo |
— |
| 6.75in × 8.5in | — | foolscap-quarto |
— |
| 8.5in × 13.5in | — | foolscap-folio |
— |
| 5in × 7.5in | — | crown-octavo |
— |
| 7.5in × 10in | — | crown-quarto |
— |
| 10in × 15in | — | crown-folio |
— |
| 5.625in × 8.75in | — | demy-octavo |
— |
| 8.75in × 11.25in | — | demy-quarto |
— |
| 11.25in × 17.5in | — | — | — |
| 5.75in × 9in | — | — | — |
| 9in × 11.5in | — | medium-quarto |
— |
| 11.5in × 18in | — | — | — |
| 6.25in × 10in | — | royal-octavo |
— |
| 10in × 12.5in | — | royal-quarto |
— |
| 12.5in × 20in | — | royal-folio |
— |
| 7.5in × 11in | — | imperial-octavo |
— |
| 11in × 15in | — | imperial-quarto |
— |
| 15in × 22in | — | imperial-folio |
— |