@mathlabs/tikra 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ % This is a preliminary version (2006-09-30), barring acceptance from
2
+ % the LaTeX Project Team and other feedback, of the GUST Font License.
3
+ % (GUST is the Polish TeX Users Group, http://www.gust.org.pl)
4
+ %
5
+ % For the most recent version of this license see
6
+ % http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
7
+ % or
8
+ % http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
9
+ %
10
+ % This work may be distributed and/or modified under the conditions
11
+ % of the LaTeX Project Public License, either version 1.3c of this
12
+ % license or (at your option) any later version.
13
+ %
14
+ % Please also observe the following clause:
15
+ % 1) it is requested, but not legally required, that derived works be
16
+ % distributed only after changing the names of the fonts comprising this
17
+ % work and given in an accompanying "manifest", and that the
18
+ % files comprising the Work, as listed in the manifest, also be given
19
+ % new names. Any exceptions to this request are also given in the
20
+ % manifest.
21
+ %
22
+ % We recommend the manifest be given in a separate file named
23
+ % MANIFEST-<fontid>.txt, where <fontid> is some unique identification
24
+ % of the font family. If a separate "readme" file accompanies the Work,
25
+ % we recommend a name of the form README-<fontid>.txt.
26
+ %
27
+ % The latest version of the LaTeX Project Public License is in
28
+ % http://www.latex-project.org/lppl.txt and version 1.3c or later
29
+ % is part of all distributions of LaTeX version 2006/05/20 or later.
30
+
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # @mathlabs/tikra
4
4
 
