From 7fd9e57e6a0cdc3e36032c9607f24d71ddade460 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 23 Jun 2024 09:22:15 +0000 Subject: [PATCH] build based on 5659a96 --- development/.documenter-siteinfo.json | 2 +- development/assets/Dates_examples.svg | 4885 -------- development/assets/Dates_examples.typ | 92 - development/assets/Typstry_examples.svg | 12206 +++++++++++++------ development/assets/Typstry_examples.typ | 89 +- development/getting_started/index.html | 2 +- development/index.html | 2 +- development/manual/commands/index.html | 38 +- development/manual/extensions/index.html | 4 +- development/manual/internals/index.html | 32 +- development/manual/strings/index.html | 38 +- development/objects.inv | Bin 1709 -> 1668 bytes development/search_index.js | 2 +- development/tutorials/interface/index.html | 4 +- 14 files changed, 8639 insertions(+), 8757 deletions(-) delete mode 100644 development/assets/Dates_examples.svg delete mode 100644 development/assets/Dates_examples.typ diff --git a/development/.documenter-siteinfo.json b/development/.documenter-siteinfo.json index 631c4e3..6d34438 100644 --- a/development/.documenter-siteinfo.json +++ b/development/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-22T10:25:57","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-23T09:22:12","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/development/assets/Dates_examples.svg b/development/assets/Dates_examples.svg deleted file mode 100644 index 8b2e715..0000000 --- a/development/assets/Dates_examples.svg +++ /dev/null @@ -1,4885 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/development/assets/Dates_examples.typ b/development/assets/Dates_examples.typ deleted file mode 100644 index d1e496e..0000000 --- a/development/assets/Dates_examples.typ +++ /dev/null @@ -1,92 +0,0 @@ -#import "template.typ": f, template - -#show: document => template(document) - -= Dates.jl - -#f(( - "Date(1)", "Date", "datetime(\n year: 1,\n month: 1,\n day: 1\n)", [#datetime( - year: 1, - month: 1, - day: 1 - )], "#datetime(\n year: 1,\n month: 1,\n day: 1\n)", [#datetime( - year: 1, - month: 1, - day: 1 - )], "#datetime(\n year: 1,\n month: 1,\n day: 1\n)", [$#datetime( - year: 1, - month: 1, - day: 1 - )$], - "DateTime(1)", "DateTime", "datetime(\n year: 1,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( - year: 1, - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0 - )], "#datetime(\n year: 1,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( - year: 1, - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0 - )], "#datetime(\n year: 1,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0\n)", [$#datetime( - year: 1, - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0 - )$], - "Day(1)", "Day", "duration(\n days: 1\n)", [#duration( - days: 1 - )], "#duration(\n days: 1\n)", [#duration( - days: 1 - )], "#duration(\n days: 1\n)", [$#duration( - days: 1 - )$], - "Hour(1)", "Hour", "duration(\n hours: 1\n)", [#duration( - hours: 1 - )], "#duration(\n hours: 1\n)", [#duration( - hours: 1 - )], "#duration(\n hours: 1\n)", [$#duration( - hours: 1 - )$], - "Minute(1)", "Minute", "duration(\n minutes: 1\n)", [#duration( - minutes: 1 - )], "#duration(\n minutes: 1\n)", [#duration( - minutes: 1 - )], "#duration(\n minutes: 1\n)", [$#duration( - minutes: 1 - )$], - "Second(1)", "Second", "duration(\n seconds: 1\n)", [#duration( - seconds: 1 - )], "#duration(\n seconds: 1\n)", [#duration( - seconds: 1 - )], "#duration(\n seconds: 1\n)", [$#duration( - seconds: 1 - )$], - "Time(0)", "Time", "datetime(\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( - hour: 0, - minute: 0, - second: 0 - )], "#datetime(\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( - hour: 0, - minute: 0, - second: 0 - )], "#datetime(\n hour: 0,\n minute: 0,\n second: 0\n)", [$#datetime( - hour: 0, - minute: 0, - second: 0 - )$], - "Week(1)", "Week", "duration(\n weeks: 1\n)", [#duration( - weeks: 1 - )], "#duration(\n weeks: 1\n)", [#duration( - weeks: 1 - )], "#duration(\n weeks: 1\n)", [$#duration( - weeks: 1 - )$] -)) - diff --git a/development/assets/Typstry_examples.svg b/development/assets/Typstry_examples.svg index db4fa22..d36c8cf 100644 --- a/development/assets/Typstry_examples.svg +++ b/development/assets/Typstry_examples.svg @@ -1,7 +1,7 @@ - + - + @@ -27,109 +27,133 @@ - + - + - + - + - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -204,7 +228,7 @@ - + @@ -220,7 +244,7 @@ - + @@ -237,506 +261,801 @@ - + - - - - + + + + + + + + - + + + + - + - - - - - - - - + - + - + - - - - - - - + - - - - + - + - + + + - + - - - - + - - - - - - - + - - - + - + - - - - + + - - + + + + - + - - - - - - - - + - + + + + + + + - - - + + + + + + + + + + + + + - + - + - + - + - + + + + - + - + - + - + - + - - + - + - + + + - + - + - - - - - - - + - - - + - + + + + - - - - + - + - + - - - - - - - - + - + - - - + - + - + - + + + + - + - + - + - + - + - - + - + - + + + - + - + + + + + + + + + + + + + - + - + - - - + + + - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + - + - - - + - + - + - + - + - + - + - + - + - + - + - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - + - + - + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - - - - - - - - - + + + + + + + + + + + - + - + - - - - - + + + + + + + + + + + + - + - - - - - + + + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + + - + - - - - - + @@ -745,10 +1064,156 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -772,49 +1237,45 @@ - - - + - + - + - + - + - - - - + + - + - + - + - + @@ -822,7 +1283,7 @@ - + @@ -835,17 +1296,18 @@ - - - - - + + + + + + - + @@ -869,21 +1331,21 @@ + + - + - + - - - + @@ -917,7 +1379,7 @@ - + @@ -941,21 +1403,21 @@ + + - + - + - - - + @@ -975,7 +1437,7 @@ - + @@ -985,9 +1447,9 @@ - - - + + + @@ -1026,96 +1488,82 @@ - + - + + + + + + + - + - + - + - + - + - + - + - + + + + + + + + + + + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + - + - + - + @@ -1123,12 +1571,7 @@ - - - - - - + @@ -1149,7 +1592,12 @@ - + + + + + + @@ -1171,53 +1619,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - - - - - - + + + + @@ -1251,91 +1669,77 @@ - + - + + + + + + + - + - + - + - + - + - + - + - + + + + + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - + - + - + - + @@ -1343,12 +1747,7 @@ - - - - - - + @@ -1369,7 +1768,12 @@ - + + + + + + @@ -1391,35 +1795,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -1428,7 +1806,7 @@ - + @@ -1436,17 +1814,17 @@ - + - + - + @@ -1465,11 +1843,13 @@ - - - - - + + + + + + + @@ -1498,7 +1878,7 @@ - + @@ -1511,7 +1891,7 @@ - + @@ -1524,7 +1904,7 @@ - + @@ -1537,7 +1917,7 @@ - + @@ -1551,7 +1931,7 @@ - + @@ -1559,9 +1939,10 @@ - - - + + + + @@ -1572,19 +1953,10 @@ - - - - - - - - - - - - - + + + + @@ -1595,100 +1967,82 @@ - - - + + + + - + - + - - - + + + + - + - - - - - - - - - - - - - + + + + - + - - - - - - - - - - - + - + + + + - + - - - + + + + + + - + - - - - - - - - - - - + + + + @@ -1697,340 +2051,363 @@ - + - + - - - + + - + + + + + + + - + + + + + + + - + - - - - + - - - - - - - - - - - - - - - - + + + + - - - - + - + - + + + + + + + - - + - + - + - + - + - + - + - - - - - - - - - - - - - - + - + - + - - - - + - + - + - + + + + + + + - - - + - + + + + + + + - + - + + + + + + + - + - - - - - - + + + + + + + + + + + + + - + - + - + - + - + - + - + + - + - + - + + + + + + + - + + + + + + + - - - - + - + - + + + + - + - - - + - + + + + + + + - + - + - + - + - + - + - - - + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - + + + + + + + + + - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + @@ -2039,862 +2416,631 @@ - + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - + - + + + + + + + - - - + + + + + + + - + - + - + + + + + + + - + - - - + + + + - + - - - - - - - - - + - + - - - + - - - - - - - + - + + + + - - - - - - - + - - - - - - - - - - + - + - - - - + - - - - - - - + - - - + + + - + - - - - - - - - - - + - + + + + + + + - - - - + - - - - - - - + - - - - + - - - - - - - + - - - - - - + - - - - - - - + - - - - + - - - - - - - - - - - - - + - - + - + - - - - - - - + + + + + + + + + + + + - + - + - - - - + + - + - + + + + + + + - - - - - - - + - + - + + + + - + + - + - + + + + + + + - - - - - - - + - + - + - - - - - - - - - - - + + + + + - - - - - - - + - + - - - - - - - + - + - - - - - - - + - + - - - - - - - - - - - - - + - + - - - - + - + + + + + + - - - - + - - - - - - - - - - - - - + - - - - - - - + - + - - - - - - + - - - - + - + - + - - - - - - - + - + - + - + - + - + - + - + - - - - - - - + - + - + - - - - + - + - + - + - - - - - - + - + - + - + + + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + - + - + - - - + - + - + - + - + - + - + - + - + + + + + + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2903,146 +3049,155 @@ - - - - - - - + - + + + - - - - - - - + - - - - - - - - - - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - - - - - - - + - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -3051,231 +3206,290 @@ - + - + - - - - - - - + + + + + + + + + + + + - + - - + + - - + + - + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + - + - + - - - - + + + + + + + + + + + + + + + + - - - - - - + - + - + - + - - - - + + + + - - - - - - - - - - - - + - + - + - - - + - + + + + - + + + + + + - + - + - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + - - + - + - - - - - - - + - + - + - - + + + + + + - + - - + - + - - - - - - - + - + + + + + + + - + + + + + - + - - - - + + + + @@ -3285,35 +3499,52 @@ - + + + + + + + - + - + - + + + + + + + - + + + + + - + - - - - - - + - + - + + + + + + + - + @@ -3321,50 +3552,76 @@ - + - + - + - + - + + + + + - + - + - + - + + + + + + + - + - + - + + + + + + + - + + + + + - + - + - + - + + + + + + + - + @@ -3372,707 +3629,693 @@ - + - + - + - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + - + - + - + - + - + + + + + - + - + - + - + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - + - + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - + + + + + + - + - + - + - + + + + + + + - + - + + + + + + + - + - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - + - + - + - - + - + - - - - - - - + - - - - - - - - + + + + + + + + + + + - + - + + + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + - + - + + - + + + + + + + + + + + + + + + + + - + - + + - + - + + + + + + + - - - - - - - + - - - + - + - + + + + + - + - + - + - + - + - + - + - + - - - - - - - + - + + + + + + - + - + - - + + + + - + - + - + - + - - - - + - + - - - - + - + - + - - - - - - - + - + - - - - - - - - - - - - - - - - - + + + - + - + + + + + + - - - - - - - + - + - + + + - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - - - - - + - - - - - - - + - - - - - + - + - + - + - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -4080,112 +4323,150 @@ - + - + - - - - - + - + - + - + - - - - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + - - - - - + + + + - + - + - + - - - - - - - + - + - + - - - - - - - + - - - - - + + + - + - + - + - - - - - - - + - + + + + + + + + + + + + @@ -4193,110 +4474,4280 @@ - - - - - - - + - + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4305,59 +8756,44 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - + - + - + + + - + - + - + - + - + @@ -4365,153 +8801,78 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - - - - - - - + - + - + + + - + - - - - - - + + + + + + + + + - + - - - - + + - + - + + + + - + - + - - - - - - - - - + + - + - + - + @@ -4519,50 +8880,94 @@ - + + + + + + + + + + + + + + + + + + - + - + - + - + - + + + + + + + - + - + - + + + + + + + + - + - + - + + + + - + + + + - + - + - + + + + + + + + + @@ -4570,239 +8975,132 @@ - + - - - - - - + - - - + + + + + + + + - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + + + + + + + + - + - + - + + + + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + - + - - - + + + + + + + + - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + @@ -4810,150 +9108,226 @@ - + + + + + + + - + - + + + + + - + - + - + - + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - - - - + + + + + - + - + - + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + - + + + + + - + - - + - + + + + - + - + @@ -4961,86 +9335,135 @@ - + - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - + + + + + + + + - + - + - + + + + - + + + + + - + - + - + + + + - - - + - + - + + + + + + + - + + + + + + + + - - - - + - + + + + + + + - - - - + - + - + @@ -5048,158 +9471,132 @@ - + + + + + + + - + - + + + + + - + - - - - + - + - + + + + + + - + - + - + - + - + - - - + - + + + + + + + - + + + + + - + - - - + - + - + + + + + + - + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5207,227 +9604,144 @@ - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + + + + + + + + - + - + - + + + + - + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - - - - - - + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + + + + + + @@ -5435,122 +9749,102 @@ - + - + - + - + - + + + + + + + + - + - + - + + + + - + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5559,32 +9853,47 @@ - + - + - - - - - + + + + + - + + + + + + + + + + + + + + + + - + @@ -5592,645 +9901,1028 @@ - + - - - - - + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - + - + - + - + + + + + + + + - + - + - - - - - - - + + + + - + + + + + + + - - - - - - - + + + + + + + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - - - - - + - + - + + + + + + + + - + - + - - - - - + + - + - + + + + + + + - + - - + - + + + + - + - + - + - + - + - - - - - - - - - - - + + + + + + + + - - - - - - - + - - - - - + + + + + + + + + - - - - - - - + - - - + + + + + + - + + + + + + + - - - - - + + + + + - - - - - - - + - - - - - + - - - - - - - + - - - - - + + + + - - - - - - - + - + - + - + - + - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + - + - + + + + + + - + - + - + + + + + + + + - + - + - + - + + + + + + + + - + - + - - - - - - - + - - - - - - - - - + - + - - - - - - - - - + - - - - - - - + - - - - - - - + + + + + + + + - - - - - - - + - - - - - - - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + - + + + + + + + + - + - + + + + + + - + - + - + - + + + + + + + + - + - + - + - + + + + + + + + - + - + - + - + - - - - - - - + - - - - + - - - - - - - + - - - - - - - - + + + + + + + + - - - - - - - + - - - - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + + + + + + + - + - - - - + + + + + + - - - - - - - + - - - + - - - - - - - + - + + + + + + + + - + - - - - - - - - - - + - + + + + + + + + - + - + - + - + @@ -6239,107 +10931,126 @@ - + - + - + + + + + - + - + - + - - - - - + + + + - + - + + + + + + + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - + + - - - - + + + + + - + - - - - + + - + - + + + + + - + - + - - - - + + - + - + - + @@ -6347,22 +11058,46 @@ - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6372,46 +11107,47 @@ - - + + - - - - + + + + + - + - - - - + + - + - + + + + + - + - + - - - - + + - + - + - + @@ -6419,22 +11155,46 @@ - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6444,46 +11204,47 @@ - - + + - - - - - - - - - + + + + + - + - - - - + + - + - + + + + + - + - + - + + + + - + - + @@ -6491,32 +11252,40 @@ - + - - - - - - + + + + + + + + - + - + + + + + + + - + - + - + - + @@ -6614,114 +11383,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -6731,24 +11392,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6767,6 +11455,9 @@ + + + @@ -6821,12 +11512,30 @@ + + + + + + + + + + + + + + + + + + @@ -6848,9 +11557,18 @@ + + + + + + + + + @@ -6890,6 +11608,9 @@ + + + @@ -6962,6 +11683,9 @@ + + + @@ -6974,6 +11698,9 @@ + + + @@ -7001,6 +11728,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -7025,5 +11773,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/development/assets/Typstry_examples.typ b/development/assets/Typstry_examples.typ index 9e34108..2c4d5c7 100644 --- a/development/assets/Typstry_examples.typ +++ b/development/assets/Typstry_examples.typ @@ -5,8 +5,6 @@ = Typstry.jl #f(( - "html\"

a

\"", "Docs.HTML", "```html

a

```", [#```html

a

```], "```html

a

```", [```html

a

```], "#```html

a

```", [$#```html

a

```$], - "text\"[\\\"a\\\"]\"", "Docs.Text", "\"[\\\"a\\\"]\"", [#"[\"a\"]"], "[\"a\"]", [["a"]], "\"[\\\"a\\\"]\"", [$"[\"a\"]"$], "Any[true, 1, 1.2, 1//2]", "AbstractArray", "(true, 1, 1.2, 1 / 2)", [#(true, 1, 1.2, 1 / 2)], "$vec(\n \"true\", 1, 1.2, 1 / 2\n)$", [$vec( "true", 1, 1.2, 1 / 2 @@ -51,6 +49,91 @@ "typst\"[\\\"a\\\"]\"", "TypstString", "[\"a\"]", [#["a"]], "[\"a\"]", [["a"]], "[\"a\"]", [$["a"]$], "TypstText([1, 2, 3, 4])", "TypstText", "[1, 2, 3, 4]", [#[1, 2, 3, 4]], "[1, 2, 3, 4]", [[1, 2, 3, 4]], "[1, 2, 3, 4]", [$[1, 2, 3, 4]$], "0xff", "Unsigned", "0xff", [#0xff], "#0xff", [#0xff], "#0xff", [$#0xff$], - "v\"1.2.3\"", "VersionNumber", "version(1, 2, 3)", [#version(1, 2, 3)], "#version(1, 2, 3)", [#version(1, 2, 3)], "#version(1, 2, 3)", [$#version(1, 2, 3)$] + "v\"1.2.3\"", "VersionNumber", "version(1, 2, 3)", [#version(1, 2, 3)], "#version(1, 2, 3)", [#version(1, 2, 3)], "#version(1, 2, 3)", [$#version(1, 2, 3)$], + "html\"

a

\"", "Docs.HTML", "```html

