From 98ac77a22da7310d45c3e80bf6c4ad5e7849bb20 Mon Sep 17 00:00:00 2001 From: Johannes Wolf <519002+johannes-wolf@users.noreply.github.com> Date: Sat, 19 Oct 2024 14:41:39 +0200 Subject: [PATCH] Release 0.3.1 (#727) * release: 0.3.1 * canvas: Use Typst 12 std module --- CHANGES.md | 1 + README.md | 4 ++-- docs/getting-started.mdx | 2 +- docs/tutorials/karl.mdx | 2 +- gallery/karls-picture.png | Bin 72650 -> 72705 bytes gallery/karls-picture.typ | 2 +- gallery/tree.png | Bin 15467 -> 15525 bytes gallery/tree.typ | 2 +- gallery/waves.typ | 2 +- src/anchor.typ | 2 -- src/canvas.typ | 8 +++----- src/mark.typ | 2 -- src/util.typ | 7 +------ src/version.typ | 2 +- typst.toml | 2 +- 15 files changed, 14 insertions(+), 24 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 56f2a526f..ca1cf1fb5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ CeTZ 0.3.1 requires Typst 0.12.0. - Added a new `padding` parameter to the canvas element. - Some elements now support Typst 0.12.0 `fill-rule` style. +- Fixed an issue with reversed marks and `anchor: "center"`. # 0.3.0 diff --git a/README.md b/README.md index 3be0b1d55..5523cff27 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ For information, see the [online manual](https://cetz-package.github.io/docs). To use this package, simply add the following code to your document: ``` -#import "@preview/cetz:0.3.0" +#import "@preview/cetz:0.3.1" #cetz.canvas({ import cetz.draw: * @@ -59,7 +59,7 @@ just install The installed version can be imported by prefixing the package name with `@local`. ```typ -#import "@local/cetz:0.3.0" +#import "@local/cetz:0.3.1" #cetz.canvas({ import cetz.draw: * diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index 3c9c74ef0..2637abf70 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -8,7 +8,7 @@ sidebar_position: 1 This is the minimal starting point in a `.typ` file: ```typ -#import "@preview/cetz:0.3.0" +#import "@preview/cetz:0.3.1" #cetz.canvas({ import cetz.draw: * ... diff --git a/docs/tutorials/karl.mdx b/docs/tutorials/karl.mdx index 7170a411b..bfb9ce2ac 100644 --- a/docs/tutorials/karl.mdx +++ b/docs/tutorials/karl.mdx @@ -20,7 +20,7 @@ In CeTZ, to draw a picture, two imports and a function call is all you need. Kar ```typ #set page(width: auto, height: auto) -#import "@preview/cetz:0.3.0" +#import "@preview/cetz:0.3.1" We are working on #cetz.canvas({ diff --git a/gallery/karls-picture.png b/gallery/karls-picture.png index 1ffd596d5bc28cd76fee344f0369bad15014be1b..d943ccdfd9aff684e161e3091713fe51f943e4f5 100644 GIT binary patch delta 2155 zcmZXVZBSF$9mZ9xuBFIQU!tHyiY~4Q>1s7-2&q*|9Y@oxrEv#L+$wGz#?2xk$tK~j zpdj)RFm)XpAmg}}Dg)^*6^JDF8W4iKMMn`=AUA=KK!Uk>g}mI{+u-c(hxU9qpUye+ zf1cm-oc{LZUv(_6*}Amv+igiTdnwn|@t|#iRVPdS;z5HkyNz93_1$Ur6PYczE#oTd zHGgBV-sf{5z7N@R#=E>u)|WYW0#DL%bHjToj^iI$orTeo_p9Poho$MmypJQX-?FDO z*jFWts@Rk8D1yI5oQFC7o-9{Q4j&csIp8V+W0*P1kvsDz|{35jL!1@>6Aj%d)4$a>?=X4XgGOd*lQ6yAuqO zW7oE<*7@p@+uGo`cKTbfXs3i+6AM7o#KbAcdlbIXhSdI|Cz|B=@+P03@JUO6{wUdhd;Hg()g+^SridH7kLt%5`WUZFf1W9b zjug!t^nqys6aksX6mwMK3h{?d#J*w^?B)pv67Loexh;<@;Qh0bpm=RmrfMY9@iwGF z76^K>Jm{z-$`Z}Qlb|UYRDuTYpwkl!i;DMfRFIE9#Buv7q51-+=iSu(!vlG6=4iVs zqaExvH&!Su!->v2R3(+T!6aU3C&v&XW}hOznD~5A4)T8Q*VIp~7-Gm|Z&U@uE}}<~ zXMX+W&0o`Gc_YM0$-l965u^P2QG>bAW=<)@QWiBj0;)KHh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L9GGp-%4U)bFq$4&!tbmN_IKmDd30nL&VW5$G$I~i+kAW4M9kc!OQf_6@ zC-YSUqC=QjJah=^voi3?#=di1R;&=k-)C3l!~-I6kR(~hK=v~3{e0hXV%@1lVO7;n z9xypkC&$c{Jmwa~JgA%)zOv8s*KOd`HSjDZkYi8xvz_||d$o^`b^j{Xi1g>z&Wi;L z%43RnT=}`8l_cSVvOvt3f_9+W{|V^W4VJh4pEecq9`Xv+n6Np6e<9{cGXqfmdt_k% zfz9j}a>+;%yo}<1IokH80^IB-7gx!&FCOO4y3`Ny={WUduGeeR~e5j*wj?=JAyi0Xy;^I~gP_MZ3J-~IIT FzW~Dg^o0Nb diff --git a/gallery/karls-picture.typ b/gallery/karls-picture.typ index 9582c925c..cb740073f 100644 --- a/gallery/karls-picture.typ +++ b/gallery/karls-picture.typ @@ -1,4 +1,4 @@ -#import "@preview/cetz:0.3.0" +#import "@preview/cetz:0.3.1" #set page(width: auto, height: auto, margin: .5cm) #show math.equation: block.with(fill: white, inset: 1pt) diff --git a/gallery/tree.png b/gallery/tree.png index 9ce90a814fba97112cf2f5ebd0818804b623847e..b735c2223eaff250ac3702337b5def1761102c7c 100644 GIT binary patch delta 9512 zcmZ`gY5-~h3TSSO&OfQZCaEutb;AL2tGj!*@ShziJX9IA*^(MF_z zkiPOP6^bdP2nZx90-{2ymPv*%qoM?ekOY!@e*4^eqiw(b`j6k2CikARhqc#Qo37w% zAs5Yt`Df0){~=O&WNdlW-Mz_g_RRb1f84t>bL+uZHJ?(}NlOFIc+7YA>X+|NFt12n z{t$hgk}_*xVBn|hO>3Jq|FMX>>KL9NQD|ZoC6?QT^qJw)oQwMdE3vVvKG5){Mm3l( z9a<*o?vh;KQ|)|n>v&mbK}A==`0Oq4kgW?Q7nFt;7>H57hqxI1wyX3)W@hFcH+Nmo zGJE@$C)d_#ozyA3!C8{_ZIaV`+|Mty;Z%DCnN)iQj!UmRm+IJm{kJN0w}Lv**fg&3 zI9^lDN6Ym`c)!)|P>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-jj%F2I5bFbuL9se2n8gbf2tP z$HA2*Q<<_}Y8AIZVK-5NMA)63V!dz2N$6U8rA#lh^ynaD3Ykkfy-GCiW_~PN`rg@{ zVBmtxFEoucUXq^Zh4$p6Eca^x)Kz|{kwzT$=H{+^?9Z7xcpYyP8>HZ>lYGF_Iro6| z*_i1jiC=o`2I%UKpjSkde8J@c`YE<_Q3v zjJ8BAykj^dy8dFE!<|GIMf@U+LQG#hVKO}!Wf?zB^r`2#I3F*1(dMp=;2JMvL;4GI zQ-Mexn|7%ogG~5s3*ynUeJ3=S+j!rc$%DF@Axb%gLx^w_ZU*TBcJ>`?%e$flOz7QD ziGTo7@-f-@(BQ%^9zcYuUGQ42Ps5|hDWN3k{qy3dnA+%ewL1q0yrr^I!a%IUaYUi7nZQ>#f|0gfhhkMmGzb2frsky~*J zf+@`jFhik8{b&0bRk6Gztv8Jdj4G3JsF&Iv0pA1uLnj=Ih&l1mHv7cHMDj}{=T~qR z9E|f7;0u5YOD03%XQz-}pA{)BpglnwJn9i`P-w}q{b%FRY-3*rVip7%K#+vUYA{Mj zqp2dp1sJ6_yoDdyl3@@SJH+kcofyPgG272hfkGqWPIIk(24c_jgKB}EMEUli+~}tHUyekm{t8$0$c$GE5ImdP5cVEW7gx^9KMFzs7f9P9mYhl3-v6g%mGC$o$P`BV%w%~cP`3DXM;5q__KB!v& z-`hBKtbjOdf21NX^Htzc$ D{a{+L diff --git a/gallery/tree.typ b/gallery/tree.typ index dc9293262..e088e62a1 100644 --- a/gallery/tree.typ +++ b/gallery/tree.typ @@ -1,4 +1,4 @@ -#import "@preview/cetz:0.3.0": canvas, draw, tree +#import "@preview/cetz:0.3.1": canvas, draw, tree #set page(width: auto, height: auto, margin: .5cm) diff --git a/gallery/waves.typ b/gallery/waves.typ index 74daaab76..56b385ed6 100644 --- a/gallery/waves.typ +++ b/gallery/waves.typ @@ -1,4 +1,4 @@ -#import "@preview/cetz:0.3.0": canvas, draw, vector, matrix +#import "@preview/cetz:0.3.1": canvas, draw, vector, matrix #set page(width: auto, height: auto, margin: .5cm) diff --git a/src/anchor.typ b/src/anchor.typ index 9f25a475e..82f92edb2 100644 --- a/src/anchor.typ +++ b/src/anchor.typ @@ -2,8 +2,6 @@ #import deps.oxifmt: strfmt #import "util.typ" -#import util: typst-length - #import "intersection.typ" #import "drawable.typ" #import "path-util.typ" diff --git a/src/canvas.typ b/src/canvas.typ index cebefb64c..bb4ca9735 100644 --- a/src/canvas.typ +++ b/src/canvas.typ @@ -7,8 +7,6 @@ #import "process.typ" #import "version.typ" -#import util: typst-length - /// Sets up a canvas for drawing on. /// /// - length (length, ratio): Used to specify what 1 coordinate unit is. If given a ratio, that ratio is relative to the containing elements width! @@ -26,7 +24,7 @@ message: "Incorrect type for body: " + repr(type(body)), ) - assert(type(length) in (typst-length, ratio), message: "Expected `length` to be of type length or ratio, got " + repr(length)) + assert(type(length) in (std.length, ratio), message: "Expected `length` to be of type length or ratio, got " + repr(length)) let length = if type(length) == ratio { length * ly.width } else { @@ -120,7 +118,7 @@ vertices += pts } } - if type(drawable.stroke) == dictionary and "thickness" in drawable.stroke and type(drawable.stroke.thickness) != typst-length { + if type(drawable.stroke) == dictionary and "thickness" in drawable.stroke and type(drawable.stroke.thickness) != std.length { drawable.stroke.thickness *= length } path( @@ -131,7 +129,7 @@ ..vertices, ) } else if drawable.type == "content" { - let (width, height) = util.typst-measure(drawable.body) + let (width, height) = std.measure(drawable.body) move( dx: (drawable.pos.at(0) - bounds.low.at(0)) * length - width / 2, dy: (drawable.pos.at(1) - bounds.low.at(1)) * length - height / 2, diff --git a/src/mark.typ b/src/mark.typ index 78b25e1c0..97e960587 100644 --- a/src/mark.typ +++ b/src/mark.typ @@ -7,8 +7,6 @@ #import "mark-shapes.typ": get-mark #import "process.typ" -#import util: typst-length - /// Checks if a mark should be drawn according to the current style. /// - style (style): The current style. /// -> bool diff --git a/src/util.typ b/src/util.typ index 059fe32c9..2b4175f64 100644 --- a/src/util.typ +++ b/src/util.typ @@ -5,14 +5,9 @@ #import "vector.typ" #import "bezier.typ" - /// Constant to be used as float rounding error #let float-epsilon = 0.000001 -#let typst-measure = measure -#let typst-length = length - - /// Multiplies vectors by a transformation matrix. If multiple vectors are given they are returned as an array, if only one vector is given only one will be returned, if a dictionary is given they will be returned in the dictionary with the same keys. /// /// - transform (matrix,function): The $4 \times 4$ transformation matrix or a function that accepts and returns a vector. @@ -200,7 +195,7 @@ /// - cnt (content): The content to measure. /// -> vector #let measure(ctx, cnt) = { - let size = typst-measure(cnt) + let size = std.measure(cnt) return ( calc.abs(size.width / ctx.length), calc.abs(size.height / ctx.length) diff --git a/src/version.typ b/src/version.typ index 05d47a08b..f26df2280 100644 --- a/src/version.typ +++ b/src/version.typ @@ -1 +1 @@ -#let version = version(0,3,0) +#let version = version(0,3,1) diff --git a/typst.toml b/typst.toml index 9e9d875c5..c15208384 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "cetz" -version = "0.3.0" +version = "0.3.1" compiler = "0.12.0" repository = "https://github.com/cetz-package/cetz" homepage = "https://cetz-package.github.io/"