5
- TikZ and pgfplots figures to SVG and PNG, without a TeX install: no LaTeX, no fonts on the system, no external processes. Math in labels is typeset by [mathra](https://github.com/matheusmota-dev-br/mathra). **[Try it in the browser](https://matheusmota-dev-br.github.io/tikra/)**.
5
+ TikZ and pgfplots figures to SVG and PNG, without a TeX install: no LaTeX, no fonts on the system, no external processes. It reimplements TikZ, pgf and pgfplots, and labels are set by [mathra](https://github.com/matheusmota-dev-br/mathra) in Latin Modern, TeX's own Computer Modern. **[Try it in the browser](https://matheusmota-dev-br.github.io/tikra/)** · **[See the gallery](https://matheusmota-dev-br.github.io/tikra/gallery.html)**.
6
6
 
7
7
  ```sh
8
8
  npm install @mathlabs/tikra
@@ -10,12 +10,13 @@ npm install @mathlabs/tikra
10
10
 
11
11
  ## What it draws
12
12
 
13
- Every image below is an SVG written by tikra from a figure in the repository's corpus, on a white card.
13
+ Every image below is an SVG written by tikra from a figure in the repository's corpus, on a white card; the [gallery](https://matheusmota-dev-br.github.io/tikra/gallery.html) has all 227. Of the 2502 figures of the TikZ and pgfplots manuals, tikra draws 93.1% as TeX does (95.4% of the ones a converter can reproduce): [docs/conformance.md](https://github.com/matheusmota-dev-br/tikra/blob/main/docs/conformance.md).
14
14
 
15
15
  <table>
16
- <tr><td align="center"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/01-triangle-angles.svg" alt="Triangle with an angle arc and a height" width="380"><br><sub>Triangle with an angle arc and a height</sub></td><td align="center"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/03-unit-circle.svg" alt="Unit circle with polar points" width="380"><br><sub>Unit circle with polar points</sub></td></tr>
17
- <tr><td align="center"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/05-pgfplots-legend.svg" alt="pgfplots: expressions, marks and a legend" width="380"><br><sub>pgfplots: expressions, marks and a legend</sub></td><td align="center"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/07-flowchart.svg" alt="Flowchart with positioning" width="380"><br><sub>Flowchart with positioning</sub></td></tr>
18
- <tr><td align="center"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/11-spring-decorations.svg" alt="zigzag, snake and random steps" width="380"><br><sub>zigzag, snake and random steps</sub></td><td align="center"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/16-bar-chart.svg" alt="Bar chart from a foreach" width="380"><br><sub>Bar chart from a foreach</sub></td></tr>
16
+ <tr><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/plots-3d/lorenz-attractor.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/lorenz-attractor.svg" alt="The Lorenz attractor, colored by height" width="380"></a><br><sub>The Lorenz attractor, colored by height</sub></td><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/charts/nightingale-rose.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/nightingale-rose.svg" alt="Nightingale's rose of the causes of mortality" width="380"></a><br><sub>Nightingale's rose of the causes of mortality</sub></td></tr>
17
+ <tr><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/plots-2d/normal-distribution.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/normal-distribution.svg" alt="The bell curve and the 68–95–99.7 rule" width="380"></a><br><sub>The bell curve and the 68–95–99.7 rule</sub></td><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/diagrams/petersen-graph.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/petersen-graph.svg" alt="The Petersen graph" width="380"></a><br><sub>The Petersen graph</sub></td></tr>
18
+ <tr><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/science/feynman-diagram.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/feynman-diagram.svg" alt="A Feynman diagram, with decorations" width="380"></a><br><sub>A Feynman diagram, with decorations</sub></td><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/geometry/golden-spiral.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/golden-spiral.svg" alt="The golden spiral" width="380"></a><br><sub>The golden spiral</sub></td></tr>
19
+ <tr><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/nodes-and-text/periodic-table-corner.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/periodic-table-corner.svg" alt="The periodic table, by family" width="380"></a><br><sub>The periodic table, by family</sub></td><td align="center"><a href="https://github.com/matheusmota-dev-br/tikra/blob/main/corpus/plots-3d/surface-3d.tex"><img src="https://raw.githubusercontent.com/matheusmota-dev-br/tikra/main/docs/examples/surface-3d.svg" alt="A pgfplots surface and its colorbar" width="380"></a><br><sub>A pgfplots surface and its colorbar</sub></td></tr>
19
20
  </table>
20
21
 
21
22
  ## Node
@@ -67,7 +68,7 @@ Without a bundler, from a CDN:
67
68
 
68
69
  ## Warnings, not errors
69
70
 
70
- What tikra does not understand becomes a warning, and the figure is drawn with the rest: `\matrix`, `\pic`, unknown commands and options, TikZ escaped twice or for Markdown (undone), labels with broken LaTeX. The full subset is in [spec/subset.md](https://github.com/matheusmota-dev-br/tikra/blob/main/spec/subset.md).
71
+ What tikra does not understand becomes a warning, and the figure is drawn with the rest: unknown commands, environments and options, TikZ escaped twice or for Markdown (undone), labels with broken LaTeX. The full subset is in [spec/subset.md](https://github.com/matheusmota-dev-br/tikra/blob/main/spec/subset.md).
71
72
 
72
73
  ## Also for Python, Rust and the terminal
73
74
 
@@ -75,4 +76,4 @@ The same core is a Python module, a Rust crate and a command-line tool, and ever
75
76
 
76
77
  ## License
77
78
 
78
- The code is MIT or Apache-2.0; the STIX Two Math font embedded through mathra is under the SIL Open Font License 1.1.
79
+ The code is MIT or Apache-2.0; the fonts embedded through mathra are Latin Modern Math, under the GUST Font License, and STIX Two Math, under the SIL Open Font License 1.1.
package/package.json CHANGED
@@ -1,20 +1,48 @@
1
1
  {
2
2
  "name": "@mathlabs/tikra",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "TikZ and pgfplots figures to SVG and PNG, without a TeX install. Math labels typeset by mathra. Runs on WebAssembly in Node, bundlers and browsers.",
5
- "keywords": ["tikz", "pgfplots", "latex", "svg", "png", "figures", "diagrams", "plots", "webassembly", "rust", "python", "cli", "javascript", "typescript"],
5
+ "keywords": [
6
+ "tikz",
7
+ "pgfplots",
8
+ "latex",
9
+ "svg",
10
+ "png",
11
+ "figures",
12
+ "diagrams",
13
+ "plots",
14
+ "webassembly",
15
+ "rust",
16
+ "python",
17
+ "cli",
18
+ "javascript",
19
+ "typescript"
20
+ ],
6
21
  "homepage": "https://matheusmota-dev-br.github.io/tikra/",
7
- "repository": { "type": "git", "url": "git+https://github.com/matheusmota-dev-br/tikra.git", "directory": "npm" },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/matheusmota-dev-br/tikra.git",
25
+ "directory": "npm"
26
+ },
8
27
  "bugs": "https://github.com/matheusmota-dev-br/tikra/issues",
9
- "license": "(MIT OR Apache-2.0) AND OFL-1.1",
28
+ "license": "(MIT OR Apache-2.0) AND OFL-1.1 AND LicenseRef-GUST-Font-License",
10
29
  "type": "module",
11
30
  "exports": {
12
31
  ".": {
13
32
  "node": {
14
- "import": { "types": "./index.d.ts", "default": "./node/index.mjs" },
15
- "require": { "types": "./index.d.cts", "default": "./node/index.cjs" }
33
+ "import": {
34
+ "types": "./index.d.ts",
35
+ "default": "./node/index.mjs"
36
+ },
37
+ "require": {
38
+ "types": "./index.d.cts",
39
+ "default": "./node/index.cjs"
40
+ }
16
41
  },
17
- "default": { "types": "./index.d.ts", "default": "./web/index.js" }
42
+ "default": {
43
+ "types": "./index.d.ts",
44
+ "default": "./web/index.js"
45
+ }
18
46
  },
19
47
  "./tikra.wasm": "./tikra.wasm",
20
48
  "./package.json": "./package.json"
@@ -23,6 +51,18 @@
23
51
  "module": "./web/index.js",
24
52
  "types": "./index.d.ts",
25
53
  "sideEffects": false,
26
- "engines": { "node": ">=18" },
27
- "files": ["web", "node", "tikra.wasm", "index.d.ts", "index.d.cts", "LICENSE-MIT", "LICENSE-APACHE", "OFL-STIXTwoMath.txt"]
28
- }
54
+ "engines": {
55
+ "node": ">=18"
56
+ },
57
+ "files": [
58
+ "web",
59
+ "node",
60
+ "tikra.wasm",
61
+ "index.d.ts",
62
+ "index.d.cts",
63
+ "LICENSE-MIT",
64
+ "LICENSE-APACHE",
65
+ "OFL-STIXTwoMath.txt",
66
+ "GUST-FONT-LICENSE-LatinModernMath.txt"
67
+ ]
68
+ }
package/tikra.wasm CHANGED
Binary file