W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2016

[csswg-drafts] [css-page] <page-size> Keywords

From: Christoph Päper via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Jul 2016 23:35:24 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-166217252-1468884921-sysbot+gh@w3.org>
Crissov has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-page] <page-size> Keywords ==
TL;DR: Change `JIS-B5` and `JIS-B4` to `JIS B5` and `JIS B4`. 

In [November 
2015](https://lists.w3.org/Archives/Public/www-style/2015Oct/0234.html)
 it has been discussed whether to include several additional page size
 keywords into [CSS Page][CSS]. Subsequently, Japanese `JIS-B4` and 
`JIS-B5` have been added. They had already been supported by [Antenna 
House Formatter][Antenna House] 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][Wikipedia] 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` | `international` 
- `local`
  * `jis` | `japan` | `japanese`
  * `ansi` | `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]
----------------|-------|----------|----------------
  53.98mm × 85.6mm | —  | `ID-1`   | —
 100mm ×  148mm |    —  |    —     | `Hagaki`
 110mm ×  220mm |    —  |    —     | `ISO-DL`
 210mm ×  280mm |    —  |    —     |     —
 210mm ×  330mm |    —  |    —     | `Folio`
 215mm ×  280mm |    —  |    —     |     —

Canadian standards P1–P6 have US sizes rounded to the closest 
half-centimeter; CAN P4 is rounded `letter` or ANSI A. 
[PA4] or L4 is `A4` cut to `letter` height or `letter` cut to `A4` 
width.
`Folio` is `US-Folio` cut to `A4` width and Wikipedia has it under the
 lemma [F4].
There are some inofficial ‘plus’ sizes, e.g. ‘A4+’, mostly for photo 
printing.
DL is an envelope-only size, fitting folded A4, but Wikipedia calls it
 “DLE” to distinguis it from ⅓ A4 “DL” (99mm × 210mm).
ID-1 is actually metricated 2⅛in × 3.37in.

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`  | —


  [CSS]: https://drafts.csswg.org/css-page/#page-size-prop
  [Prince]: http://www.princexml.com/doc/page-size-keywords/
  [Antenna House]: 
https://www.antennahouse.com/product/ahf63/ahf-ext.html#axf.size
  [Wikipedia]: https://en.wikipedia.org/wiki/Paper_size
  [F4]: https://en.wikipedia.org/wiki/F4_(paper)
  [PA4]: https://en.wikipedia.org/wiki/Paper_size#PA_series
  [Books]: https://en.wikipedia.org/wiki/Book_size
  [Newspapers]: https://en.wikipedia.org/wiki/Newspaper_format
  [Photos]: https://en.wikipedia.org/wiki/Photo_print_sizes

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/328 using your GitHub 
account
Received on Monday, 18 July 2016 23:35:31 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:00 UTC