a

```", [#```html

a

```], "```html

a

```", [```html

a

```], "#```html

a

```", [$#```html

a

```$], + "text\"[\\\"a\\\"]\"", "Docs.Text", "\"[\\\"a\\\"]\"", [#"[\"a\"]"], "[\"a\"]", [["a"]], "\"[\\\"a\\\"]\"", [$"[\"a\"]"$], + "Dates.Date(1)", "Dates.Date", "datetime(\n year: 1,\n month: 1,\n day: 1\n)", [#datetime( + year: 1, + month: 1, + day: 1 + )], "#datetime(\n year: 1,\n month: 1,\n day: 1\n)", [#datetime( + year: 1, + month: 1, + day: 1 + )], "#datetime(\n year: 1,\n month: 1,\n day: 1\n)", [$#datetime( + year: 1, + month: 1, + day: 1 + )$], + "Dates.DateTime(1)", "Dates.DateTime", "datetime(\n year: 1,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( + year: 1, + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0 + )], "#datetime(\n year: 1,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( + year: 1, + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0 + )], "#datetime(\n year: 1,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0\n)", [$#datetime( + year: 1, + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0 + )$], + "Dates.Day(1)", "Dates.Day", "duration(\n days: 1\n)", [#duration( + days: 1 + )], "#duration(\n days: 1\n)", [#duration( + days: 1 + )], "#duration(\n days: 1\n)", [$#duration( + days: 1 + )$], + "Dates.Hour(1)", "Dates.Hour", "duration(\n hours: 1\n)", [#duration( + hours: 1 + )], "#duration(\n hours: 1\n)", [#duration( + hours: 1 + )], "#duration(\n hours: 1\n)", [$#duration( + hours: 1 + )$], + "Dates.Minute(1)", "Dates.Minute", "duration(\n minutes: 1\n)", [#duration( + minutes: 1 + )], "#duration(\n minutes: 1\n)", [#duration( + minutes: 1 + )], "#duration(\n minutes: 1\n)", [$#duration( + minutes: 1 + )$], + "Dates.Second(1)", "Dates.Second", "duration(\n seconds: 1\n)", [#duration( + seconds: 1 + )], "#duration(\n seconds: 1\n)", [#duration( + seconds: 1 + )], "#duration(\n seconds: 1\n)", [$#duration( + seconds: 1 + )$], + "Dates.Time(0)", "Dates.Time", "datetime(\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( + hour: 0, + minute: 0, + second: 0 + )], "#datetime(\n hour: 0,\n minute: 0,\n second: 0\n)", [#datetime( + hour: 0, + minute: 0, + second: 0 + )], "#datetime(\n hour: 0,\n minute: 0,\n second: 0\n)", [$#datetime( + hour: 0, + minute: 0, + second: 0 + )$], + "Dates.Week(1)", "Dates.Week", "duration(\n weeks: 1\n)", [#duration( + weeks: 1 + )], "#duration(\n weeks: 1\n)", [#duration( + weeks: 1 + )], "#duration(\n weeks: 1\n)", [$#duration( + weeks: 1 + )$] )) diff --git a/development/getting_started/index.html b/development/getting_started/index.html index 3a3f602..5cb4415 100644 --- a/development/getting_started/index.html +++ b/development/getting_started/index.html @@ -11,4 +11,4 @@ typst"$ π approx 3.141592653589793 $"

Commands

Use render to easily generate a Typst source file and compile it into a document.

julia> render(Any[true 1; 1.2 1 // 2]);

Compile source files by running a TypstCommand created using its constructor or @typst_cmd.

julia> TypstCommand(["help"])
 typst`help`
 
-julia> run(typst`compile input.typ output.pdf`);

Examples

These Typst documents were generated from Julia using show with the text/typst MIME type and compiled using a TypstCommand. Each row corresponds to a method of show_typst. Sequential documents correspond to package Extensions.

Typstry.jl examples Dates.jl examples LaTeXStrings.jl examples Markdown.jl examples

+julia> run(typst`compile input.typ output.pdf`);

Examples

These Typst documents were generated from Julia using show with the text/typst MIME type and compiled using a TypstCommand. Each row corresponds to a method of show_typst. Sequential documents correspond to package Extensions.

Typstry.jl examples LaTeXStrings.jl examples Markdown.jl examples

diff --git a/development/index.html b/development/index.html index 27ad7c5..a2751c7 100644 --- a/development/index.html +++ b/development/index.html @@ -25,4 +25,4 @@ typst`help` julia> addenv(typst`compile input.typ output.pdf`, "TYPST_FONT_PATHS" => julia_mono) -typst`compile input.typ output.pdf`

Features

Strings

Commands

Planned

Typst

LaTeX

+typst`compile input.typ output.pdf`

Features

Strings

Commands

Planned

Typst

LaTeX

diff --git a/development/manual/commands/index.html b/development/manual/commands/index.html index b8d30c7..09e700f 100644 --- a/development/manual/commands/index.html +++ b/development/manual/commands/index.html @@ -5,13 +5,13 @@ typst`help` julia> TypstCommand(help; ignorestatus = true) -typst`help`source
Typstry.TypstErrorType
TypstError <: Exception
-TypstError(::TypstCommand)

An Exception indicating a failure to run a TypstCommand.

source
Typstry.@typst_cmdMacro
@typst_cmd(s)
+typst`help`
source
Typstry.TypstErrorType
TypstError <: Exception
+TypstError(::TypstCommand)

An Exception indicating a failure to run a TypstCommand.

source
Typstry.@typst_cmdMacro
@typst_cmd(s)
 typst`s`

Construct a TypstCommand where each parameter is separated by a space.

This does not support interpolation; use the constructor instead.

Examples

julia> typst`help`
 typst`help`
 
 julia> typst`compile input.typ output.typ`
-typst`compile input.typ output.typ`
source
Typstry.julia_monoConstant
julia_mono

An constant artifact containing the JuliaMono typeface.

Use with a TypstCommand and one of addenv, setenv, or the font-path Typst command-line option.

source
Typstry.renderFunction
render(x;
+typst`compile input.typ output.typ`
source
Typstry.julia_monoConstant
julia_mono

An constant artifact containing the JuliaMono typeface.

Use with a TypstCommand and one of addenv, setenv, or the font-path Typst command-line option.

source
Typstry.renderFunction
render(x;
     input = "input.typ",
     output = "output.pdf",
     open = true,
@@ -19,30 +19,30 @@
         #set page(margin: 1em, height: auto, width: auto, fill: white)
         #set text(16pt, font: "JuliaMono")
     """,
-context...)

Render to a document using show(::IO, ::MIME"text/typst", ::Typst).

This generates two files: the input is the Typst source text and the output is the compiled document. The document format is inferred by the file extension of output, which may be pdf, png, or svg. The document may be automatically opened by the default viewer.

Examples

julia> render(Any[true 1; 1.2 1 // 2]);
source

Base

Base.:==Function
==(::TypstCommand, ::TypstCommand)

See also TypstCommand.

Examples

julia> help = typst`help`
+context...)

Render to a document using show(::IO, ::MIME"text/typst", ::Typst).

This generates two files: the input is the Typst source text and the output is the compiled document. The document format is inferred by the file extension of output, which may be pdf, png, or svg. The document may be automatically opened by the default viewer.

Examples

julia> render(Any[true 1; 1.2 1 // 2]);
source

Base

Base.:==Function
==(::TypstCommand, ::TypstCommand)

See also TypstCommand.

Examples

julia> help = typst`help`
 typst`help`
 
 julia> help == help
 true
 
 julia> help == TypstCommand(help; ignorestatus = true)
-false
source
Base.addenvFunction
addenv(::TypstCommand, args...; kwargs...)

See also TypstCommand and julia_mono.

Examples

julia> addenv(typst`compile input.typ output.pdf`, "TYPST_FONT_PATHS" => julia_mono)
-typst`compile input.typ output.pdf`
source
Base.detachFunction
detach(::TypstCommand)

See also TypstCommand.

Examples

julia> detach(typst`help`)
-typst`help`
source
Base.eltypeFunction
eltype(::Type{TypstCommand})

See also TypstCommand.

Examples

julia> eltype(TypstCommand)
-String
source
Base.firstindexFunction
firstindex(::TypstCommand)

See also TypstCommand.

Examples

julia> firstindex(typst`help`)
-1
source
Base.getindexFunction
getindex(::TypstCommand, i)

See also TypstCommand.

Examples

julia> typst`help`[2]
-"help"
source
Base.hashFunction
hash(::TypstCommand, ::UInt)

See also TypstCommand.

source
Base.ignorestatusFunction
ignorestatus(::TypstCommand)

Return a TypstCommand that does not throw a TypstError if the Typst compiler throws an error.

Errors thrown by the Typst compiler are printed to stderr regardless.

Examples

julia> ignorestatus(typst`help`)
-typst`help`
source
Base.iterateMethod
iterate(::TypstCommand)
+false
source
Base.addenvFunction
addenv(::TypstCommand, args...; kwargs...)

See also TypstCommand and julia_mono.

Examples

julia> addenv(typst`compile input.typ output.pdf`, "TYPST_FONT_PATHS" => julia_mono)
+typst`compile input.typ output.pdf`
source
Base.detachFunction
detach(::TypstCommand)

See also TypstCommand.

Examples

julia> detach(typst`help`)
+typst`help`
source
Base.eltypeFunction
eltype(::Type{TypstCommand})

See also TypstCommand.

Examples

julia> eltype(TypstCommand)
+String
source
Base.firstindexFunction
firstindex(::TypstCommand)

See also TypstCommand.

Examples

julia> firstindex(typst`help`)
+1
source
Base.getindexFunction
getindex(::TypstCommand, i)

See also TypstCommand.

Examples

julia> typst`help`[2]
+"help"
source
Base.hashFunction
hash(::TypstCommand, ::UInt)

See also TypstCommand.

source
Base.ignorestatusFunction
ignorestatus(::TypstCommand)

Return a TypstCommand that does not throw a TypstError if the Typst compiler throws an error.

Errors thrown by the Typst compiler are printed to stderr regardless.

Examples

julia> ignorestatus(typst`help`)
+typst`help`
source
Base.iterateMethod
iterate(::TypstCommand)
 iterate(::TypstCommand, i)

See also TypstCommand.

Examples

julia> iterate(typst`help`, 2)
 ("help", 3)
 
-julia> iterate(typst`help`, 3)
source
Base.keysFunction
keys(::TypstCommand)

See also TypstCommand.

Examples

julia> keys(typst`help`)
+julia> iterate(typst`help`, 3)
source
Base.keysFunction
keys(::TypstCommand)

See also TypstCommand.

Examples

julia> keys(typst`help`)
 2-element LinearIndices{1, Tuple{Base.OneTo{Int64}}}:
  1
- 2
source
Base.lastindexFunction
lastindex(::TypstCommand)

See also TypstCommand.

Examples

julia> lastindex(typst`help`)
-2
source
Base.lengthFunction
length(::TypstCommand)

See also TypstCommand.

Examples

julia> length(typst`help`)
-2
source
Base.runFunction
run(::TypstCommand, args...; kwargs...)

See also TypstCommand.

Info

If the Typst compiler throws an error, it will be printed to stderr. Then, a Julia TypstError will be thrown unless the ignorestatus flag is set.

source
Base.setcpuaffinityFunction
setcpuaffinity(::TypstCommand, cpus)

See also TypstCommand.

Compat

Requires at least Julia v0.8.

Examples

julia> setcpuaffinity(typst`help`, nothing)
-typst`help`
source
Base.setenvFunction
setenv(::TypstCommand, args...; kwargs...)

See also TypstCommand and julia_mono.

Examples

julia> setenv(typst`compile input.typ output.pdf`, "TYPST_FONT_PATHS" => julia_mono)
-typst`compile input.typ output.pdf`
source
Base.showMethod
show(::IO, ::MIME"text/plain", ::TypstCommand)

See also TypstCommand.

Examples

julia> show(stdout, "text/plain", typst`help`)
-typst`help`
source
Base.showerrorFunction
showerror(::IO, ::TypstError)

Print a TypstError when failing to run a TypstCommand.

Examples

julia> showerror(stdout, TypstError(typst``))
-TypstError: failed to `run` a `TypstCommand([""]))`
source
+ 2source
Base.lastindexFunction
lastindex(::TypstCommand)

See also TypstCommand.

Examples

julia> lastindex(typst`help`)
+2
source
Base.lengthFunction
length(::TypstCommand)

See also TypstCommand.

Examples

julia> length(typst`help`)
+2
source
Base.runFunction
run(::TypstCommand, args...; kwargs...)

See also TypstCommand.

Info

If the Typst compiler throws an error, it will be printed to stderr. Then, a Julia TypstError will be thrown unless the ignorestatus flag is set.

source
Base.setcpuaffinityFunction
setcpuaffinity(::TypstCommand, cpus)

See also TypstCommand.

Compat

Requires at least Julia v0.8.

Examples

julia> setcpuaffinity(typst`help`, nothing)
+typst`help`
source
Base.setenvFunction
setenv(::TypstCommand, args...; kwargs...)

See also TypstCommand and julia_mono.

Examples

julia> setenv(typst`compile input.typ output.pdf`, "TYPST_FONT_PATHS" => julia_mono)
+typst`compile input.typ output.pdf`
source
Base.showMethod
show(::IO, ::MIME"text/plain", ::TypstCommand)

See also TypstCommand.

Examples

julia> show(stdout, "text/plain", typst`help`)
+typst`help`
source
Base.showerrorFunction
showerror(::IO, ::TypstError)

Print a TypstError when failing to run a TypstCommand.

Examples

julia> showerror(stdout, TypstError(typst``))
+TypstError: failed to `run` a `TypstCommand([""]))`
source
diff --git a/development/manual/extensions/index.html b/development/manual/extensions/index.html index aea5f4c..cbe8a22 100644 --- a/development/manual/extensions/index.html +++ b/development/manual/extensions/index.html @@ -1,4 +1,2 @@ -Extensions · Typstry.jl

Extensions

Dates.jl

Typstry.show_typstMethod
show_typst(io, ::Union{
-    Date, DateTime, Day, Hour, Minute, Second, Time, Week
-})

Print in Typst format for Dates.jl.

TypeSettingsParameters
Date:mode, :indent
DateTime:mode, :indent
Day:mode, :indent
Hour:mode, :indent
Minute:mode, :indent
Second:mode, :indent
Time:mode, :indent
Week:mode, :indent
source

LaTeXStrings.jl

Typstry.show_typstMethod
show_typst(io, ::LaTeXString)

Print in Typst format for LaTeXStrings.jl.

TypeSettingsParameters
LaTeXString:block, :depth, :mode, :tab_size
source

Markdown.jl

Typstry.show_typstMethod
show_typst(io, ::Markdown.MD)

Print in Typst format for Markdown.jl.

TypeSettingsParameters
Markdown.MD:block, :depth, :mode, :tab_size
source
+Extensions · Typstry.jl
diff --git a/development/manual/internals/index.html b/development/manual/internals/index.html index 724466a..a0629ab 100644 --- a/development/manual/internals/index.html +++ b/development/manual/internals/index.html @@ -1,44 +1,44 @@ -Internals · Typstry.jl

Internals

Strings

Typstry.preambleConstant
preamble

A constant used at the beginning of Typst source files generated by show(::IO, ::Union{MIME"application/pdf", MIME"image/png", MIME"image/svg+xml"}, ::TypstString).

Examples

julia> println(Typstry.preamble)
+Internals · Typstry.jl

Internals

Strings

Typstry.backticksFunction
backticks(io)

Return to io[:backticks]::Int.

Examples

julia> Typstry.backticks(IOContext(stdout, :backticks => 3))
-3
source
Typstry.blockFunction
block(io)

Return io[:block]::Bool.

Examples

julia> Typstry.block(IOContext(stdout, :block => true))
-true
source
Typstry.code_modeFunction
code_mode(io)

Print the number sign, unless mode(io) == code.

See also Mode and mode.

Examples

julia> Typstry.code_mode(IOContext(stdout, :mode => code))
+#set text(16pt, font: "JuliaMono")
source
Typstry.backticksFunction
backticks(io)

Return to io[:backticks]::Int.

Examples

julia> Typstry.backticks(IOContext(stdout, :backticks => 3))
+3
source
Typstry.blockFunction
block(io)

Return io[:block]::Bool.

Examples

julia> Typstry.block(IOContext(stdout, :block => true))
+true
source
Typstry.code_modeFunction
code_mode(io)

Print the number sign, unless mode(io) == code.

See also Mode and mode.

Examples

julia> Typstry.code_mode(IOContext(stdout, :mode => code))
 
 julia> Typstry.code_mode(IOContext(stdout, :mode => markup))
 #
 
 julia> Typstry.code_mode(IOContext(stdout, :mode => math))
-#
source
Typstry.depthFunction
depth(io)

Return io[:depth]::Int.

Examples

julia> Typstry.depth(IOContext(stdout, :depth => 0))
-0
source
Typstry.encloseFunction
enclose(f, io, x, left, right = reverse(left); kwargs...)

Call f(io, x; kwargs...) between printing left and right, respectfully.

Examples

julia> Typstry.enclose((io, i; x) -> print(io, i, x), stdout, 1, "\$ "; x = "x")
-$ 1x $
source
Typstry.formatFunction
format(::Union{MIME"application/pdf", MIME"image/png", MIME"image/svg+xml"})

Examples

julia> Typstry.format(MIME"application/pdf"())
+#
source
Typstry.depthFunction
depth(io)

Return io[:depth]::Int.

Examples

julia> Typstry.depth(IOContext(stdout, :depth => 0))
+0
source
Typstry.encloseFunction
enclose(f, io, x, left, right = reverse(left); kwargs...)

Call f(io, x; kwargs...) between printing left and right, respectfully.

Examples

julia> Typstry.enclose((io, i; x) -> print(io, i, x), stdout, 1, "\$ "; x = "x")
+$ 1x $
source
Typstry.formatFunction
format(::Union{MIME"application/pdf", MIME"image/png", MIME"image/svg+xml"})

Examples

julia> Typstry.format(MIME"application/pdf"())
 "pdf"
 
 julia> Typstry.format(MIME"image/png"())
 "png"
 
 julia> Typstry.format(MIME"image/svg+xml"())
-"svg"
source
Typstry.indentFunction
indent(io)

Return " " ^ io[:tab_size]::Int.

See also TypstString.

Examples

julia> Typstry.indent(IOContext(stdout, :tab_size => 2))
-"  "
source
Typstry.join_withFunction
join_with(f, io, xs, delimeter; kwargs...)

Similar to join, except printing with f(io, x; kwargs...).

Examples

julia> Typstry.join_with((io, i; x) -> print(io, -i, x), stdout, 1:4, ", "; x = "x")
--1x, -2x, -3x, -4x
source
Typstry.math_padFunction
math_pad(io)

Return "", "\$", or "\$ " depending on the block and mode settings.

Examples

julia> Typstry.math_pad(IOContext(stdout, :mode => math))
+"svg"
source
Typstry.indentFunction
indent(io)

Return " " ^ io[:tab_size]::Int.

See also TypstString.

Examples

julia> Typstry.indent(IOContext(stdout, :tab_size => 2))
+"  "
source
Typstry.join_withFunction
join_with(f, io, xs, delimeter; kwargs...)

Similar to join, except printing with f(io, x; kwargs...).

Examples

julia> Typstry.join_with((io, i; x) -> print(io, -i, x), stdout, 1:4, ", "; x = "x")
+-1x, -2x, -3x, -4x
source
Typstry.math_padFunction
math_pad(io)

Return "", "\$", or "\$ " depending on the block and mode settings.

Examples

julia> Typstry.math_pad(IOContext(stdout, :mode => math))
 ""
 
 julia> Typstry.math_pad(IOContext(stdout, :block => true, :mode => markup))
 "\$ "
 
 julia> Typstry.math_pad(IOContext(stdout, :block => false, :mode => markup))
-"\$"
source
Typstry.maybe_wrapFunction
maybe_wrap(::Any)

Wrap the value in Typst unless it is a TypstString or TypstText.

Examples

julia> Typstry.maybe_wrap(1)
 Typst{Int64}(1)
 
 julia> Typstry.maybe_wrap(TypstString(1))
 typst"$1$"
 
 julia> Typstry.maybe_wrap(TypstText(1))
-TypstText{Int64}(1)
source
Typstry.modeFunction
mode(io)

Return io[:mode]::Mode.

See also Mode.

Examples

julia> Typstry.mode(IOContext(stdout, :mode => code))
-code::Mode = 0
source
Typstry.parenthesizeFunction
parenthesize(io)

Return io[:parenthesize]::Bool.

Examples

julia> Typstry.parenthesize(IOContext(stdout, :parenthesize => true))
-true
source
Typstry.modeFunction
mode(io)

Return io[:mode]::Mode.

See also Mode.

Examples

julia> Typstry.mode(IOContext(stdout, :mode => code))
+code::Mode = 0
source
Typstry.parenthesizeFunction
parenthesize(io)

Return io[:parenthesize]::Bool.

Examples

julia> Typstry.parenthesize(IOContext(stdout, :parenthesize => true))
+true
source
Typstry.print_parametersFunction
print_parameters(io, f, keys, final)

Examples

julia> Typstry.print_parameters(
            IOContext(stdout, :depth => 0, :tab_size => 2, :delim => typst"\"(\""),
        "vec", [:delim, :gap], true)
 vec(
-  delim: "(",
source
Typstry.static_parseFunction
static_parse(args...; filename, kwargs...)

Call Meta.parse with the filename if it is supported in the current Julia version (at least v1.10).

source

Commands

Typstry.typst_compilerConstant
typst_compiler

A constant Cmd that is the Typst compiler given by Typst_jll.jl with no additional parameters.

source

Extensions

Dates

+ delim: "(",
source
Typstry.static_parseFunction
static_parse(args...; filename, kwargs...)

Call Meta.parse with the filename if it is supported in the current Julia version (at least v1.10).

source

Commands

Typstry.typst_compilerConstant
typst_compiler

A constant Cmd that is the Typst compiler given by Typst_jll.jl with no additional parameters.

source

Extensions

Dates

diff --git a/development/manual/strings/index.html b/development/manual/strings/index.html index b18fc83..67a7500 100644 --- a/development/manual/strings/index.html +++ b/development/manual/strings/index.html @@ -3,22 +3,22 @@ Enum Mode: code = 0 markup = 1 -math = 2source
Typstry.TypstType
Typst{T}
+math = 2
source
Typstry.TypstType
Typst{T}
 Typst(::T)

A wrapper used to pass values to show(::IO, ::MIME"text/typst", ::Typst).

julia> Typst(1)
 Typst{Int64}(1)
 
 julia> Typst("a")
-Typst{String}("a")
source
Typstry.TypstStringType
TypstString <: AbstractString
-TypstString(::Any; context...)

Convert the value to a Typst formatted string.

Optional Julia settings and Typst parameters are passed to show(::IO, ::MIME"text/typst", ::Typst) in an IOContext. See also show_typst for a list of supported types.

Info

This type implements the String interface. However, the interface is unspecified, which may result in unexpected behavior.

Examples

julia> TypstString(1)
+Typst{String}("a")
source
Typstry.TypstStringType
TypstString <: AbstractString
+TypstString(::Any; context...)

Convert the value to a Typst formatted string.

Optional Julia settings and Typst parameters are passed to show(::IO, ::MIME"text/typst", ::Typst) in an IOContext. See also show_typst for a list of supported types.

Info

This type implements the String interface. However, the interface is unspecified, which may result in unexpected behavior.

Examples

julia> TypstString(1)
 typst"$1$"
 
 julia> TypstString(1 + 2im; mode = math)
-typst"(1 + 2i)"
source
Typstry.TypstTextType
TypstText{T}
-TypstText(::Any)

A wrapper whose show_typst method uses print.

Info

This may be used to insert control characters into a TypstString. Unescaped control characters in TypstStrings may break formatting in some environments, such as the REPL.

Examples

julia> TypstText(1)
+typst"(1 + 2i)"
source
Typstry.TypstTextType
TypstText{T}
+TypstText(::Any)

A wrapper whose show_typst method uses print.

Info

This may be used to insert control characters into a TypstString. Unescaped control characters in TypstStrings may break formatting in some environments, such as the REPL.

Examples

julia> TypstText(1)
 TypstText{Int64}(1)
 
 julia> TypstText("a")
-TypstText{String}("a")
source
Typstry.@typst_strMacro
@typst_str(s)
+TypstText{String}("a")
source
Typstry.@typst_strMacro
@typst_str(s)
 typst"s"

Construct a TypstString.

Control characters are escaped, except double quotation marks and backslashes in the same manner as @raw_str. Values may be interpolated by calling the TypstString constructor, except using a backslash instead of the type name.

Tip

Print directly to an IO using show(::IO, ::MIME"text/typst", ::Typst).

See also the performance tip to Avoid string interpolation for I/O.

Examples

julia> x = 1;
 
 julia> typst"$ \(x; mode = math) / \(x + 1; mode = math) $"
@@ -31,34 +31,34 @@
 typst"(1 / 2)"
 
 julia> typst"\\(x)"
-typst"\\(x)"
source
Typstry.codeConstant
code

A Typst syntactical Mode prefixed by the number sign.

Examples

julia> code
-code::Mode = 0
source
Typstry.markupConstant
markup

A Typst syntactical Mode at the top-level of source text and enclosed within square brackets.

julia> markup
-markup::Mode = 1
source
Typstry.mathConstant
math

A Typst syntactical Mode enclosed within dollar signs.

julia> math
-math::Mode = 2
source
Typstry.contextFunction
context(x)

Provide formatting data for show(::IO, ::MIME"text/typst", ::Typst).

Implement this function for a custom type to specify its custom settings and parameters. Passing a value wrapped in Typst will merge! its custom context with defaults, such that the defaults may be overwritten. To be compatible with merging contexts and constructing an IOContext, methods must return an AbstractDict{Symbol}.

KeyDefaultTypeDescription
:backticks3IntThe number of backticks to enclose raw text markup, which may be increased to insert nested raw text.
:blockfalseBoolWhen :mode => math, specifies whether the enclosing dollar signs are padded with a space to render the element inline or its own block.
:depth0IntThe current level of nesting within container types to specify the degree of indentation.
:modemarkupModeThe current Typst syntactical context where code follows the number sign, markup is at the top-level and enclosed in square brackets, and math is enclosed in dollar signs.
:parenthesizetrueBoolWhether to enclose some mathematical elements in parentheses to specify their operator precedence and avoid ambiguity.
:tab_size2IntThe number of spaces used by some elements with multi-line Typst formatting, which is repeated for each level of depth
source
Typstry.show_typstMethod
show_typst(io, x)

Print in Typst format with Julia settings and Typst parameters provided by an IOContext.

Implement this function for a custom type to specify its Typst formatting. Settings are used in Julia to format the TypstString. Parameters are passed to a function in the Typst source file and must be a TypstString with the same name as in Typst, except that dashes are replaced with underscores. Some settings, such as block, correspond with a parameter but may be used in Julia and have a different type.

For additional information on settings and parameters, see also context and the Typst Documentation, respectively.

Info

Some types, particularly containers, may call show(::IO, ::MIME"text/typst", ::Typst) to format a value, which may use additional settings and parameters.

Warning

This function's methods are incomplete. Please file an issue or create a pull-request for missing methods.

TypeSettingsParameters
Docs.HTML:block, :depth, :mode, :tab_size
Docs.Text:mode
AbstractArray:block, :depth, :mode, :tab_size:delim,:gap`
AbstractChar
AbstractFloat:mode
AbstractMatrix:block, :depth, :mode, :tab_size:augment, :columngap,:delim,:gap,:rowgap`
AbstractString
Bool:mode
Complex{Bool}:block, :mode, :parenthesize
Complex:block, :mode, :parenthesize
Irrational:mode
Nothing:mode
OrdinalRange{<:Integer, <:Integer}:mode
Rational:block, :mode, :parenthesize
Regex:mode
Signed:mode
StepRangeLen{<:Integer, <:Integer, <:Integer}:mode
String:mode
Tuple:block, :depth, :mode, :tab_size:delim, :gap
Typst
TypstString
TypstText:mode
Unsigned:mode
VersionNumber:mode

```

