Skip to content

Commit 7a8837a

Browse files
Le-foucheurelegaanzsaecki
authored
vartable:0.2.3 (#3321)
Co-authored-by: Ana Gelez <[email protected]> Co-authored-by: Tobias Schmitz <[email protected]>
1 parent 10b99cb commit 7a8837a

File tree

7 files changed

+1984
-0
lines changed

7 files changed

+1984
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Le-foucheur
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# VarTable
2+
3+
An easy way to render variation table on typst, built on [Cetz](https://github.com/cetz-package/cetz)\
4+
The [documention](https://github.com/Le-foucheur/Typst-VarTable/blob/main/documentation.pdf) ( English version )\
5+
La [documention](https://github.com/Le-foucheur/Typst-VarTable/blob/main/documentationVF.pdf) ( Version française )
6+
7+
8+
```js
9+
#import "@preview/vartable:0.2.3": tabvar
10+
```
11+
# Few examples
12+
13+
### Trigonometric functions
14+
Turn this :
15+
```js
16+
#import "@preview/vartable:0.2.3": tabvar
17+
18+
#tabvar(
19+
20+
variable: $x$,
21+
label: (
22+
([sign of cos’], "s"),
23+
([variation of cos], "v"),
24+
([sign of sin’], "s"),
25+
([variation of sin], "v"),
26+
),
27+
28+
domain: ($0$, $ pi / 2 $, $ pi $, $ (2pi) / 3 $, $ 2 pi $),
29+
contents: (
30+
($-$, (), ("0",$+$), ()),
31+
(
32+
(top, $1$),
33+
(),
34+
(bottom, $-1$),
35+
(),
36+
(top, $1$),
37+
),
38+
($+$, $-$, (), $+$),
39+
(
40+
(center, $0$),
41+
(top, $1$),
42+
(),
43+
(bottom, $-1$),
44+
(center, $0$),
45+
),
46+
),
47+
values: (
48+
("arrow10.50%", $ $, $ 0 $, "f"),
49+
("arrow12.49%", $ $, $ 0 $, "f"),
50+
)
51+
)
52+
```
53+
Into this
54+
55+
![trigonometric function](./examples/trigonometricFunction.png)
56+
57+
### hyperbolic function $f(x) = 1/x $
58+
59+
```js
60+
#import "@preview/vartable:0.2.3": tabvar
61+
62+
#tabvar(
63+
arrow-mark: (end: ">", start: "|"),
64+
variable: $x$,
65+
label: (
66+
([sign of $f’$], "s"),
67+
([variation of $f$], "v"),
68+
),
69+
domain: ($ -oo $, $ 0 $, $ +oo $),
70+
contents: (
71+
($+$, ("||", $+$)),
72+
(
73+
(center, $0$),
74+
(bottom, top, "||", $ -oo $, $ +oo $),
75+
(center, $ 0 $),
76+
),
77+
),
78+
)
79+
```
80+
![hyperbolic function](./examples/hyperbolicFunction.png)
81+
82+
### A random function : $f(x) = \sqrt{x²-4}$ & $f'(x) = \frac {x} {\sqrt{x² - 4}}$
83+
84+
```js
85+
#import "@preview/Tabvar:0.2.3": tabvar, hatch
86+
87+
#tabvar(
88+
variable: $t$,
89+
label: (
90+
([Sign of $f’$], 1cm,"s"),
91+
([Variation of $f$], "v"),
92+
),
93+
hatching-style: hatch,
94+
domain: ($ -oo $,($ -2 $, 1cm),$ 2 $, $ +oo $),
95+
contents: (
96+
( $ - $, "|h|", $ + $),
97+
(
98+
(top, $ +oo $),
99+
(bottom,"|h", $ 0 $),
100+
(bottom, "H|", $ 0 $),
101+
(top, $ +oo $)
102+
)
103+
)
104+
)
105+
```
106+
107+
![random function](./examples/randomFunction.png)
108+
109+
## ·change log·
110+
111+
### 0.2.3
112+
- fix [issue #17](https://github.com/Le-foucheur/Typst-VarTable/issues/17)
113+
114+
#### 0.2.2 :
115+
- fix [issue #15](https://github.com/Le-foucheur/Typst-VarTable/issues/15)
116+
117+
#### 0:2:1 :
118+
- change "Variation" into "v"
119+
- change "Sign" into "s"
120+
- add the possibility to hatch some area
121+
- add the possibility to add some elements
122+
- can change the table dimension
123+
- support `Cetz 0.4.1`
124+
- bug fix
125+
126+
#### 0.2.0 :
127+
- **Require :** typst version >= 0.13.0
128+
- Now bluid on `Cetz 0.3.4` insted of fletcher
129+
- rename stroke to table-style and now take the Cetz style type
130+
- rename stroke-arrow to arrow-style and now take the Cetz style type
131+
- rename arrow to arrow-mark and now take the Cetz mark type
132+
- rename marks-line to line-style and now take the Cetz style type
133+
- fix the bug (that was present on this readme)
134+
135+
#### 0.1.2 :
136+
- Support `fletcher 0.5.2`
137+
138+
#### 0.1.1 :
139+
- added customisation of separator bars between signs
140+
141+
##### 0.1.0 :
142+
- publishing the package
13.7 KB
Loading
58.2 KB
Loading
18.9 KB
Loading

0 commit comments

Comments
 (0)