From adf52a873f0cdff310c236998fc5018a886b339b Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 23 Oct 2021 22:46:32 +0200 Subject: [PATCH] Drop `iso-` prefix for A papers --- src/style/mod.rs | 2 +- src/style/paper.rs | 24 ++++++++++++------------ tests/typ/layout/page.typ | 2 +- tests/typ/layout/pagebreak.typ | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/style/mod.rs b/src/style/mod.rs index 7917c81ff..755fb3e59 100644 --- a/src/style/mod.rs +++ b/src/style/mod.rs @@ -92,7 +92,7 @@ impl PageStyle { impl Default for PageStyle { fn default() -> Self { - let paper = Paper::ISO_A4; + let paper = Paper::A4; Self { class: paper.class(), size: paper.size(), diff --git a/src/style/paper.rs b/src/style/paper.rs index bc3173086..252d293de 100644 --- a/src/style/paper.rs +++ b/src/style/paper.rs @@ -87,18 +87,18 @@ macro_rules! papers { papers! { // ---------------------------------------------------------------------- // // ISO 216 A Series - (ISO_A0: Base, 841.0, 1189.0, "iso-a0") - (ISO_A1: Base, 594.0, 841.0, "iso-a1") - (ISO_A2: Base, 420.0, 594.0, "iso-a2") - (ISO_A3: Base, 297.0, 420.0, "iso-a3") - (ISO_A4: Base, 210.0, 297.0, "iso-a4") - (ISO_A5: Base, 148.0, 210.0, "iso-a5") - (ISO_A6: Book, 105.0, 148.0, "iso-a6") - (ISO_A7: Base, 74.0, 105.0, "iso-a7") - (ISO_A8: Base, 52.0, 74.0, "iso-a8") - (ISO_A9: Base, 37.0, 52.0, "iso-a9") - (ISO_A10: Base, 26.0, 37.0, "iso-a10") - (ISO_A11: Base, 18.0, 26.0, "iso-a11") + (A0: Base, 841.0, 1189.0, "a0") + (A1: Base, 594.0, 841.0, "a1") + (A2: Base, 420.0, 594.0, "a2") + (A3: Base, 297.0, 420.0, "a3") + (A4: Base, 210.0, 297.0, "a4") + (A5: Base, 148.0, 210.0, "a5") + (A6: Book, 105.0, 148.0, "a6") + (A7: Base, 74.0, 105.0, "a7") + (A8: Base, 52.0, 74.0, "a8") + (A9: Base, 37.0, 52.0, "a9") + (A10: Base, 26.0, 37.0, "a10") + (A11: Base, 18.0, 26.0, "a11") // ISO 216 B Series (ISO_B1: Base, 707.0, 1000.0, "iso-b1") diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ index 123d1c6eb..315680a67 100644 --- a/tests/typ/layout/page.typ +++ b/tests/typ/layout/page.typ @@ -24,7 +24,7 @@ [#page(margins: 0pt, left: 20pt) Overriden] // Flipped predefined paper. -[#page(paper: "iso-a11", flip: true) Flipped A11] +[#page(paper: "a11", flip: true) Flipped A11] // Flipped custom page size. #page(width: 40pt, height: 120pt) diff --git a/tests/typ/layout/pagebreak.typ b/tests/typ/layout/pagebreak.typ index aac585c23..ab591c872 100644 --- a/tests/typ/layout/pagebreak.typ +++ b/tests/typ/layout/pagebreak.typ @@ -11,7 +11,7 @@ A #box[ B #pagebreak() - #page("iso-a4") + #page("a4") ] C