source

Base

Base.IOBufferType
IOBuffer(::TypstString)

See also TypstString.

Examples

julia> IOBuffer(typst"a")
-IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=1, maxsize=Inf, ptr=1, mark=-1)
source
Base.codeunitFunction
codeunit(::TypstString)
+typst"\\(x)"
source
Typstry.codeConstant
code

A Typst syntactical Mode prefixed by the number sign.

Examples

julia> code
+code::Mode = 0
source
Typstry.markupConstant
markup

A Typst syntactical Mode at the top-level of source text and enclosed within square brackets.

julia> markup
+markup::Mode = 1
source
Typstry.mathConstant
math

A Typst syntactical Mode enclosed within dollar signs.

julia> math
+math::Mode = 2
source
Typstry.contextFunction
context(x)

Provide formatting data for show(::IO, ::MIME"text/typst", ::Typst).

Implement this function for a custom type to specify its custom settings and parameters. Passing a value wrapped in Typst will merge! its custom context with defaults, such that the defaults may be overwritten. To be compatible with merging contexts and constructing an IOContext, methods must return an AbstractDict{Symbol}.

KeyDefaultTypeDescription
:backticks3IntThe number of backticks to enclose raw text markup, which may be increased to insert nested raw text.
:blockfalseBoolWhen :mode => math, specifies whether the enclosing dollar signs are padded with a space to render the element inline or its own block.
:depth0IntThe current level of nesting within container types to specify the degree of indentation.
:modemarkupModeThe current Typst syntactical context where code follows the number sign, markup is at the top-level and enclosed in square brackets, and math is enclosed in dollar signs.
:parenthesizetrueBoolWhether to enclose some mathematical elements in parentheses to specify their operator precedence and avoid ambiguity.
:tab_size2IntThe number of spaces used by some elements with multi-line Typst formatting, which is repeated for each level of depth
source
Typstry.show_typstMethod
show_typst(io, x)

Print in Typst format with Julia settings and Typst parameters provided by an IOContext.

Implement this function for a custom type to specify its Typst formatting. Settings are used in Julia to format the TypstString. Parameters are passed to a function in the Typst source file and must be a TypstString with the same name as in Typst, except that dashes are replaced with underscores. Some settings, such as block, correspond with a parameter but may be used in Julia and have a different type.

For additional information on settings and parameters, see also context and the Typst Documentation, respectively.

Info

Some types, particularly containers, may call show(::IO, ::MIME"text/typst", ::Typst) to format a value, which may use additional settings and parameters.

Warning

This function's methods are incomplete. Please file an issue or create a pull-request for missing methods.

TypeSettingsParameters
AbstractArray:block, :depth, :mode, :tab_size:delim,:gap`
AbstractChar
AbstractFloat:mode
AbstractMatrix:block, :depth, :mode, :tab_size:augment, :columngap,:delim,:gap,:rowgap`
AbstractString
Bool:mode
Complex{Bool}:block, :mode, :parenthesize
Complex:block, :mode, :parenthesize
Irrational:mode
Nothing:mode
OrdinalRange{<:Integer, <:Integer}:mode
Rational:block, :mode, :parenthesize
Regex:mode
Signed:mode
StepRangeLen{<:Integer, <:Integer, <:Integer}:mode
String:mode
Tuple:block, :depth, :mode, :tab_size:delim, :gap
Typst
TypstString
TypstText:mode
Unsigned:mode
VersionNumber:mode
Docs.HTML:block, :depth, :mode, :tab_size
Docs.Text:mode
Dates.Date:mode, :indent
Dates.DateTime:mode, :indent
Dates.Day:mode, :indent
Dates.Hour:mode, :indent
Dates.Minute:mode, :indent
Dates.Second:mode, :indent
Dates.Time:mode, :indent
Dates.Week:mode, :indent

