diff --git a/README.md b/README.md index a931f5fd0..3be0b1d55 100644 --- a/README.md +++ b/README.md @@ -24,39 +24,18 @@ CeTZ (CeTZ, ein Typst Zeichenpaket) is a library for drawing with [Typst](https: Karl's Picture Tree Layout Waves - - - - - - - - - - - - - - - - - - Pie Chart - Plot - Clustered Barchart - *Click on the example image to jump to the code.* ## Usage -For information, see the [manual](https://github.com/cetz-package/cetz/blob/v0.2.2/manual.pdf?raw=true) for the current version. Future versions will use the new documentation website: https://cetz-package.github.io/docs +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.2.2" +#import "@preview/cetz:0.3.0" #cetz.canvas({ import cetz.draw: * @@ -80,7 +59,7 @@ just install The installed version can be imported by prefixing the package name with `@local`. ```typ -#import "@local/cetz:0.2.2" +#import "@local/cetz:0.3.0" #cetz.canvas({ import cetz.draw: * diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index 474fedab1..3c9c74ef0 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.2.2" +#import "@preview/cetz:0.3.0" #cetz.canvas({ import cetz.draw: * ... diff --git a/docs/overview.md b/docs/overview.md index 2e0c5a0d7..de0563fa5 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -9,6 +9,4 @@ CeTZ, ein Typst Zeichenpaket, is a drawing package for [Typst](https://typst.app These docs are a work in progress! Please submit issues for parts that don't make sense or need improving :) -THE LINK TO THE EXISTING STABLE MANUAL IS [HERE](https://raw.githubusercontent.com/cetz-package/cetz/stable/manual.pdf) - We are also still trying to find a logo for CeTZ so if you have any ideas please let us know through the Typst discord server. diff --git a/docs/tutorials/karl.mdx b/docs/tutorials/karl.mdx index c8e124d7b..7170a411b 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.2.2" +#import "@preview/cetz:0.3.0" We are working on #cetz.canvas({ diff --git a/gallery/barchart.png b/gallery/barchart.png deleted file mode 100644 index d72c7838e..000000000 Binary files a/gallery/barchart.png and /dev/null differ diff --git a/gallery/barchart.typ b/gallery/barchart.typ deleted file mode 100644 index bcc517922..000000000 --- a/gallery/barchart.typ +++ /dev/null @@ -1,26 +0,0 @@ -#import "@preview/cetz:0.2.2": canvas, chart, draw -#import "@preview/cetz-plot:0.1.0": chart - -#set page(width: auto, height: auto, margin: .5cm) - -#let data2 = ( - ([15-24], 18.0, 20.1, 23.0, 17.0), - ([25-29], 16.3, 17.6, 19.4, 15.3), - ([30-34], 14.0, 15.3, 13.9, 18.7), - ([35-44], 35.5, 26.5, 29.4, 25.8), - ([45-54], 25.0, 20.6, 22.4, 22.0), - ([55+], 19.9, 18.2, 19.2, 16.4), -) - -#canvas({ - draw.set-style(legend: (fill: white)) - chart.barchart(mode: "clustered", - size: (9, auto), - label-key: 0, - value-key: (..range(1, 5)), - bar-width: .8, - x-tick-step: 2.5, - data2, - labels: ([Low], [Medium], [High], [Very high]), - legend: "legend.inner-north-east",) -}) diff --git a/gallery/karls-picture.typ b/gallery/karls-picture.typ index 23943585f..9582c925c 100644 --- a/gallery/karls-picture.typ +++ b/gallery/karls-picture.typ @@ -1,5 +1,4 @@ -#import "@preview/cetz:0.2.2" - +#import "@preview/cetz:0.3.0" #set page(width: auto, height: auto, margin: .5cm) #show math.equation: block.with(fill: white, inset: 1pt) diff --git a/gallery/pie-chart.png b/gallery/pie-chart.png deleted file mode 100644 index 721f27aa1..000000000 Binary files a/gallery/pie-chart.png and /dev/null differ diff --git a/gallery/pie-chart.typ b/gallery/pie-chart.typ deleted file mode 100644 index ef2e67880..000000000 --- a/gallery/pie-chart.typ +++ /dev/null @@ -1,35 +0,0 @@ -#import "@preview/cetz:0.2.2" -#import "@preview/cetz-plot:0.1.0": chart - -#set page(width: auto, height: auto, margin: .5cm) - -#let data = ( - ([Belgium], 24), - ([Germany], 31), - ([Greece], 18), - ([Spain], 21), - ([France], 23), - ([Hungary], 18), - ([Netherlands], 27), - ([Romania], 17), - ([Finland], 26), - ([Turkey], 13), -) - -#cetz.canvas({ - import cetz.chart - import cetz.draw: * - - let colors = gradient.linear(red, blue, green, yellow) - - chart.piechart( - data, - value-key: 1, - label-key: 0, - radius: 4, - slice-style: colors, - inner-radius: 1, - outset: 3, - inner-label: (content: (value, label) => [#text(white, str(value))], radius: 110%), - outer-label: (content: "%", radius: 110%)) -}) diff --git a/gallery/plot.png b/gallery/plot.png deleted file mode 100644 index 20b2408f5..000000000 Binary files a/gallery/plot.png and /dev/null differ diff --git a/gallery/plot.typ b/gallery/plot.typ deleted file mode 100644 index 702e127cd..000000000 --- a/gallery/plot.typ +++ /dev/null @@ -1,26 +0,0 @@ -#import "@preview/cetz:0.2.2": canvas -#import "@preview/cetz-plot:0.1.0": plot - -#set page(width: auto, height: auto, margin: .5cm) - -#let style = (stroke: black, fill: rgb(0, 0, 200, 75)) - -#canvas(length: 1cm, { - plot.plot(size: (8, 6), - x-tick-step: none, - x-ticks: ((-calc.pi, $-pi$), (0, $0$), (calc.pi, $pi$)), - y-tick-step: 1, - { - plot.add( - style: style, - domain: (-calc.pi, calc.pi), calc.sin) - plot.add( - hypograph: true, - style: style, - domain: (-calc.pi, calc.pi), calc.cos) - plot.add( - hypograph: true, - style: style, - domain: (-calc.pi, calc.pi), x => calc.cos(x + calc.pi)) - }) -}) diff --git a/gallery/tree.typ b/gallery/tree.typ index 91c6f7eba..dc9293262 100644 --- a/gallery/tree.typ +++ b/gallery/tree.typ @@ -1,4 +1,4 @@ -#import "@preview/cetz:0.2.2": canvas, draw, tree +#import "@preview/cetz:0.3.0": canvas, draw, tree #set page(width: auto, height: auto, margin: .5cm) diff --git a/gallery/waves.typ b/gallery/waves.typ index 0833d62c6..74daaab76 100644 --- a/gallery/waves.typ +++ b/gallery/waves.typ @@ -1,4 +1,4 @@ -#import "@preview/cetz:0.2.2": canvas, draw, vector, matrix +#import "@preview/cetz:0.3.0": canvas, draw, vector, matrix #set page(width: auto, height: auto, margin: .5cm) diff --git a/src/version.typ b/src/version.typ index 7be8084a5..05d47a08b 100644 --- a/src/version.typ +++ b/src/version.typ @@ -1 +1 @@ -#let version = version(0,2,2) +#let version = version(0,3,0) diff --git a/typst.toml b/typst.toml index 548d7f931..138e87310 100644 --- a/typst.toml +++ b/typst.toml @@ -1,8 +1,9 @@ [package] name = "cetz" -version = "0.2.2" +version = "0.3.0" compiler = "0.11.0" repository = "https://github.com/cetz-package/cetz" +homepage = "https://cetz-package.github.io/" entrypoint = "src/lib.typ" authors = [ "Johannes Wolf ", @@ -11,5 +12,5 @@ authors = [ categories = [ "visualization" ] license = "LGPL-3.0-or-later" description = "Drawing with Typst made easy, providing an API inspired by TikZ and Processing. Includes modules for plotting, charts and tree layout." -keywords = [ "draw", "canvas", "plot", "chart", "tree" ] +keywords = [ "draw", "canvas", "tree" ] exclude = [ "/gallery/*", "manual.pdf", "manual.typ" ]