```

source

Base

Base.IOBufferType
IOBuffer(::TypstString)

See also TypstString.

Examples

julia> IOBuffer(typst"a")
+IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=1, maxsize=Inf, ptr=1, mark=-1)
source
Base.codeunitFunction
codeunit(::TypstString)
 codeunit(::TypstString, ::Integer)

See also TypstString.

Examples

julia> codeunit(typst"a")
 UInt8
 
 julia> codeunit(typst"a", 1)
-0x61
source
Base.isvalidFunction
isvalid(::TypstString, ::Integer)

See also TypstString.

Examples

julia> isvalid(typst"a", 1)
-true
source
Base.iterateMethod
iterate(::TypstString, ::Integer)
+0x61
source
Base.isvalidFunction
isvalid(::TypstString, ::Integer)

See also TypstString.

Examples

julia> isvalid(typst"a", 1)
+true
source
Base.iterateMethod
iterate(::TypstString, ::Integer)
 iterate(::TypstString)

See also TypstString.

Examples

julia> iterate(typst"a")
 ('a', 2)
 
 julia> iterate(typst"a", 1)
-('a', 2)
source
Base.ncodeunitsFunction
ncodeunits(::TypstString)

See also TypstString.

Examples

julia> ncodeunits(typst"a")
-1
source
Base.pointerFunction
pointer(::TypstString)

See also TypstString.

source
Base.reprFunction
repr(::MIME, ::TypstString; kwargs...)

See also TypstString.

Info

This method patches incorrect output from the assumption in repr that the parameter is already in the requested MIME type when the MIME type istextmime and the parameter is an AbstractString.

Examples

julia> repr("text/plain", typst"a")
+('a', 2)
source
Base.ncodeunitsFunction
ncodeunits(::TypstString)

See also TypstString.

Examples

julia> ncodeunits(typst"a")
+1
source
Base.pointerFunction
pointer(::TypstString)

See also TypstString.

source
Base.reprFunction
repr(::MIME, ::TypstString; kwargs...)

See also TypstString.

Info

This method patches incorrect output from the assumption in repr that the parameter is already in the requested MIME type when the MIME type istextmime and the parameter is an AbstractString.

Examples

julia> repr("text/plain", typst"a")
 "typst\"a\""
 
 julia> repr("text/typst", typst"a")
-typst"a"
source
Base.showMethod
show(::IO, ::TypstString)

See also TypstString.

Examples

julia> show(stdout, typst"a")
-typst"a"
source
Base.showMethod
show(::IO, ::MIME"text/typst", ::Union{Typst, TypstString, TypstText})

Print the Typst format.

This method provides formatting data to show_typst specified by a default and custom context.

See also TypstString and TypstText.

Examples

julia> show(stdout, "text/typst", typst"a")
+typst"a"
source
Base.showMethod
show(::IO, ::TypstString)

See also TypstString.

Examples

julia> show(stdout, typst"a")
+typst"a"
source
Base.showMethod
show(::IO, ::MIME"text/typst", ::Union{Typst, TypstString, TypstText})

Print the Typst format.

This method provides formatting data to show_typst specified by a default and custom context.

See also TypstString and TypstText.

Examples

julia> show(stdout, "text/typst", typst"a")
 a
 
 julia> show(stdout, "text/typst", Typst("a"))
 "a"
 
 julia> show(stdout, "text/typst", Typst(Text("a")))
-a
source
Base.showMethod
show(::IO, ::Union{
+a
source
Base.showMethod
show(::IO, ::Union{
     MIME"application/pdf", MIME"image/png", MIME"image/svg+xml"
-}, ::TypstString)

Print the Portable Document Format (PDF), Portable Network Graphics (PNG), or Scalable Vector Graphics (SVG) format.

The preamble keyword parameter used by render may be specified in an IOContext.

Note

Environments, such as Pluto.jl notebooks, may use these methods to display a TypstString.

source
+}, ::TypstString)

Print the Portable Document Format (PDF), Portable Network Graphics (PNG), or Scalable Vector Graphics (SVG) format.

The preamble keyword parameter used by render may be specified in an IOContext.

Note

Environments, such as Pluto.jl notebooks, may use these methods to display a TypstString.

source diff --git a/development/objects.inv b/development/objects.inv index 22a0e632f067791a350b26cf2f380a299d64a980..1c7995103aca2d67492d32a7f1a218297ef71533 100644 GIT binary patch delta 1554 zcmV+t2JQK+4TKGlg@3MJL9{clVPW051G*I`+UBh@u%N+`Vf$v#5^b}lNP(o1ct!vF zj-(X5n0CmbK!GY2@3}kP!{?4-qM#2*o8nC&bA*3E=nq-aY)y?}V!hCYC_{_>g3+rf z`sjZ^H~xpr)J7^sxSld$s9KSn_U!|&r)b_jW+f3d;ZtoCV1Meq;qc8A{JDqLB9|pR z6(N)M)fAmIPpuJsFjQzJMaZmsIYk$b&#kG8UO*lJ%g1+3X7(}rlibpOo1kBO=FW_h zCFNn4&woHTyQSLTl~kA(Yl?HCsUF&eb`vbE9RfRK?U1v}u87(e@?OOHwnP{%^dapk zz~2A8p#i?>QGe!f#h5f;F{aH8HFXu09K@h@*hsvlf+}Jtz9XC!*hPl5tW{32fpp@w zO6`!5sKr7K3pH6fEM&2=GuRkbP=%M$Y_QqTeSa9Jg@J4p1ddSa2(^w-=O_c(DOuFHfqDjtbxDb-)qj{w?$s&LEZ0w#4`=hT;?(*j z`%Vs4?po0m?4f30%yMRSQFh)6bynFmCqj%_<~;mGIh3)$*CgMPbs)uN0csaymu}lE ziE64b6Hr1(iUA)quC?W~-pG4=&zid13QUbF{?+{I0>dMXNaI`FOlFs3M;-=w7{mnX zV331B7Jmj=7)PEiT4X_x1pzJCQs+c2@0hGL&Nq_f^aQgNCU=BECOjsm12~h}*$~OD zbI~;GP~#7=6?$Bi%?FY?)~8NXJ^cpFE#5(}_p)lfYN>nZJRE zH-EA~dn3;Ck@4j9>HHI%t;y_V4`TBAylu;B_o9R@4}BC+K^GumXbbzekAYF{GzC_# zYT=v3{?yd9eZY7B-`XAoM$Y&Myrw3vYO-1}VWmF7jZJ#trO)r%2eCUrADVieZHPL) zbBAzX3jxXRVIR$JVyIYFG{4;J%BAE#K7Z@P^x02en?inT2`w=E>7ggH-zKwJU-IG4 z$?SKCt5@(|l&Tgn`{~w#urN30#~Lu>=PJJo&UG_62b1j(_N^hqzWtc2X0s?|ae#p% zg?p^2m5zJ?XI;k`x~Ot+Qv(gd76a}MxPGA&%+Y&f57YLl$>qqwXqPTw{D3sJI)5p5 zw__D4l8hXm79}fbSQkRu#k3!UpWZFET(sMJAf0`S4bhtvMexIIQr@3y&Is^J$Z+0a zN5CuSP8+J(e~G-bT0@i~2bAuZ*`Cy0od=Ive>REHxU2KwiL*K&(sq$l6;I3Py(b(z zyA(*SH;f};TVB%u5i=n|sFNTyRvr|Z_Ga2-c(7-_3Su{o(2FmEs zV&(u&#o8pD_6i`(q8aDx)h301{=OU$*NQ0}-x^!^yb<}B0jr>fEd3IDs5zv zOf1~Dqx1o@`5>v1I*I*y)!Zgirt(IGo|?YE^PH;g*&SlEwV*cs0Uae^0o)E+@ zXqC9bY3G!!g;dnuljk3B(^})1eVqJBZt1^`(XYO6C&tNw z^03O6KOj80rP|=7RG1bkigTi=9?FHH36fS0fgG}O$jMEviP{wMUc~CQi7?#gP1;s~ zz5BjN1ANmzJaoXHaQ&&;WfemVljl?S|s3L~qJHlCkon=_dTICcQa3?NQ zYKx3SEf#WEsPWQaA&WIRgTSzYD!hcfy)7?Q1GoE8{TqAsa$=T{Q%Y>Yvz zB4iaIP_%0d0!64*gjz+YQ#3gTSE92Fa#YEp&JDZ@oPX>kC8k#6%yUbpM6+B!d)A<$ ztT?qsl3gWxkNLBrO9;4TAk1=Rwo!6k3UyMG&zuM`PD!WXFUlcM1^!I(4Os zFv!CoCVx-|gB%R9Fv!BVOzW&g76e%kAdU@nO61~>$y(!lEm=;FFk51BM;Lg*V|?0! zlg-YCNOqsIrrC!YeTXg5)2_+YfPcp+-Z5~S;k{1ueCBl(G9R^w!?o0F6Bmc&Mh4!% zF<6=o zM`5bCp#|b*Ca!^x48ipkXxjV@93#DM_-bwaw+Fm!l94L%->wf~q z4{&3nlYDm(t4NU~pf$E-oe}vxd%j?jdn9M_~^~xQZ_pUr#g{A{|F5Xw4Fs` zsA0g29xY}L;8d(kQngnAVdl*^XRkIX`R6a!5q2$^(($dah0hz3j~TEEYJW%`<$2uf zQE|BHb+bo8S5BNkoTAVS5^UsQ4)bMeZ!ky5{=J0`1ct-k$L~UJZN*t^|EAT_*lVAT z&tpvOeaZVSruFaw>J_<9O6UcbaJfltDt9zDes+nLyO(OiW#W8chmzQWu!hlgq)Mr{ z_&L$f$8gO|81RrASDGMxK{Ttx2&dI4TM4PC tz0%cDN#o}U@(pdfnM(7r2;_GsvNM)if&KU5=$SEiEADrQ{{eINtyJqO7rg)g diff --git a/development/search_index.js b/development/search_index.js index 830c90d..66447fc 100644 --- a/development/search_index.js +++ b/development/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"manual/internals/#Internals","page":"Internals","title":"Internals","text":"","category":"section"},{"location":"manual/internals/","page":"Internals","title":"Internals","text":"Typstry.@stable_disable\nTypstry.workload","category":"page"},{"location":"manual/internals/#Typstry.@stable_disable","page":"Internals","title":"Typstry.@stable_disable","text":"@stable_disable(x)\n\nEquivalent to DispatchDoctor.@stable default_mode = \"disable\" x.\n\n\n\n\n\n","category":"macro"},{"location":"manual/internals/#Typstry.workload","page":"Internals","title":"Typstry.workload","text":"workload(examples)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Strings","page":"Internals","title":"Strings","text":"","category":"section"},{"location":"manual/internals/","page":"Internals","title":"Internals","text":"Typstry.examples\nTypstry.preamble\nTypstry.typst_mime\nTypstry.backticks\nTypstry.block\nTypstry.code_mode\nTypstry.depth\nTypstry.enclose\nTypstry.format\nTypstry.indent\nTypstry.join_with\nTypstry.math_mode\nTypstry.math_pad\nTypstry.maybe_wrap\nTypstry.mode\nTypstry.parenthesize\nTypstry.print_parameters\nTypstry.show_array\nTypstry.show_raw\nTypstry.show_vector\nTypstry.static_parse","category":"page"},{"location":"manual/internals/#Typstry.examples","page":"Internals","title":"Typstry.examples","text":"examples\n\nA constant Vector of Julia values and their corresponding Types implemented for show_typst.\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.preamble","page":"Internals","title":"Typstry.preamble","text":"preamble\n\nA constant used at the beginning of Typst source files generated by show(::IO, ::Union{MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"}, ::TypstString).\n\nExamples\n\njulia> println(Typstry.preamble)\n#set page(margin: 1em, height: auto, width: auto, fill: white)\n#set text(16pt, font: \"JuliaMono\")\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.typst_mime","page":"Internals","title":"Typstry.typst_mime","text":"typst_mime\n\nExamples\n\njulia> Typstry.typst_mime\nMIME type text/typst\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.backticks","page":"Internals","title":"Typstry.backticks","text":"backticks(io)\n\nReturn to io[:backticks]::Int.\n\nExamples\n\njulia> Typstry.backticks(IOContext(stdout, :backticks => 3))\n3\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.block","page":"Internals","title":"Typstry.block","text":"block(io)\n\nReturn io[:block]::Bool.\n\nExamples\n\njulia> Typstry.block(IOContext(stdout, :block => true))\ntrue\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.code_mode","page":"Internals","title":"Typstry.code_mode","text":"code_mode(io)\n\nPrint the number sign, unless mode(io) == code.\n\nSee also Mode and mode.\n\nExamples\n\njulia> Typstry.code_mode(IOContext(stdout, :mode => code))\n\njulia> Typstry.code_mode(IOContext(stdout, :mode => markup))\n#\n\njulia> Typstry.code_mode(IOContext(stdout, :mode => math))\n#\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.depth","page":"Internals","title":"Typstry.depth","text":"depth(io)\n\nReturn io[:depth]::Int.\n\nExamples\n\njulia> Typstry.depth(IOContext(stdout, :depth => 0))\n0\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.enclose","page":"Internals","title":"Typstry.enclose","text":"enclose(f, io, x, left, right = reverse(left); kwargs...)\n\nCall f(io, x; kwargs...) between printing left and right, respectfully.\n\nExamples\n\njulia> Typstry.enclose((io, i; x) -> print(io, i, x), stdout, 1, \"\\$ \"; x = \"x\")\n$ 1x $\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.format","page":"Internals","title":"Typstry.format","text":"format(::Union{MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"})\n\nExamples\n\njulia> Typstry.format(MIME\"application/pdf\"())\n\"pdf\"\n\njulia> Typstry.format(MIME\"image/png\"())\n\"png\"\n\njulia> Typstry.format(MIME\"image/svg+xml\"())\n\"svg\"\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.indent","page":"Internals","title":"Typstry.indent","text":"indent(io)\n\nReturn \" \" ^ io[:tab_size]::Int.\n\nSee also TypstString.\n\nExamples\n\njulia> Typstry.indent(IOContext(stdout, :tab_size => 2))\n\" \"\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.join_with","page":"Internals","title":"Typstry.join_with","text":"join_with(f, io, xs, delimeter; kwargs...)\n\nSimilar to join, except printing with f(io, x; kwargs...).\n\nExamples\n\njulia> Typstry.join_with((io, i; x) -> print(io, -i, x), stdout, 1:4, \", \"; x = \"x\")\n-1x, -2x, -3x, -4x\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.math_mode","page":"Internals","title":"Typstry.math_mode","text":"math_mode(f, io, x; kwargs...)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.math_pad","page":"Internals","title":"Typstry.math_pad","text":"math_pad(io)\n\nReturn \"\", \"\\$\", or \"\\$ \" depending on the block and mode settings.\n\nExamples\n\njulia> Typstry.math_pad(IOContext(stdout, :mode => math))\n\"\"\n\njulia> Typstry.math_pad(IOContext(stdout, :block => true, :mode => markup))\n\"\\$ \"\n\njulia> Typstry.math_pad(IOContext(stdout, :block => false, :mode => markup))\n\"\\$\"\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.maybe_wrap","page":"Internals","title":"Typstry.maybe_wrap","text":"maybe_wrap(::Any)\n\nWrap the value in Typst unless it is a TypstString or TypstText.\n\nExamples\n\njulia> Typstry.maybe_wrap(1)\nTypst{Int64}(1)\n\njulia> Typstry.maybe_wrap(TypstString(1))\ntypst\"$1$\"\n\njulia> Typstry.maybe_wrap(TypstText(1))\nTypstText{Int64}(1)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.mode","page":"Internals","title":"Typstry.mode","text":"mode(io)\n\nReturn io[:mode]::Mode.\n\nSee also Mode.\n\nExamples\n\njulia> Typstry.mode(IOContext(stdout, :mode => code))\ncode::Mode = 0\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.parenthesize","page":"Internals","title":"Typstry.parenthesize","text":"parenthesize(io)\n\nReturn io[:parenthesize]::Bool.\n\nExamples\n\njulia> Typstry.parenthesize(IOContext(stdout, :parenthesize => true))\ntrue\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.print_parameters","page":"Internals","title":"Typstry.print_parameters","text":"print_parameters(io, f, keys, final)\n\nExamples\n\njulia> Typstry.print_parameters(\n IOContext(stdout, :depth => 0, :tab_size => 2, :delim => typst\"\\\"(\\\"\"),\n \"vec\", [:delim, :gap], true)\nvec(\n delim: \"(\",\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.show_array","page":"Internals","title":"Typstry.show_array","text":"show_array(io, x)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.show_raw","page":"Internals","title":"Typstry.show_raw","text":"show_raw(f, io, x, language)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.show_vector","page":"Internals","title":"Typstry.show_vector","text":"show_vector(io, x)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.static_parse","page":"Internals","title":"Typstry.static_parse","text":"static_parse(args...; filename, kwargs...)\n\nCall Meta.parse with the filename if it is supported in the current Julia version (at least v1.10).\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Commands","page":"Internals","title":"Commands","text":"","category":"section"},{"location":"manual/internals/","page":"Internals","title":"Internals","text":"Typstry.typst_compiler\nTypstry.apply","category":"page"},{"location":"manual/internals/#Typstry.typst_compiler","page":"Internals","title":"Typstry.typst_compiler","text":"typst_compiler\n\nA constant Cmd that is the Typst compiler given by Typst_jll.jl with no additional parameters.\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.apply","page":"Internals","title":"Typstry.apply","text":"apply(f, tc, args...; kwargs...)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Extensions","page":"Internals","title":"Extensions","text":"","category":"section"},{"location":"manual/internals/#Dates","page":"Internals","title":"Dates","text":"","category":"section"},{"location":"tutorials/interface/#Interface","page":"Interface","title":"Interface","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"This tutorial illustrates the Julia to Typst interface.","category":"page"},{"location":"tutorials/interface/#Setup","page":"Interface","title":"Setup","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> import Base: show\n\njulia> import Typstry: context, show_typst\n\njulia> using Typstry","category":"page"},{"location":"tutorials/interface/#Implementation","page":"Interface","title":"Implementation","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Consider this custom type.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> struct Reciprocal{N <: Number}\n n::N\n end","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Implement a show_typst method to specify its Typst formatting. Remember to Annotate values taken from untyped locations.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> show_typst(io, r::Reciprocal) =\n if io[:mode]::Mode == markup\n print(io, \"#let reciprocal(n) = \\$1 / #n\\$\")\n else\n print(io, \"reciprocal(\")\n show(io, MIME\"text/typst\"(), Typst(round(r.n; digits = io[:digits]::Int)))\n print(io, \")\")\n end;","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Although custom formatting may be handled in show_typst with get(io, key, default), this may be repetitive when specifying defaults for multiple methods. There is also no way to tell if the value has been specified by the user or if it is a default. Instead, implement a custom context which overrides default, but not user specifications.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> context(::Reciprocal) = Dict(:digits => 2);","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Those two methods are a complete implementation of the Julia to Typst interface. The following method is optional:","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> show(io::IO, m::MIME\"text/typst\", r::Reciprocal) = show(io, m, Typst(r));","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Now, a Reciprocal is fully supported by Typstry.jl.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> r = Reciprocal(π);\n\njulia> println(TypstString(r))\n#let reciprocal(n) = $1 / #n$\n\njulia> println(TypstString(r; mode = math))\nreciprocal(3.14)\n\njulia> println(TypstString(r; mode = math, digits = 4))\nreciprocal(3.1416)","category":"page"},{"location":"tutorials/interface/#Guidelines","page":"Interface","title":"Guidelines","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"While implementing the interface only requires two methods, it may be more challenging to determine how a Julia value should be represented in a Typst source file and its corresponding compiled document. Julia and Typst are distinct languages that differ in both syntax and semantics, so there may be multiple meaningful formats to choose from.","category":"page"},{"location":"tutorials/interface/#Make-the-obvious-choice,-if-available","page":"Interface","title":"Make the obvious choice, if available","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"There is a clear correspondence between these Julia and Typst values","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(1))\n$1$\n\njulia> println(TypstString(nothing))\n#none\n\njulia> println(TypstString(r\"[a-z]\"))\n#regex(\"[a-z]\")","category":"page"},{"location":"tutorials/interface/#Choose-the-most-semantically-rich-representation","page":"Interface","title":"Choose the most semantically rich representation","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"This may vary across Modes and domains\nSome modes may not have a meaningful representation, and should be formatted into a mode that does\nBoth Julia and Typst support Unicode characters, except unknown variables in Typst's code mode","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(π; mode = code))\n3.141592653589793\n\njulia> println(TypstString(π; mode = math))\nπ\n\njulia> println(TypstString(π; mode = markup))\n$π$","category":"page"},{"location":"tutorials/interface/#Consider-both-the-Typst-source-text-and-compiled-document-formatting","page":"Interface","title":"Consider both the Typst source text and compiled document formatting","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"A Docs.Text is documented to \"render [its value] as plain text\", and therefore corresponds to text in a rendered Typst document\nA TypstString represents Typst source text, and is printed directly","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(text\"[\\\"a\\\"]\"))\n[\"a\"]\n\njulia> println(TypstString(typst\"[\\\"a\\\"]\"))\n[\"a\"]","category":"page"},{"location":"tutorials/interface/#Try-to-generate-valid-Typst-source-text","page":"Interface","title":"Try to generate valid Typst source text","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"A TypstString represents Typst source text, which may be invalid\nA UnitRange{Int} is formatted differently for each Mode, but is always valid","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(1:4; mode = code))\nrange(1, 5)\n\njulia> println(TypstString(1:4; mode = math))\nvec(\n 1, 2, 3, 4\n)\n\njulia> println(TypstString(1:4; mode = markup))\n$vec(\n 1, 2, 3, 4\n)$","category":"page"},{"location":"tutorials/interface/#Test-for-edge-cases","page":"Interface","title":"Test for edge cases","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"#1 / 2 is valid Typst source text, but is parsed partially in code mode as (#1) / 2\n1 / 2 may be ambiguous in a math mode expression\n$1 / 2$ is not ambiguous in markup mode","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(1 // 2; mode = code))\n(1 / 2)\n\njulia> println(TypstString(1 // 2; mode = math))\n(1 / 2)\n\njulia> println(TypstString(1 // 2; mode = markup))\n$1 / 2$","category":"page"},{"location":"tutorials/interface/#Format-values-in-containers-using-show-with-the-text/typst-MIME-type","page":"Interface","title":"Format values in containers using show with the text/typst MIME type","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Values may require some of their context\nThe AbstractVector method changes its Mode to math and increments its depth","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString([true, 1, Any[1.2, 1 // 2]]))\n$vec(\n \"true\", 1, vec(\n 1.2, 1 / 2\n )\n)$","category":"page"},{"location":"tutorials/interface/#Check-parametric-and-abstract-types","page":"Interface","title":"Check parametric and abstract types","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Related Julia types may not be representable in the same Typst format","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(0:2:6; mode = code))\nrange(0, 7, step: 2)\n\njulia> println(TypstString(0:2.0:6; mode = code))\n(0.0, 2.0, 4.0, 6.0)","category":"page"},{"location":"tutorials/interface/#Prefer-simplicity","page":"Interface","title":"Prefer simplicity","text":"","category":"section"},{"location":"manual/extensions/#extensions_extensions","page":"Extensions","title":"Extensions","text":"","category":"section"},{"location":"manual/extensions/#Dates.jl","page":"Extensions","title":"Dates.jl","text":"","category":"section"},{"location":"manual/extensions/","page":"Extensions","title":"Extensions","text":"show_typst(::Any, ::Union{Dates.Date, Dates.DateTime, Dates.Time})","category":"page"},{"location":"manual/extensions/#Typstry.show_typst-Tuple{Any, Union{Date, DateTime, Time}}","page":"Extensions","title":"Typstry.show_typst","text":"show_typst(io, ::Union{\n Date, DateTime, Day, Hour, Minute, Second, Time, Week\n})\n\nPrint in Typst format for Dates.jl.\n\nType Settings Parameters\nDate :mode, :indent \nDateTime :mode, :indent \nDay :mode, :indent \nHour :mode, :indent \nMinute :mode, :indent \nSecond :mode, :indent \nTime :mode, :indent \nWeek :mode, :indent \n\n\n\n\n\n","category":"method"},{"location":"manual/extensions/#LaTeXStrings.jl","page":"Extensions","title":"LaTeXStrings.jl","text":"","category":"section"},{"location":"manual/extensions/","page":"Extensions","title":"Extensions","text":"show_typst(::Any, ::LaTeXStrings.LaTeXString)","category":"page"},{"location":"manual/extensions/#Typstry.show_typst-Tuple{Any, LaTeXString}","page":"Extensions","title":"Typstry.show_typst","text":"show_typst(io, ::LaTeXString)\n\nPrint in Typst format for LaTeXStrings.jl.\n\nType Settings Parameters\nLaTeXString :block, :depth, :mode, :tab_size \n\n\n\n\n\n","category":"method"},{"location":"manual/extensions/#Markdown.jl","page":"Extensions","title":"Markdown.jl","text":"","category":"section"},{"location":"manual/extensions/","page":"Extensions","title":"Extensions","text":"show_typst(::Any, ::Markdown.MD)","category":"page"},{"location":"manual/extensions/#Typstry.show_typst-Tuple{Any, MD}","page":"Extensions","title":"Typstry.show_typst","text":"show_typst(io, ::Markdown.MD)\n\nPrint in Typst format for Markdown.jl.\n\nType Settings Parameters\nMarkdown.MD :block, :depth, :mode, :tab_size \n\n\n\n\n\n","category":"method"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"DocTestSetup = :(using Typstry)","category":"page"},{"location":"getting_started/#Getting-Started","page":"Getting Started","title":"Getting Started","text":"","category":"section"},{"location":"getting_started/#Basics","page":"Getting Started","title":"Basics","text":"","category":"section"},{"location":"getting_started/#Strings","page":"Getting Started","title":"Strings","text":"","category":"section"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Print Julia values in Typst format using show with the text/typst MIME type.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> show(stdout, \"text/typst\", Typst(π))\n$π$","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Some methods use an IOContext to configure the formatting.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> show(IOContext(stdout, :mode => code), \"text/typst\", Typst(π))\n3.141592653589793","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Instead of printing, create a TypstString using its constructor or @typst_str with formatted interpolation.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> TypstString(π)\ntypst\"$π$\"\n\njulia> TypstString(π; mode = code)\ntypst\"3.141592653589793\"\n\njulia> typst\"$ \\(pi; mode = math) approx \\(pi; mode = code) $\"\ntypst\"$ π approx 3.141592653589793 $\"","category":"page"},{"location":"getting_started/#Commands","page":"Getting Started","title":"Commands","text":"","category":"section"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Use render to easily generate a Typst source file and compile it into a document.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> render(Any[true 1; 1.2 1 // 2]);","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Compile source files by running a TypstCommand created using its constructor or @typst_cmd.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> TypstCommand([\"help\"])\ntypst`help`\n\njulia> run(typst`compile input.typ output.pdf`);","category":"page"},{"location":"getting_started/#Examples","page":"Getting Started","title":"Examples","text":"","category":"section"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"These Typst documents were generated from Julia using show with the text/typst MIME type and compiled using a TypstCommand. Each row corresponds to a method of show_typst. Sequential documents correspond to package Extensions.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"(Image: Typstry.jl examples) (Image: Dates.jl examples) (Image: LaTeXStrings.jl examples) (Image: Markdown.jl examples)","category":"page"},{"location":"manual/strings/#Strings","page":"Strings","title":"Strings","text":"","category":"section"},{"location":"manual/strings/#Typstry","page":"Strings","title":"Typstry","text":"","category":"section"},{"location":"manual/strings/","page":"Strings","title":"Strings","text":"Mode\nTypst\nTypstString\nTypstText\n@typst_str\ncode\nmarkup\nmath\ncontext\nshow_typst(::Any, ::AbstractChar)","category":"page"},{"location":"manual/strings/#Typstry.Mode","page":"Strings","title":"Typstry.Mode","text":"Mode\n\nAn Enumerated type used to specify that the current Typst syntactical context is code, markup, or math.\n\njulia> Mode\nEnum Mode:\ncode = 0\nmarkup = 1\nmath = 2\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.Typst","page":"Strings","title":"Typstry.Typst","text":"Typst{T}\nTypst(::T)\n\nA wrapper used to pass values to show(::IO, ::MIME\"text/typst\", ::Typst).\n\njulia> Typst(1)\nTypst{Int64}(1)\n\njulia> Typst(\"a\")\nTypst{String}(\"a\")\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.TypstString","page":"Strings","title":"Typstry.TypstString","text":"TypstString <: AbstractString\nTypstString(::Any; context...)\n\nConvert the value to a Typst formatted string.\n\nOptional Julia settings and Typst parameters are passed to show(::IO, ::MIME\"text/typst\", ::Typst) in an IOContext. See also show_typst for a list of supported types.\n\ninfo: Info\nThis type implements the String interface. However, the interface is unspecified, which may result in unexpected behavior.\n\nExamples\n\njulia> TypstString(1)\ntypst\"$1$\"\n\njulia> TypstString(1 + 2im; mode = math)\ntypst\"(1 + 2i)\"\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.TypstText","page":"Strings","title":"Typstry.TypstText","text":"TypstText{T}\nTypstText(::Any)\n\nA wrapper whose show_typst method uses print.\n\ninfo: Info\nThis may be used to insert control characters into a TypstString. Unescaped control characters in TypstStrings may break formatting in some environments, such as the REPL.\n\nExamples\n\njulia> TypstText(1)\nTypstText{Int64}(1)\n\njulia> TypstText(\"a\")\nTypstText{String}(\"a\")\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.@typst_str","page":"Strings","title":"Typstry.@typst_str","text":"@typst_str(s)\ntypst\"s\"\n\nConstruct a TypstString.\n\nControl characters are escaped, except double quotation marks and backslashes in the same manner as @raw_str. Values may be interpolated by calling the TypstString constructor, except using a backslash instead of the type name.\n\ntip: Tip\nPrint directly to an IO using show(::IO, ::MIME\"text/typst\", ::Typst).See also the performance tip to Avoid string interpolation for I/O.\n\nExamples\n\njulia> x = 1;\n\njulia> typst\"$ \\(x; mode = math) / \\(x + 1; mode = math) $\"\ntypst\"$ 1 / 2 $\"\n\njulia> typst\"\\(x//2)\"\ntypst\"$1 / 2$\"\n\njulia> typst\"\\(x // 2; mode = math)\"\ntypst\"(1 / 2)\"\n\njulia> typst\"\\\\(x)\"\ntypst\"\\\\(x)\"\n\n\n\n\n\n","category":"macro"},{"location":"manual/strings/#Typstry.code","page":"Strings","title":"Typstry.code","text":"code\n\nA Typst syntactical Mode prefixed by the number sign.\n\nExamples\n\njulia> code\ncode::Mode = 0\n\n\n\n\n\n","category":"constant"},{"location":"manual/strings/#Typstry.markup","page":"Strings","title":"Typstry.markup","text":"markup\n\nA Typst syntactical Mode at the top-level of source text and enclosed within square brackets.\n\njulia> markup\nmarkup::Mode = 1\n\n\n\n\n\n","category":"constant"},{"location":"manual/strings/#Typstry.math","page":"Strings","title":"Typstry.math","text":"math\n\nA Typst syntactical Mode enclosed within dollar signs.\n\njulia> math\nmath::Mode = 2\n\n\n\n\n\n","category":"constant"},{"location":"manual/strings/#Typstry.context","page":"Strings","title":"Typstry.context","text":"context(x)\n\nProvide formatting data for show(::IO, ::MIME\"text/typst\", ::Typst).\n\nImplement this function for a custom type to specify its custom settings and parameters. Passing a value wrapped in Typst will merge! its custom context with defaults, such that the defaults may be overwritten. To be compatible with merging contexts and constructing an IOContext, methods must return an AbstractDict{Symbol}.\n\nKey Default Type Description\n:backticks 3 Int The number of backticks to enclose raw text markup, which may be increased to insert nested raw text.\n:block false Bool When :mode => math, specifies whether the enclosing dollar signs are padded with a space to render the element inline or its own block.\n:depth 0 Int The current level of nesting within container types to specify the degree of indentation.\n:mode markup Mode The current Typst syntactical context where code follows the number sign, markup is at the top-level and enclosed in square brackets, and math is enclosed in dollar signs.\n:parenthesize true Bool Whether to enclose some mathematical elements in parentheses to specify their operator precedence and avoid ambiguity.\n:tab_size 2 Int The number of spaces used by some elements with multi-line Typst formatting, which is repeated for each level of depth\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Typstry.show_typst-Tuple{Any, AbstractChar}","page":"Strings","title":"Typstry.show_typst","text":"show_typst(io, x)\n\nPrint in Typst format with Julia settings and Typst parameters provided by an IOContext.\n\nImplement this function for a custom type to specify its Typst formatting. Settings are used in Julia to format the TypstString. Parameters are passed to a function in the Typst source file and must be a TypstString with the same name as in Typst, except that dashes are replaced with underscores. Some settings, such as block, correspond with a parameter but may be used in Julia and have a different type.\n\nFor additional information on settings and parameters, see also context and the Typst Documentation, respectively.\n\ninfo: Info\nSome types, particularly containers, may call show(::IO, ::MIME\"text/typst\", ::Typst) to format a value, which may use additional settings and parameters.\n\nwarning: Warning\nThis function's methods are incomplete. Please file an issue or create a pull-request for missing methods.\n\nType Settings Parameters\nDocs.HTML :block, :depth, :mode, :tab_size \nDocs.Text :mode \nAbstractArray :block, :depth, :mode, :tab_size :delim,:gap`\nAbstractChar \nAbstractFloat :mode \nAbstractMatrix :block, :depth, :mode, :tab_size :augment, :columngap,:delim,:gap,:rowgap`\nAbstractString \nBool :mode \nComplex{Bool} :block, :mode, :parenthesize \nComplex :block, :mode, :parenthesize \nIrrational :mode \nNothing :mode \nOrdinalRange{<:Integer, <:Integer} :mode \nRational :block, :mode, :parenthesize \nRegex :mode \nSigned :mode \nStepRangeLen{<:Integer, <:Integer, <:Integer} :mode \nString :mode \nTuple :block, :depth, :mode, :tab_size :delim, :gap\nTypst \nTypstString \nTypstText :mode \nUnsigned :mode \nVersionNumber :mode \n\n```\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base","page":"Strings","title":"Base","text":"","category":"section"},{"location":"manual/strings/","page":"Strings","title":"Strings","text":"IOBuffer\ncodeunit\nisvalid\niterate(::TypstString)\nncodeunits\npointer\nrepr\nshow(::IO, ::TypstString)\nshow(::IO, ::MIME\"text/typst\", ::Typst)\nshow(::IO, ::Union{MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"}, ::TypstString)","category":"page"},{"location":"manual/strings/#Base.IOBuffer","page":"Strings","title":"Base.IOBuffer","text":"IOBuffer(::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> IOBuffer(typst\"a\")\nIOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=1, maxsize=Inf, ptr=1, mark=-1)\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Base.codeunit","page":"Strings","title":"Base.codeunit","text":"codeunit(::TypstString)\ncodeunit(::TypstString, ::Integer)\n\nSee also TypstString.\n\nExamples\n\njulia> codeunit(typst\"a\")\nUInt8\n\njulia> codeunit(typst\"a\", 1)\n0x61\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.isvalid","page":"Strings","title":"Base.isvalid","text":"isvalid(::TypstString, ::Integer)\n\nSee also TypstString.\n\nExamples\n\njulia> isvalid(typst\"a\", 1)\ntrue\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.iterate-Tuple{TypstString}","page":"Strings","title":"Base.iterate","text":"iterate(::TypstString, ::Integer)\niterate(::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> iterate(typst\"a\")\n('a', 2)\n\njulia> iterate(typst\"a\", 1)\n('a', 2)\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base.ncodeunits","page":"Strings","title":"Base.ncodeunits","text":"ncodeunits(::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> ncodeunits(typst\"a\")\n1\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.pointer","page":"Strings","title":"Base.pointer","text":"pointer(::TypstString)\n\nSee also TypstString.\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.repr","page":"Strings","title":"Base.repr","text":"repr(::MIME, ::TypstString; kwargs...)\n\nSee also TypstString.\n\ninfo: Info\nThis method patches incorrect output from the assumption in repr that the parameter is already in the requested MIME type when the MIME type istextmime and the parameter is an AbstractString.\n\nExamples\n\njulia> repr(\"text/plain\", typst\"a\")\n\"typst\\\"a\\\"\"\n\njulia> repr(\"text/typst\", typst\"a\")\ntypst\"a\"\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.show-Tuple{IO, TypstString}","page":"Strings","title":"Base.show","text":"show(::IO, ::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> show(stdout, typst\"a\")\ntypst\"a\"\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base.show-Tuple{IO, MIME{Symbol(\"text/typst\")}, Typst}","page":"Strings","title":"Base.show","text":"show(::IO, ::MIME\"text/typst\", ::Union{Typst, TypstString, TypstText})\n\nPrint the Typst format.\n\nThis method provides formatting data to show_typst specified by a default and custom context.\n\nSee also TypstString and TypstText.\n\nExamples\n\njulia> show(stdout, \"text/typst\", typst\"a\")\na\n\njulia> show(stdout, \"text/typst\", Typst(\"a\"))\n\"a\"\n\njulia> show(stdout, \"text/typst\", Typst(Text(\"a\")))\na\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base.show-Tuple{IO, Union{MIME{Symbol(\"application/pdf\")}, MIME{Symbol(\"image/png\")}, MIME{Symbol(\"image/svg+xml\")}}, TypstString}","page":"Strings","title":"Base.show","text":"show(::IO, ::Union{\n MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"\n}, ::TypstString)\n\nPrint the Portable Document Format (PDF), Portable Network Graphics (PNG), or Scalable Vector Graphics (SVG) format.\n\nThe preamble keyword parameter used by render may be specified in an IOContext.\n\nnote: Note\nEnvironments, such as Pluto.jl notebooks, may use these methods to display a TypstString.\n\n\n\n\n\n","category":"method"},{"location":"","page":"Home","title":"Home","text":"DocTestSetup = :(using Typstry)","category":"page"},{"location":"#Home","page":"Home","title":"Home","text":"","category":"section"},{"location":"#Introduction","page":"Home","title":"Introduction","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Typstry.jl is the interface to convert the computational power of Julia into beautifully formatted Typst documents.","category":"page"},{"location":"#What-is-Typst?","page":"Home","title":"What is Typst?","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Typst is an open-source and relatively new typesetting system (written in Rust 🦀🚀), designed to improve upon the performance and usability of LaTeX. See also the Typst repository and documentation for examples and how to get started.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"julia> using Pkg: add\n\njulia> add(\"Typstry\")\n\njulia> using Typstry","category":"page"},{"location":"#Showcase","page":"Home","title":"Showcase","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"julia> show_typst(IOContext(stdout, :mode => code), true)\ntrue\n\njulia> show(stdout, \"text/typst\", Typst([true 1; 1.0 [Any[true 1; 1.0 nothing]]]))\n$mat(\n \"true\", 1;\n 1.0, mat(\n \"true\", 1;\n 1.0, #none\n )\n)$\n\njulia> TypstString(1 // 2; block = true)\ntypst\"$ 1 / 2 $\"\n\njulia> typst\"$ \\(1 + 2im; mode = math) $\"\ntypst\"$ (1 + 2i) $\"\n\njulia> TypstCommand([\"help\"])\ntypst`help`\n\njulia> addenv(typst`compile input.typ output.pdf`, \"TYPST_FONT_PATHS\" => julia_mono)\ntypst`compile input.typ output.pdf`","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"#Strings","page":"Home","title":"Strings","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Print Julia values in Typst format\nSpecify Julia settings and Typst parameters\nImplement formatting for custom types\nConstruct Typst strings\nInterpolate formatted values\nRender in Pluto.jl notebooks","category":"page"},{"location":"#Commands","page":"Home","title":"Commands","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Construct Typst commands\nRender documents using the Typst compiler\nUse the JuliaMono typeface","category":"page"},{"location":"#Planned","page":"Home","title":"Planned","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Support rendering in more environments\nIJulia.jl\nQuarto?\nREPL Unicode?\nOther?\nDefault auto::Mode?\nAutomatically determine the Typst syntactic context\nUse a tree-sitter grammar or jll package\nDocumenter.jl backend and docstrings\nRequires Typst to output HTML\nImplement Typst formatting for more types\nBase\nAbstractDict\nAbstractIrrational\nAbstractSet\nEnum\nExpr\nMode\nSymbol\nPackage extensions\nStandard Library\nDates.jl\nPeriod –> duration\nLinearAlgebra.jl\nA symbolic TypstFunction?\nMay faciliate Julia to Typst transpilation\nExamples\nTypstString(TypstFunction(eval, :(1//2); mode = code)) == typst\"eval(\"(1 / 2)\", mode: \\\"code\\\")\"\nTypstString(TypstFunction(*, :a, :b; mode = math)) == typst\"(a) (b)\"","category":"page"},{"location":"#Related-Packages","page":"Home","title":"Related Packages","text":"","category":"section"},{"location":"#Typst","page":"Home","title":"Typst","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Labelyst.jl\nSummaryTables.jl\nTypstGenerator.jl\nTypst_jll.jl","category":"page"},{"location":"#LaTeX","page":"Home","title":"LaTeX","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Latexify.jl\nLaTeXStrings.jl\nLatexPrint.jl\nMakieTeX.jl\nSupports Typstry.jl\nMathJaxRenderer.jl","category":"page"},{"location":"manual/commands/#Commands","page":"Commands","title":"Commands","text":"","category":"section"},{"location":"manual/commands/#Typstry","page":"Commands","title":"Typstry","text":"","category":"section"},{"location":"manual/commands/","page":"Commands","title":"Commands","text":"TypstCommand\nTypstError\n@typst_cmd\njulia_mono\nrender","category":"page"},{"location":"manual/commands/#Typstry.TypstCommand","page":"Commands","title":"Typstry.TypstCommand","text":"TypstCommand(::Vector{String})\nTypstCommand(::TypstCommand; kwargs...)\nTypstCommand(::TypstCommand, ignorestatus, flags, env, dir, cpus = nothing)\n\nThe Typst compiler.\n\ninfo: Info\nThis type implements the Cmd interface. However, the interface is unspecified, which may result in unexpected behavior.\n\nExamples\n\njulia> help = TypstCommand([\"help\"])\ntypst`help`\n\njulia> TypstCommand(help; ignorestatus = true)\ntypst`help`\n\n\n\n\n\n","category":"type"},{"location":"manual/commands/#Typstry.TypstError","page":"Commands","title":"Typstry.TypstError","text":"TypstError <: Exception\nTypstError(::TypstCommand)\n\nAn Exception indicating a failure to run a TypstCommand.\n\n\n\n\n\n","category":"type"},{"location":"manual/commands/#Typstry.@typst_cmd","page":"Commands","title":"Typstry.@typst_cmd","text":"@typst_cmd(s)\ntypst`s`\n\nConstruct a TypstCommand where each parameter is separated by a space.\n\nThis does not support interpolation; use the constructor instead.\n\nExamples\n\njulia> typst`help`\ntypst`help`\n\njulia> typst`compile input.typ output.typ`\ntypst`compile input.typ output.typ`\n\n\n\n\n\n","category":"macro"},{"location":"manual/commands/#Typstry.julia_mono","page":"Commands","title":"Typstry.julia_mono","text":"julia_mono\n\nAn constant artifact containing the JuliaMono typeface.\n\nUse with a TypstCommand and one of addenv, setenv, or the font-path Typst command-line option.\n\n\n\n\n\n","category":"constant"},{"location":"manual/commands/#Typstry.render","page":"Commands","title":"Typstry.render","text":"render(x;\n input = \"input.typ\",\n output = \"output.pdf\",\n open = true,\n preamble = \"\"\"\n #set page(margin: 1em, height: auto, width: auto, fill: white)\n #set text(16pt, font: \"JuliaMono\")\n \"\"\",\ncontext...)\n\nRender to a document using show(::IO, ::MIME\"text/typst\", ::Typst).\n\nThis generates two files: the input is the Typst source text and the output is the compiled document. The document format is inferred by the file extension of output, which may be pdf, png, or svg. The document may be automatically opened by the default viewer.\n\nExamples\n\njulia> render(Any[true 1; 1.2 1 // 2]);\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base","page":"Commands","title":"Base","text":"","category":"section"},{"location":"manual/commands/","page":"Commands","title":"Commands","text":"==\naddenv\ndetach\neltype\nfirstindex\ngetindex\nhash\nignorestatus\niterate(::TypstCommand)\nkeys\nlastindex\nlength\nrun\nsetcpuaffinity\nsetenv\nshow(::IO, ::MIME\"text/plain\", ::TypstCommand)\nshowerror","category":"page"},{"location":"manual/commands/#Base.:==","page":"Commands","title":"Base.:==","text":"==(::TypstCommand, ::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> help = typst`help`\ntypst`help`\n\njulia> help == help\ntrue\n\njulia> help == TypstCommand(help; ignorestatus = true)\nfalse\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.addenv","page":"Commands","title":"Base.addenv","text":"addenv(::TypstCommand, args...; kwargs...)\n\nSee also TypstCommand and julia_mono.\n\nExamples\n\njulia> addenv(typst`compile input.typ output.pdf`, \"TYPST_FONT_PATHS\" => julia_mono)\ntypst`compile input.typ output.pdf`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.detach","page":"Commands","title":"Base.detach","text":"detach(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> detach(typst`help`)\ntypst`help`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.eltype","page":"Commands","title":"Base.eltype","text":"eltype(::Type{TypstCommand})\n\nSee also TypstCommand.\n\nExamples\n\njulia> eltype(TypstCommand)\nString\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.firstindex","page":"Commands","title":"Base.firstindex","text":"firstindex(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> firstindex(typst`help`)\n1\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.getindex","page":"Commands","title":"Base.getindex","text":"getindex(::TypstCommand, i)\n\nSee also TypstCommand.\n\nExamples\n\njulia> typst`help`[2]\n\"help\"\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.hash","page":"Commands","title":"Base.hash","text":"hash(::TypstCommand, ::UInt)\n\nSee also TypstCommand.\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.ignorestatus","page":"Commands","title":"Base.ignorestatus","text":"ignorestatus(::TypstCommand)\n\nReturn a TypstCommand that does not throw a TypstError if the Typst compiler throws an error.\n\nErrors thrown by the Typst compiler are printed to stderr regardless.\n\nExamples\n\njulia> ignorestatus(typst`help`)\ntypst`help`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.iterate-Tuple{TypstCommand}","page":"Commands","title":"Base.iterate","text":"iterate(::TypstCommand)\niterate(::TypstCommand, i)\n\nSee also TypstCommand.\n\nExamples\n\njulia> iterate(typst`help`, 2)\n(\"help\", 3)\n\njulia> iterate(typst`help`, 3)\n\n\n\n\n\n","category":"method"},{"location":"manual/commands/#Base.keys","page":"Commands","title":"Base.keys","text":"keys(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> keys(typst`help`)\n2-element LinearIndices{1, Tuple{Base.OneTo{Int64}}}:\n 1\n 2\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.lastindex","page":"Commands","title":"Base.lastindex","text":"lastindex(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> lastindex(typst`help`)\n2\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.length","page":"Commands","title":"Base.length","text":"length(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> length(typst`help`)\n2\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.run","page":"Commands","title":"Base.run","text":"run(::TypstCommand, args...; kwargs...)\n\nSee also TypstCommand.\n\ninfo: Info\nIf the Typst compiler throws an error, it will be printed to stderr. Then, a Julia TypstError will be thrown unless the ignorestatus flag is set.\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.setcpuaffinity","page":"Commands","title":"Base.setcpuaffinity","text":"setcpuaffinity(::TypstCommand, cpus)\n\nSee also TypstCommand.\n\ncompat: Compat\nRequires at least Julia v0.8.\n\nExamples\n\njulia> setcpuaffinity(typst`help`, nothing)\ntypst`help`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.setenv","page":"Commands","title":"Base.setenv","text":"setenv(::TypstCommand, args...; kwargs...)\n\nSee also TypstCommand and julia_mono.\n\nExamples\n\njulia> setenv(typst`compile input.typ output.pdf`, \"TYPST_FONT_PATHS\" => julia_mono)\ntypst`compile input.typ output.pdf`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.show-Tuple{IO, MIME{Symbol(\"text/plain\")}, TypstCommand}","page":"Commands","title":"Base.show","text":"show(::IO, ::MIME\"text/plain\", ::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> show(stdout, \"text/plain\", typst`help`)\ntypst`help`\n\n\n\n\n\n","category":"method"},{"location":"manual/commands/#Base.showerror","page":"Commands","title":"Base.showerror","text":"showerror(::IO, ::TypstError)\n\nPrint a TypstError when failing to run a TypstCommand.\n\nExamples\n\njulia> showerror(stdout, TypstError(typst``))\nTypstError: failed to `run` a `TypstCommand([\"\"]))`\n\n\n\n\n\n","category":"function"}] +[{"location":"manual/internals/#Internals","page":"Internals","title":"Internals","text":"","category":"section"},{"location":"manual/internals/","page":"Internals","title":"Internals","text":"Typstry.@stable_disable\nTypstry.workload","category":"page"},{"location":"manual/internals/#Typstry.@stable_disable","page":"Internals","title":"Typstry.@stable_disable","text":"@stable_disable(x)\n\nEquivalent to DispatchDoctor.@stable default_mode = \"disable\" x.\n\n\n\n\n\n","category":"macro"},{"location":"manual/internals/#Typstry.workload","page":"Internals","title":"Typstry.workload","text":"workload(examples)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Strings","page":"Internals","title":"Strings","text":"","category":"section"},{"location":"manual/internals/","page":"Internals","title":"Internals","text":"Typstry.examples\nTypstry.preamble\nTypstry.typst_mime\nTypstry.backticks\nTypstry.block\nTypstry.code_mode\nTypstry.depth\nTypstry.enclose\nTypstry.format\nTypstry.indent\nTypstry.join_with\nTypstry.math_mode\nTypstry.math_pad\nTypstry.maybe_wrap\nTypstry.mode\nTypstry.parenthesize\nTypstry.print_parameters\nTypstry.show_array\nTypstry.show_raw\nTypstry.show_vector\nTypstry.static_parse","category":"page"},{"location":"manual/internals/#Typstry.examples","page":"Internals","title":"Typstry.examples","text":"examples\n\nA constant Vector of Julia values and their corresponding Types implemented for show_typst.\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.preamble","page":"Internals","title":"Typstry.preamble","text":"preamble\n\nA constant used at the beginning of Typst source files generated by show(::IO, ::Union{MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"}, ::TypstString).\n\nExamples\n\njulia> println(Typstry.preamble)\n#set page(margin: 1em, height: auto, width: auto, fill: white)\n#set text(16pt, font: \"JuliaMono\")\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.typst_mime","page":"Internals","title":"Typstry.typst_mime","text":"typst_mime\n\nExamples\n\njulia> Typstry.typst_mime\nMIME type text/typst\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.backticks","page":"Internals","title":"Typstry.backticks","text":"backticks(io)\n\nReturn to io[:backticks]::Int.\n\nExamples\n\njulia> Typstry.backticks(IOContext(stdout, :backticks => 3))\n3\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.block","page":"Internals","title":"Typstry.block","text":"block(io)\n\nReturn io[:block]::Bool.\n\nExamples\n\njulia> Typstry.block(IOContext(stdout, :block => true))\ntrue\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.code_mode","page":"Internals","title":"Typstry.code_mode","text":"code_mode(io)\n\nPrint the number sign, unless mode(io) == code.\n\nSee also Mode and mode.\n\nExamples\n\njulia> Typstry.code_mode(IOContext(stdout, :mode => code))\n\njulia> Typstry.code_mode(IOContext(stdout, :mode => markup))\n#\n\njulia> Typstry.code_mode(IOContext(stdout, :mode => math))\n#\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.depth","page":"Internals","title":"Typstry.depth","text":"depth(io)\n\nReturn io[:depth]::Int.\n\nExamples\n\njulia> Typstry.depth(IOContext(stdout, :depth => 0))\n0\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.enclose","page":"Internals","title":"Typstry.enclose","text":"enclose(f, io, x, left, right = reverse(left); kwargs...)\n\nCall f(io, x; kwargs...) between printing left and right, respectfully.\n\nExamples\n\njulia> Typstry.enclose((io, i; x) -> print(io, i, x), stdout, 1, \"\\$ \"; x = \"x\")\n$ 1x $\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.format","page":"Internals","title":"Typstry.format","text":"format(::Union{MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"})\n\nExamples\n\njulia> Typstry.format(MIME\"application/pdf\"())\n\"pdf\"\n\njulia> Typstry.format(MIME\"image/png\"())\n\"png\"\n\njulia> Typstry.format(MIME\"image/svg+xml\"())\n\"svg\"\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.indent","page":"Internals","title":"Typstry.indent","text":"indent(io)\n\nReturn \" \" ^ io[:tab_size]::Int.\n\nSee also TypstString.\n\nExamples\n\njulia> Typstry.indent(IOContext(stdout, :tab_size => 2))\n\" \"\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.join_with","page":"Internals","title":"Typstry.join_with","text":"join_with(f, io, xs, delimeter; kwargs...)\n\nSimilar to join, except printing with f(io, x; kwargs...).\n\nExamples\n\njulia> Typstry.join_with((io, i; x) -> print(io, -i, x), stdout, 1:4, \", \"; x = \"x\")\n-1x, -2x, -3x, -4x\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.math_mode","page":"Internals","title":"Typstry.math_mode","text":"math_mode(f, io, x; kwargs...)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.math_pad","page":"Internals","title":"Typstry.math_pad","text":"math_pad(io)\n\nReturn \"\", \"\\$\", or \"\\$ \" depending on the block and mode settings.\n\nExamples\n\njulia> Typstry.math_pad(IOContext(stdout, :mode => math))\n\"\"\n\njulia> Typstry.math_pad(IOContext(stdout, :block => true, :mode => markup))\n\"\\$ \"\n\njulia> Typstry.math_pad(IOContext(stdout, :block => false, :mode => markup))\n\"\\$\"\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.maybe_wrap","page":"Internals","title":"Typstry.maybe_wrap","text":"maybe_wrap(::Any)\n\nWrap the value in Typst unless it is a TypstString or TypstText.\n\nExamples\n\njulia> Typstry.maybe_wrap(1)\nTypst{Int64}(1)\n\njulia> Typstry.maybe_wrap(TypstString(1))\ntypst\"$1$\"\n\njulia> Typstry.maybe_wrap(TypstText(1))\nTypstText{Int64}(1)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.mode","page":"Internals","title":"Typstry.mode","text":"mode(io)\n\nReturn io[:mode]::Mode.\n\nSee also Mode.\n\nExamples\n\njulia> Typstry.mode(IOContext(stdout, :mode => code))\ncode::Mode = 0\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.parenthesize","page":"Internals","title":"Typstry.parenthesize","text":"parenthesize(io)\n\nReturn io[:parenthesize]::Bool.\n\nExamples\n\njulia> Typstry.parenthesize(IOContext(stdout, :parenthesize => true))\ntrue\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.print_parameters","page":"Internals","title":"Typstry.print_parameters","text":"print_parameters(io, f, keys, final)\n\nExamples\n\njulia> Typstry.print_parameters(\n IOContext(stdout, :depth => 0, :tab_size => 2, :delim => typst\"\\\"(\\\"\"),\n \"vec\", [:delim, :gap], true)\nvec(\n delim: \"(\",\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.show_array","page":"Internals","title":"Typstry.show_array","text":"show_array(io, x)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.show_raw","page":"Internals","title":"Typstry.show_raw","text":"show_raw(f, io, x, language)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.show_vector","page":"Internals","title":"Typstry.show_vector","text":"show_vector(io, x)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Typstry.static_parse","page":"Internals","title":"Typstry.static_parse","text":"static_parse(args...; filename, kwargs...)\n\nCall Meta.parse with the filename if it is supported in the current Julia version (at least v1.10).\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Commands","page":"Internals","title":"Commands","text":"","category":"section"},{"location":"manual/internals/","page":"Internals","title":"Internals","text":"Typstry.typst_compiler\nTypstry.apply","category":"page"},{"location":"manual/internals/#Typstry.typst_compiler","page":"Internals","title":"Typstry.typst_compiler","text":"typst_compiler\n\nA constant Cmd that is the Typst compiler given by Typst_jll.jl with no additional parameters.\n\n\n\n\n\n","category":"constant"},{"location":"manual/internals/#Typstry.apply","page":"Internals","title":"Typstry.apply","text":"apply(f, tc, args...; kwargs...)\n\n\n\n\n\n","category":"function"},{"location":"manual/internals/#Extensions","page":"Internals","title":"Extensions","text":"","category":"section"},{"location":"manual/internals/#Dates","page":"Internals","title":"Dates","text":"","category":"section"},{"location":"tutorials/interface/#Interface","page":"Interface","title":"Interface","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"This tutorial illustrates the Julia to Typst interface.","category":"page"},{"location":"tutorials/interface/#Setup","page":"Interface","title":"Setup","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> import Base: show\n\njulia> import Typstry: context, show_typst\n\njulia> using Typstry","category":"page"},{"location":"tutorials/interface/#Implementation","page":"Interface","title":"Implementation","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Consider this custom type.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> struct Reciprocal{N <: Number}\n n::N\n end","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Implement a show_typst method to specify its Typst formatting. Remember to Annotate values taken from untyped locations.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> show_typst(io, r::Reciprocal) =\n if io[:mode]::Mode == markup\n print(io, \"#let reciprocal(n) = \\$1 / #n\\$\")\n else\n print(io, \"reciprocal(\")\n show(io, MIME\"text/typst\"(), Typst(round(r.n; digits = io[:digits]::Int)))\n print(io, \")\")\n end;","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Although custom formatting may be handled in show_typst with get(io, key, default), this may be repetitive when specifying defaults for multiple methods. There is also no way to tell if the value has been specified by the user or if it is a default. Instead, implement a custom context which overrides default, but not user specifications.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> context(::Reciprocal) = Dict(:digits => 2);","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Those two methods are a complete implementation of the Julia to Typst interface. The following method is optional:","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> show(io::IO, m::MIME\"text/typst\", r::Reciprocal) = show(io, m, Typst(r));","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Now, a Reciprocal is fully supported by Typstry.jl.","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> r = Reciprocal(π);\n\njulia> println(TypstString(r))\n#let reciprocal(n) = $1 / #n$\n\njulia> println(TypstString(r; mode = math))\nreciprocal(3.14)\n\njulia> println(TypstString(r; mode = math, digits = 4))\nreciprocal(3.1416)","category":"page"},{"location":"tutorials/interface/#Guidelines","page":"Interface","title":"Guidelines","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"While implementing the interface only requires two methods, it may be more challenging to determine how a Julia value should be represented in a Typst source file and its corresponding compiled document. Julia and Typst are distinct languages that differ in both syntax and semantics, so there may be multiple meaningful formats to choose from.","category":"page"},{"location":"tutorials/interface/#Make-the-obvious-choice,-if-available","page":"Interface","title":"Make the obvious choice, if available","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"There is a clear correspondence between these Julia and Typst values","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(1))\n$1$\n\njulia> println(TypstString(nothing))\n#none\n\njulia> println(TypstString(r\"[a-z]\"))\n#regex(\"[a-z]\")","category":"page"},{"location":"tutorials/interface/#Choose-the-most-semantically-rich-representation","page":"Interface","title":"Choose the most semantically rich representation","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"This may vary across Modes and domains\nSome modes may not have a meaningful representation, and should be formatted into a mode that does\nBoth Julia and Typst support Unicode characters, except unknown variables in Typst's code mode","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(π; mode = code))\n3.141592653589793\n\njulia> println(TypstString(π; mode = math))\nπ\n\njulia> println(TypstString(π; mode = markup))\n$π$","category":"page"},{"location":"tutorials/interface/#Consider-both-the-Typst-source-text-and-compiled-document-formatting","page":"Interface","title":"Consider both the Typst source text and compiled document formatting","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"A Docs.Text is documented to \"render [its value] as plain text\", and therefore corresponds to text in a rendered Typst document\nA TypstString represents Typst source text, and is printed directly","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(text\"[\\\"a\\\"]\"))\n[\"a\"]\n\njulia> println(TypstString(typst\"[\\\"a\\\"]\"))\n[\"a\"]","category":"page"},{"location":"tutorials/interface/#Try-to-generate-valid-Typst-source-text","page":"Interface","title":"Try to generate valid Typst source text","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"A TypstString represents Typst source text, which may be invalid\nA UnitRange{Int} is formatted differently for each Mode, but is always valid","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(1:4; mode = code))\nrange(1, 5)\n\njulia> println(TypstString(1:4; mode = math))\nvec(\n 1, 2, 3, 4\n)\n\njulia> println(TypstString(1:4; mode = markup))\n$vec(\n 1, 2, 3, 4\n)$","category":"page"},{"location":"tutorials/interface/#Test-for-edge-cases","page":"Interface","title":"Test for edge cases","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"#1 / 2 is valid Typst source text, but is parsed partially in code mode as (#1) / 2\n1 / 2 may be ambiguous in a math mode expression\n$1 / 2$ is not ambiguous in markup mode","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(1 // 2; mode = code))\n(1 / 2)\n\njulia> println(TypstString(1 // 2; mode = math))\n(1 / 2)\n\njulia> println(TypstString(1 // 2; mode = markup))\n$1 / 2$","category":"page"},{"location":"tutorials/interface/#Format-values-in-containers-using-show-with-the-text/typst-MIME-type","page":"Interface","title":"Format values in containers using show with the text/typst MIME type","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Values may require some of their context\nThe AbstractVector method changes its Mode to math and increments its depth","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString([true, 1, Any[1.2, 1 // 2]]))\n$vec(\n \"true\", 1, vec(\n 1.2, 1 / 2\n )\n)$","category":"page"},{"location":"tutorials/interface/#Check-parametric-and-abstract-types","page":"Interface","title":"Check parametric and abstract types","text":"","category":"section"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"Related Julia types may not be representable in the same Typst format","category":"page"},{"location":"tutorials/interface/","page":"Interface","title":"Interface","text":"julia> println(TypstString(0:2:6; mode = code))\nrange(0, 7, step: 2)\n\njulia> println(TypstString(0:2.0:6; mode = code))\n(0.0, 2.0, 4.0, 6.0)","category":"page"},{"location":"tutorials/interface/#Prefer-simplicity","page":"Interface","title":"Prefer simplicity","text":"","category":"section"},{"location":"manual/extensions/#extensions_extensions","page":"Extensions","title":"Extensions","text":"","category":"section"},{"location":"manual/extensions/#LaTeXStrings.jl","page":"Extensions","title":"LaTeXStrings.jl","text":"","category":"section"},{"location":"manual/extensions/","page":"Extensions","title":"Extensions","text":"show_typst(::Any, ::LaTeXStrings.LaTeXString)","category":"page"},{"location":"manual/extensions/#Typstry.show_typst-Tuple{Any, LaTeXString}","page":"Extensions","title":"Typstry.show_typst","text":"show_typst(io, ::LaTeXString)\n\nPrint in Typst format for LaTeXStrings.jl.\n\nType Settings Parameters\nLaTeXString :block, :depth, :mode, :tab_size \n\n\n\n\n\n","category":"method"},{"location":"manual/extensions/#Markdown.jl","page":"Extensions","title":"Markdown.jl","text":"","category":"section"},{"location":"manual/extensions/","page":"Extensions","title":"Extensions","text":"show_typst(::Any, ::Markdown.MD)","category":"page"},{"location":"manual/extensions/#Typstry.show_typst-Tuple{Any, MD}","page":"Extensions","title":"Typstry.show_typst","text":"show_typst(io, ::Markdown.MD)\n\nPrint in Typst format for Markdown.jl.\n\nType Settings Parameters\nMarkdown.MD :block, :depth, :mode, :tab_size \n\n\n\n\n\n","category":"method"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"DocTestSetup = :(using Typstry)","category":"page"},{"location":"getting_started/#Getting-Started","page":"Getting Started","title":"Getting Started","text":"","category":"section"},{"location":"getting_started/#Basics","page":"Getting Started","title":"Basics","text":"","category":"section"},{"location":"getting_started/#Strings","page":"Getting Started","title":"Strings","text":"","category":"section"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Print Julia values in Typst format using show with the text/typst MIME type.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> show(stdout, \"text/typst\", Typst(π))\n$π$","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Some methods use an IOContext to configure the formatting.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> show(IOContext(stdout, :mode => code), \"text/typst\", Typst(π))\n3.141592653589793","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Instead of printing, create a TypstString using its constructor or @typst_str with formatted interpolation.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> TypstString(π)\ntypst\"$π$\"\n\njulia> TypstString(π; mode = code)\ntypst\"3.141592653589793\"\n\njulia> typst\"$ \\(pi; mode = math) approx \\(pi; mode = code) $\"\ntypst\"$ π approx 3.141592653589793 $\"","category":"page"},{"location":"getting_started/#Commands","page":"Getting Started","title":"Commands","text":"","category":"section"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Use render to easily generate a Typst source file and compile it into a document.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> render(Any[true 1; 1.2 1 // 2]);","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"Compile source files by running a TypstCommand created using its constructor or @typst_cmd.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"julia> TypstCommand([\"help\"])\ntypst`help`\n\njulia> run(typst`compile input.typ output.pdf`);","category":"page"},{"location":"getting_started/#Examples","page":"Getting Started","title":"Examples","text":"","category":"section"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"These Typst documents were generated from Julia using show with the text/typst MIME type and compiled using a TypstCommand. Each row corresponds to a method of show_typst. Sequential documents correspond to package Extensions.","category":"page"},{"location":"getting_started/","page":"Getting Started","title":"Getting Started","text":"(Image: Typstry.jl examples) (Image: LaTeXStrings.jl examples) (Image: Markdown.jl examples)","category":"page"},{"location":"manual/strings/#Strings","page":"Strings","title":"Strings","text":"","category":"section"},{"location":"manual/strings/#Typstry","page":"Strings","title":"Typstry","text":"","category":"section"},{"location":"manual/strings/","page":"Strings","title":"Strings","text":"Mode\nTypst\nTypstString\nTypstText\n@typst_str\ncode\nmarkup\nmath\ncontext\nshow_typst(::Any, ::AbstractChar)","category":"page"},{"location":"manual/strings/#Typstry.Mode","page":"Strings","title":"Typstry.Mode","text":"Mode\n\nAn Enumerated type used to specify that the current Typst syntactical context is code, markup, or math.\n\njulia> Mode\nEnum Mode:\ncode = 0\nmarkup = 1\nmath = 2\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.Typst","page":"Strings","title":"Typstry.Typst","text":"Typst{T}\nTypst(::T)\n\nA wrapper used to pass values to show(::IO, ::MIME\"text/typst\", ::Typst).\n\njulia> Typst(1)\nTypst{Int64}(1)\n\njulia> Typst(\"a\")\nTypst{String}(\"a\")\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.TypstString","page":"Strings","title":"Typstry.TypstString","text":"TypstString <: AbstractString\nTypstString(::Any; context...)\n\nConvert the value to a Typst formatted string.\n\nOptional Julia settings and Typst parameters are passed to show(::IO, ::MIME\"text/typst\", ::Typst) in an IOContext. See also show_typst for a list of supported types.\n\ninfo: Info\nThis type implements the String interface. However, the interface is unspecified, which may result in unexpected behavior.\n\nExamples\n\njulia> TypstString(1)\ntypst\"$1$\"\n\njulia> TypstString(1 + 2im; mode = math)\ntypst\"(1 + 2i)\"\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.TypstText","page":"Strings","title":"Typstry.TypstText","text":"TypstText{T}\nTypstText(::Any)\n\nA wrapper whose show_typst method uses print.\n\ninfo: Info\nThis may be used to insert control characters into a TypstString. Unescaped control characters in TypstStrings may break formatting in some environments, such as the REPL.\n\nExamples\n\njulia> TypstText(1)\nTypstText{Int64}(1)\n\njulia> TypstText(\"a\")\nTypstText{String}(\"a\")\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Typstry.@typst_str","page":"Strings","title":"Typstry.@typst_str","text":"@typst_str(s)\ntypst\"s\"\n\nConstruct a TypstString.\n\nControl characters are escaped, except double quotation marks and backslashes in the same manner as @raw_str. Values may be interpolated by calling the TypstString constructor, except using a backslash instead of the type name.\n\ntip: Tip\nPrint directly to an IO using show(::IO, ::MIME\"text/typst\", ::Typst).See also the performance tip to Avoid string interpolation for I/O.\n\nExamples\n\njulia> x = 1;\n\njulia> typst\"$ \\(x; mode = math) / \\(x + 1; mode = math) $\"\ntypst\"$ 1 / 2 $\"\n\njulia> typst\"\\(x//2)\"\ntypst\"$1 / 2$\"\n\njulia> typst\"\\(x // 2; mode = math)\"\ntypst\"(1 / 2)\"\n\njulia> typst\"\\\\(x)\"\ntypst\"\\\\(x)\"\n\n\n\n\n\n","category":"macro"},{"location":"manual/strings/#Typstry.code","page":"Strings","title":"Typstry.code","text":"code\n\nA Typst syntactical Mode prefixed by the number sign.\n\nExamples\n\njulia> code\ncode::Mode = 0\n\n\n\n\n\n","category":"constant"},{"location":"manual/strings/#Typstry.markup","page":"Strings","title":"Typstry.markup","text":"markup\n\nA Typst syntactical Mode at the top-level of source text and enclosed within square brackets.\n\njulia> markup\nmarkup::Mode = 1\n\n\n\n\n\n","category":"constant"},{"location":"manual/strings/#Typstry.math","page":"Strings","title":"Typstry.math","text":"math\n\nA Typst syntactical Mode enclosed within dollar signs.\n\njulia> math\nmath::Mode = 2\n\n\n\n\n\n","category":"constant"},{"location":"manual/strings/#Typstry.context","page":"Strings","title":"Typstry.context","text":"context(x)\n\nProvide formatting data for show(::IO, ::MIME\"text/typst\", ::Typst).\n\nImplement this function for a custom type to specify its custom settings and parameters. Passing a value wrapped in Typst will merge! its custom context with defaults, such that the defaults may be overwritten. To be compatible with merging contexts and constructing an IOContext, methods must return an AbstractDict{Symbol}.\n\nKey Default Type Description\n:backticks 3 Int The number of backticks to enclose raw text markup, which may be increased to insert nested raw text.\n:block false Bool When :mode => math, specifies whether the enclosing dollar signs are padded with a space to render the element inline or its own block.\n:depth 0 Int The current level of nesting within container types to specify the degree of indentation.\n:mode markup Mode The current Typst syntactical context where code follows the number sign, markup is at the top-level and enclosed in square brackets, and math is enclosed in dollar signs.\n:parenthesize true Bool Whether to enclose some mathematical elements in parentheses to specify their operator precedence and avoid ambiguity.\n:tab_size 2 Int The number of spaces used by some elements with multi-line Typst formatting, which is repeated for each level of depth\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Typstry.show_typst-Tuple{Any, AbstractChar}","page":"Strings","title":"Typstry.show_typst","text":"show_typst(io, x)\n\nPrint in Typst format with Julia settings and Typst parameters provided by an IOContext.\n\nImplement this function for a custom type to specify its Typst formatting. Settings are used in Julia to format the TypstString. Parameters are passed to a function in the Typst source file and must be a TypstString with the same name as in Typst, except that dashes are replaced with underscores. Some settings, such as block, correspond with a parameter but may be used in Julia and have a different type.\n\nFor additional information on settings and parameters, see also context and the Typst Documentation, respectively.\n\ninfo: Info\nSome types, particularly containers, may call show(::IO, ::MIME\"text/typst\", ::Typst) to format a value, which may use additional settings and parameters.\n\nwarning: Warning\nThis function's methods are incomplete. Please file an issue or create a pull-request for missing methods.\n\nType Settings Parameters\nAbstractArray :block, :depth, :mode, :tab_size :delim,:gap`\nAbstractChar \nAbstractFloat :mode \nAbstractMatrix :block, :depth, :mode, :tab_size :augment, :columngap,:delim,:gap,:rowgap`\nAbstractString \nBool :mode \nComplex{Bool} :block, :mode, :parenthesize \nComplex :block, :mode, :parenthesize \nIrrational :mode \nNothing :mode \nOrdinalRange{<:Integer, <:Integer} :mode \nRational :block, :mode, :parenthesize \nRegex :mode \nSigned :mode \nStepRangeLen{<:Integer, <:Integer, <:Integer} :mode \nString :mode \nTuple :block, :depth, :mode, :tab_size :delim, :gap\nTypst \nTypstString \nTypstText :mode \nUnsigned :mode \nVersionNumber :mode \nDocs.HTML :block, :depth, :mode, :tab_size \nDocs.Text :mode \nDates.Date :mode, :indent \nDates.DateTime :mode, :indent \nDates.Day :mode, :indent \nDates.Hour :mode, :indent \nDates.Minute :mode, :indent \nDates.Second :mode, :indent \nDates.Time :mode, :indent \nDates.Week :mode, :indent \n\n```\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base","page":"Strings","title":"Base","text":"","category":"section"},{"location":"manual/strings/","page":"Strings","title":"Strings","text":"IOBuffer\ncodeunit\nisvalid\niterate(::TypstString)\nncodeunits\npointer\nrepr\nshow(::IO, ::TypstString)\nshow(::IO, ::MIME\"text/typst\", ::Typst)\nshow(::IO, ::Union{MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"}, ::TypstString)","category":"page"},{"location":"manual/strings/#Base.IOBuffer","page":"Strings","title":"Base.IOBuffer","text":"IOBuffer(::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> IOBuffer(typst\"a\")\nIOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=1, maxsize=Inf, ptr=1, mark=-1)\n\n\n\n\n\n","category":"type"},{"location":"manual/strings/#Base.codeunit","page":"Strings","title":"Base.codeunit","text":"codeunit(::TypstString)\ncodeunit(::TypstString, ::Integer)\n\nSee also TypstString.\n\nExamples\n\njulia> codeunit(typst\"a\")\nUInt8\n\njulia> codeunit(typst\"a\", 1)\n0x61\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.isvalid","page":"Strings","title":"Base.isvalid","text":"isvalid(::TypstString, ::Integer)\n\nSee also TypstString.\n\nExamples\n\njulia> isvalid(typst\"a\", 1)\ntrue\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.iterate-Tuple{TypstString}","page":"Strings","title":"Base.iterate","text":"iterate(::TypstString, ::Integer)\niterate(::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> iterate(typst\"a\")\n('a', 2)\n\njulia> iterate(typst\"a\", 1)\n('a', 2)\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base.ncodeunits","page":"Strings","title":"Base.ncodeunits","text":"ncodeunits(::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> ncodeunits(typst\"a\")\n1\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.pointer","page":"Strings","title":"Base.pointer","text":"pointer(::TypstString)\n\nSee also TypstString.\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.repr","page":"Strings","title":"Base.repr","text":"repr(::MIME, ::TypstString; kwargs...)\n\nSee also TypstString.\n\ninfo: Info\nThis method patches incorrect output from the assumption in repr that the parameter is already in the requested MIME type when the MIME type istextmime and the parameter is an AbstractString.\n\nExamples\n\njulia> repr(\"text/plain\", typst\"a\")\n\"typst\\\"a\\\"\"\n\njulia> repr(\"text/typst\", typst\"a\")\ntypst\"a\"\n\n\n\n\n\n","category":"function"},{"location":"manual/strings/#Base.show-Tuple{IO, TypstString}","page":"Strings","title":"Base.show","text":"show(::IO, ::TypstString)\n\nSee also TypstString.\n\nExamples\n\njulia> show(stdout, typst\"a\")\ntypst\"a\"\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base.show-Tuple{IO, MIME{Symbol(\"text/typst\")}, Typst}","page":"Strings","title":"Base.show","text":"show(::IO, ::MIME\"text/typst\", ::Union{Typst, TypstString, TypstText})\n\nPrint the Typst format.\n\nThis method provides formatting data to show_typst specified by a default and custom context.\n\nSee also TypstString and TypstText.\n\nExamples\n\njulia> show(stdout, \"text/typst\", typst\"a\")\na\n\njulia> show(stdout, \"text/typst\", Typst(\"a\"))\n\"a\"\n\njulia> show(stdout, \"text/typst\", Typst(Text(\"a\")))\na\n\n\n\n\n\n","category":"method"},{"location":"manual/strings/#Base.show-Tuple{IO, Union{MIME{Symbol(\"application/pdf\")}, MIME{Symbol(\"image/png\")}, MIME{Symbol(\"image/svg+xml\")}}, TypstString}","page":"Strings","title":"Base.show","text":"show(::IO, ::Union{\n MIME\"application/pdf\", MIME\"image/png\", MIME\"image/svg+xml\"\n}, ::TypstString)\n\nPrint the Portable Document Format (PDF), Portable Network Graphics (PNG), or Scalable Vector Graphics (SVG) format.\n\nThe preamble keyword parameter used by render may be specified in an IOContext.\n\nnote: Note\nEnvironments, such as Pluto.jl notebooks, may use these methods to display a TypstString.\n\n\n\n\n\n","category":"method"},{"location":"","page":"Home","title":"Home","text":"DocTestSetup = :(using Typstry)","category":"page"},{"location":"#Home","page":"Home","title":"Home","text":"","category":"section"},{"location":"#Introduction","page":"Home","title":"Introduction","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Typstry.jl is the interface to convert the computational power of Julia into beautifully formatted Typst documents.","category":"page"},{"location":"#What-is-Typst?","page":"Home","title":"What is Typst?","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Typst is an open-source and relatively new typesetting system (written in Rust 🦀🚀), designed to improve upon the performance and usability of LaTeX. See also the Typst repository and documentation for examples and how to get started.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"julia> using Pkg: add\n\njulia> add(\"Typstry\")\n\njulia> using Typstry","category":"page"},{"location":"#Showcase","page":"Home","title":"Showcase","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"julia> show_typst(IOContext(stdout, :mode => code), true)\ntrue\n\njulia> show(stdout, \"text/typst\", Typst([true 1; 1.0 [Any[true 1; 1.0 nothing]]]))\n$mat(\n \"true\", 1;\n 1.0, mat(\n \"true\", 1;\n 1.0, #none\n )\n)$\n\njulia> TypstString(1 // 2; block = true)\ntypst\"$ 1 / 2 $\"\n\njulia> typst\"$ \\(1 + 2im; mode = math) $\"\ntypst\"$ (1 + 2i) $\"\n\njulia> TypstCommand([\"help\"])\ntypst`help`\n\njulia> addenv(typst`compile input.typ output.pdf`, \"TYPST_FONT_PATHS\" => julia_mono)\ntypst`compile input.typ output.pdf`","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"#Strings","page":"Home","title":"Strings","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Print Julia values in Typst format\nSpecify Julia settings and Typst parameters\nImplement formatting for custom types\nConstruct Typst strings\nInterpolate formatted values\nRender in Pluto.jl notebooks","category":"page"},{"location":"#Commands","page":"Home","title":"Commands","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Construct Typst commands\nRender documents using the Typst compiler\nUse the JuliaMono typeface","category":"page"},{"location":"#Planned","page":"Home","title":"Planned","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Support rendering in more environments\nIJulia.jl\nQuarto?\nREPL Unicode?\nOther?\nDefault auto::Mode?\nAutomatically determine the Typst syntactic context\nUse a tree-sitter grammar or jll package\nDocumenter.jl backend and docstrings\nRequires Typst to output HTML\nImplement Typst formatting for more types\nBase\nAbstractDict\nAbstractIrrational\nAbstractSet\nEnum\nMode\nExpr\nSymbol\nPackage extensions\nStandard Library\nLinearAlgebra.jl\nA symbolic TypstFunction?\nMay faciliate Julia to Typst transpilation\nExamples\nTypstString(TypstFunction(eval, :(1//2); mode = code)) == typst\"eval(\"(1 / 2)\", mode: \\\"code\\\")\"\nTypstString(TypstFunction(*, :a, :b; mode = math)) == typst\"(a) (b)\"","category":"page"},{"location":"#Related-Packages","page":"Home","title":"Related Packages","text":"","category":"section"},{"location":"#Typst","page":"Home","title":"Typst","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Labelyst.jl\nSummaryTables.jl\nTypstGenerator.jl\nTypst_jll.jl\nDependency of Typstry.jl","category":"page"},{"location":"#LaTeX","page":"Home","title":"LaTeX","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Latexify.jl\nLaTeXStrings.jl\nLatexPrint.jl\nMakieTeX.jl\nDependent of Typstry.jl\nMathJaxRenderer.jl","category":"page"},{"location":"manual/commands/#Commands","page":"Commands","title":"Commands","text":"","category":"section"},{"location":"manual/commands/#Typstry","page":"Commands","title":"Typstry","text":"","category":"section"},{"location":"manual/commands/","page":"Commands","title":"Commands","text":"TypstCommand\nTypstError\n@typst_cmd\njulia_mono\nrender","category":"page"},{"location":"manual/commands/#Typstry.TypstCommand","page":"Commands","title":"Typstry.TypstCommand","text":"TypstCommand(::Vector{String})\nTypstCommand(::TypstCommand; kwargs...)\nTypstCommand(::TypstCommand, ignorestatus, flags, env, dir, cpus = nothing)\n\nThe Typst compiler.\n\ninfo: Info\nThis type implements the Cmd interface. However, the interface is unspecified, which may result in unexpected behavior.\n\nExamples\n\njulia> help = TypstCommand([\"help\"])\ntypst`help`\n\njulia> TypstCommand(help; ignorestatus = true)\ntypst`help`\n\n\n\n\n\n","category":"type"},{"location":"manual/commands/#Typstry.TypstError","page":"Commands","title":"Typstry.TypstError","text":"TypstError <: Exception\nTypstError(::TypstCommand)\n\nAn Exception indicating a failure to run a TypstCommand.\n\n\n\n\n\n","category":"type"},{"location":"manual/commands/#Typstry.@typst_cmd","page":"Commands","title":"Typstry.@typst_cmd","text":"@typst_cmd(s)\ntypst`s`\n\nConstruct a TypstCommand where each parameter is separated by a space.\n\nThis does not support interpolation; use the constructor instead.\n\nExamples\n\njulia> typst`help`\ntypst`help`\n\njulia> typst`compile input.typ output.typ`\ntypst`compile input.typ output.typ`\n\n\n\n\n\n","category":"macro"},{"location":"manual/commands/#Typstry.julia_mono","page":"Commands","title":"Typstry.julia_mono","text":"julia_mono\n\nAn constant artifact containing the JuliaMono typeface.\n\nUse with a TypstCommand and one of addenv, setenv, or the font-path Typst command-line option.\n\n\n\n\n\n","category":"constant"},{"location":"manual/commands/#Typstry.render","page":"Commands","title":"Typstry.render","text":"render(x;\n input = \"input.typ\",\n output = \"output.pdf\",\n open = true,\n preamble = \"\"\"\n #set page(margin: 1em, height: auto, width: auto, fill: white)\n #set text(16pt, font: \"JuliaMono\")\n \"\"\",\ncontext...)\n\nRender to a document using show(::IO, ::MIME\"text/typst\", ::Typst).\n\nThis generates two files: the input is the Typst source text and the output is the compiled document. The document format is inferred by the file extension of output, which may be pdf, png, or svg. The document may be automatically opened by the default viewer.\n\nExamples\n\njulia> render(Any[true 1; 1.2 1 // 2]);\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base","page":"Commands","title":"Base","text":"","category":"section"},{"location":"manual/commands/","page":"Commands","title":"Commands","text":"==\naddenv\ndetach\neltype\nfirstindex\ngetindex\nhash\nignorestatus\niterate(::TypstCommand)\nkeys\nlastindex\nlength\nrun\nsetcpuaffinity\nsetenv\nshow(::IO, ::MIME\"text/plain\", ::TypstCommand)\nshowerror","category":"page"},{"location":"manual/commands/#Base.:==","page":"Commands","title":"Base.:==","text":"==(::TypstCommand, ::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> help = typst`help`\ntypst`help`\n\njulia> help == help\ntrue\n\njulia> help == TypstCommand(help; ignorestatus = true)\nfalse\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.addenv","page":"Commands","title":"Base.addenv","text":"addenv(::TypstCommand, args...; kwargs...)\n\nSee also TypstCommand and julia_mono.\n\nExamples\n\njulia> addenv(typst`compile input.typ output.pdf`, \"TYPST_FONT_PATHS\" => julia_mono)\ntypst`compile input.typ output.pdf`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.detach","page":"Commands","title":"Base.detach","text":"detach(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> detach(typst`help`)\ntypst`help`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.eltype","page":"Commands","title":"Base.eltype","text":"eltype(::Type{TypstCommand})\n\nSee also TypstCommand.\n\nExamples\n\njulia> eltype(TypstCommand)\nString\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.firstindex","page":"Commands","title":"Base.firstindex","text":"firstindex(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> firstindex(typst`help`)\n1\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.getindex","page":"Commands","title":"Base.getindex","text":"getindex(::TypstCommand, i)\n\nSee also TypstCommand.\n\nExamples\n\njulia> typst`help`[2]\n\"help\"\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.hash","page":"Commands","title":"Base.hash","text":"hash(::TypstCommand, ::UInt)\n\nSee also TypstCommand.\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.ignorestatus","page":"Commands","title":"Base.ignorestatus","text":"ignorestatus(::TypstCommand)\n\nReturn a TypstCommand that does not throw a TypstError if the Typst compiler throws an error.\n\nErrors thrown by the Typst compiler are printed to stderr regardless.\n\nExamples\n\njulia> ignorestatus(typst`help`)\ntypst`help`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.iterate-Tuple{TypstCommand}","page":"Commands","title":"Base.iterate","text":"iterate(::TypstCommand)\niterate(::TypstCommand, i)\n\nSee also TypstCommand.\n\nExamples\n\njulia> iterate(typst`help`, 2)\n(\"help\", 3)\n\njulia> iterate(typst`help`, 3)\n\n\n\n\n\n","category":"method"},{"location":"manual/commands/#Base.keys","page":"Commands","title":"Base.keys","text":"keys(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> keys(typst`help`)\n2-element LinearIndices{1, Tuple{Base.OneTo{Int64}}}:\n 1\n 2\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.lastindex","page":"Commands","title":"Base.lastindex","text":"lastindex(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> lastindex(typst`help`)\n2\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.length","page":"Commands","title":"Base.length","text":"length(::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> length(typst`help`)\n2\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.run","page":"Commands","title":"Base.run","text":"run(::TypstCommand, args...; kwargs...)\n\nSee also TypstCommand.\n\ninfo: Info\nIf the Typst compiler throws an error, it will be printed to stderr. Then, a Julia TypstError will be thrown unless the ignorestatus flag is set.\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.setcpuaffinity","page":"Commands","title":"Base.setcpuaffinity","text":"setcpuaffinity(::TypstCommand, cpus)\n\nSee also TypstCommand.\n\ncompat: Compat\nRequires at least Julia v0.8.\n\nExamples\n\njulia> setcpuaffinity(typst`help`, nothing)\ntypst`help`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.setenv","page":"Commands","title":"Base.setenv","text":"setenv(::TypstCommand, args...; kwargs...)\n\nSee also TypstCommand and julia_mono.\n\nExamples\n\njulia> setenv(typst`compile input.typ output.pdf`, \"TYPST_FONT_PATHS\" => julia_mono)\ntypst`compile input.typ output.pdf`\n\n\n\n\n\n","category":"function"},{"location":"manual/commands/#Base.show-Tuple{IO, MIME{Symbol(\"text/plain\")}, TypstCommand}","page":"Commands","title":"Base.show","text":"show(::IO, ::MIME\"text/plain\", ::TypstCommand)\n\nSee also TypstCommand.\n\nExamples\n\njulia> show(stdout, \"text/plain\", typst`help`)\ntypst`help`\n\n\n\n\n\n","category":"method"},{"location":"manual/commands/#Base.showerror","page":"Commands","title":"Base.showerror","text":"showerror(::IO, ::TypstError)\n\nPrint a TypstError when failing to run a TypstCommand.\n\nExamples\n\njulia> showerror(stdout, TypstError(typst``))\nTypstError: failed to `run` a `TypstCommand([\"\"]))`\n\n\n\n\n\n","category":"function"}] } diff --git a/development/tutorials/interface/index.html b/development/tutorials/interface/index.html index 4f1ff83..76aad1d 100644 --- a/development/tutorials/interface/index.html +++ b/development/tutorials/interface/index.html @@ -5,7 +5,7 @@ julia> using Typstry

Implementation

Consider this custom type.

julia> struct Reciprocal{N <: Number}
            n::N
-       end

Implement a show_typst method to specify its Typst formatting. Remember to Annotate values taken from untyped locations.

julia> show_typst(io, r::Reciprocal) =
+       end

Implement a show_typst method to specify its Typst formatting. Remember to Annotate values taken from untyped locations.

julia> show_typst(io, r::Reciprocal) =
            if io[:mode]::Mode == markup
                print(io, "#let reciprocal(n) = \$1 / #n\$")
            else
@@ -66,4 +66,4 @@
 range(0, 7, step: 2)
 
 julia> println(TypstString(0:2.0:6; mode = code))
-(0.0, 2.0, 4.0, 6.0)

Prefer simplicity

+(0.0, 2.0, 4.0, 6.0)

Prefer simplicity