Skip to content

Commit

Permalink
Merge pull request #97 from siefkenj/katex2
Browse files Browse the repository at this point in the history
Version bump
  • Loading branch information
siefkenj authored May 14, 2024
2 parents 78ebb1b + bcde2fb commit 71439f0
Show file tree
Hide file tree
Showing 40 changed files with 2,554 additions and 1,445 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packages": ["packages/*"],
"version": "1.7.0"
"version": "1.7.1"
}
3,481 changes: 2,295 additions & 1,186 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"trailingComma": "es5"
},
"devDependencies": {
"@types/node": "^20.5.9",
"@types/node": "^20.12.12",
"@types/prettier": "^2.7.3",
"@types/shelljs": "^0.8.15",
"esbuild": "^0.19.2",
"esbuild": "^0.21.2",
"esbuild-runner": "^2.2.2",
"lerna": "^7.2.0",
"lerna": "^8.1.3",
"lerna-update-wizard": "^1.1.2",
"mdast-builder": "^1.1.1",
"mdast-util-inject": "^1.1.0",
Expand All @@ -44,24 +44,24 @@
"remark-gfm": "^3.0.1",
"remark-parse": "^10.0.2",
"remark-stringify": "^10.0.3",
"rimraf": "^5.0.5",
"rimraf": "^5.0.7",
"shx": "^0.3.4",
"ts-morph": "^19.0.0",
"typedoc": "^0.25.8",
"typescript": "^5.2.2",
"vite": "^5.1.3",
"vite-plugin-dts": "^3.7.2",
"vite-plugin-static-copy": "^1.0.1",
"vitest": "^0.34.3",
"ts-morph": "^22.0.0",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-plugin-dts": "^3.9.1",
"vite-plugin-static-copy": "^1.0.4",
"vitest": "^1.6.0",
"wireit": "^0.14.4"
},
"dependencies": {
"@types/color": "^3.0.4",
"@types/cssesc": "^3.0.0",
"@types/text-table": "^0.2.2",
"@types/color": "^3.0.6",
"@types/cssesc": "^3.0.2",
"@types/text-table": "^0.2.5",
"camelcase": "^8.0.0",
"chalk": "^5.3.0",
"chokidar": "^3.5.3",
"chokidar": "^3.6.0",
"color": "^4.2.3",
"cssesc": "^3.0.0",
"fault": "^2.0.1",
Expand All @@ -77,7 +77,7 @@
"unist-util-position": "^4.0.4",
"vfile-reporter-json": "^3.2.0",
"vfile-reporter-position": "^0.1.7",
"vfile-reporter-pretty": "^6.1.0"
"vfile-reporter-pretty": "^6.1.1"
},
"name": "unified-latex"
}
2 changes: 1 addition & 1 deletion packages/structured-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unified-latex/structured-clone",
"version": "1.7.0",
"version": "1.7.1",
"description": "A cheap (and not correct) structured-clone polyfill with types",
"main": "dist/index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/support-tables/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unified-latex/support-tables",
"version": "1.7.0",
"version": "1.7.1",
"description": "Lists of special data needed for the internals of unified-latex",
"type": "module",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/unified-latex-builder/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@unified-latex/unified-latex-builder",
"version": "1.7.0",
"version": "1.7.1",
"description": "Tools for constructing unified-latex ASTs",
"main": "dist/index.js",
"type": "module",
"dependencies": {
"@unified-latex/unified-latex-types": "^1.7.0"
"@unified-latex/unified-latex-types": "^1.7.1"
},
"files": [
"dist/**/*.ts",
Expand Down
22 changes: 11 additions & 11 deletions packages/unified-latex-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unified-latex/unified-latex-cli",
"version": "1.7.0",
"version": "1.7.1",
"description": "Command line interface to common unified-latex options",
"main": "dist/index.js",
"type": "module",
Expand All @@ -9,16 +9,16 @@
},
"dependencies": {
"@types/hast": "^2.3.9",
"@unified-latex/unified-latex-lint": "^1.7.0",
"@unified-latex/unified-latex-to-hast": "^1.7.0",
"@unified-latex/unified-latex-to-mdast": "^1.7.0",
"@unified-latex/unified-latex-types": "^1.7.0",
"@unified-latex/unified-latex-util-arguments": "^1.7.0",
"@unified-latex/unified-latex-util-macros": "^1.7.0",
"@unified-latex/unified-latex-util-packages": "^1.7.0",
"@unified-latex/unified-latex-util-parse": "^1.7.0",
"@unified-latex/unified-latex-util-print-raw": "^1.7.0",
"@unified-latex/unified-latex-util-to-string": "^1.7.0",
"@unified-latex/unified-latex-lint": "^1.7.1",
"@unified-latex/unified-latex-to-hast": "^1.7.1",
"@unified-latex/unified-latex-to-mdast": "^1.7.1",
"@unified-latex/unified-latex-types": "^1.7.1",
"@unified-latex/unified-latex-util-arguments": "^1.7.1",
"@unified-latex/unified-latex-util-macros": "^1.7.1",
"@unified-latex/unified-latex-util-packages": "^1.7.1",
"@unified-latex/unified-latex-util-parse": "^1.7.1",
"@unified-latex/unified-latex-util-print-raw": "^1.7.1",
"@unified-latex/unified-latex-util-to-string": "^1.7.1",
"camelcase": "^7.0.1",
"chalk": "^5.2.0",
"chokidar": "^3.5.3",
Expand Down
62 changes: 31 additions & 31 deletions packages/unified-latex-cli/tests/__snapshots__/cli.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`unified-latex-cli > can convert to html 1`] = `
"<h3 class=\\"starred\\">Really Cool Math</h3>
"<h3 class="starred">Really Cool Math</h3>
<p>Below you’ll find some really cool math.</p>
<p>Check it out!</p>
<ol class=\\"enumerate\\">
<li style=\\"list-style-type: &#x27;(a) &#x27;\\"><p>Hi there</p></li>
<ol class="enumerate">
<li style="list-style-type: &#x27;(a) &#x27;"><p>Hi there</p></li>
<li>
<p><span class=\\"inline-math\\">e^{2}</span> is math mode!</p>
<div class=\\"display-math\\">
\\\\begin{bmatrix}12&#x26;3^{e}\\\\\\\\ \\\\pi&#x26;0\\\\end{bmatrix}
<p><span class="inline-math">e^{2}</span> is math mode!</p>
<div class="display-math">
\\begin{bmatrix}12&#x26;3^{e}\\\\ \\pi&#x26;0\\end{bmatrix}
</div>
</li>
</ol>
Expand All @@ -28,68 +28,68 @@ Check it out!
2. $e^{2}$ is math mode!
\`\`\`math
\\\\begin{bmatrix}12&3^{e}\\\\\\\\ \\\\pi&0\\\\end{bmatrix}
\\begin{bmatrix}12&3^{e}\\\\ \\pi&0\\end{bmatrix}
\`\`\`
"
`;

exports[`unified-latex-cli > can expand macro 1`] = `
"% Expand via> tests/needs-expanding.tex --stats -e \\"\\\\\\\\newcommand{foo}[1]{FOO(#1)}\\" -e '{name: \\"bar\\", body: \\"baz\\"}'
"% Expand via> tests/needs-expanding.tex --stats -e "\\\\newcommand{foo}[1]{FOO(#1)}" -e '{name: "bar", body: "baz"}'
hi FOO(fooArg) and baz!
"
`;

exports[`unified-latex-cli > can expand macro 2`] = `
"% Expand via> tests/needs-expanding.tex --stats -e \\"\\\\\\\\newcommand{foo}[1]{FOO(#1)}\\" -e '{name: \\"bar\\", body: \\"baz\\"}'
hi $\\\\x fooArg$ and baz!
"% Expand via> tests/needs-expanding.tex --stats -e "\\\\newcommand{foo}[1]{FOO(#1)}" -e '{name: "bar", body: "baz"}'
hi $\\x fooArg$ and baz!
"
`;

exports[`unified-latex-cli > can expand macro 3`] = `
"% Expand via> tests/needs-expanding.tex --stats -e \\"\\\\\\\\newcommand{foo}[1]{FOO(#1)}\\" -e '{name: \\"bar\\", body: \\"baz\\"}'
"% Expand via> tests/needs-expanding.tex --stats -e "\\\\newcommand{foo}[1]{FOO(#1)}" -e '{name: "bar", body: "baz"}'
hi FOO(fooArg) and baz!
"
`;

exports[`unified-latex-cli > can expand macros defined in document 1`] = `
"\\\\newcommand{\\\\foo}[1]{$BAR #1$}
\\\\DeclareDocumentCommand{\\\\baz}{m}{\\\\foo{xxx} .#1.}
We $BAR ME$ and \\\\foo{xxx} .YOU.
"\\newcommand{\\foo}[1]{$BAR #1$}
\\DeclareDocumentCommand{\\baz}{m}{\\foo{xxx} .#1.}
We $BAR ME$ and \\foo{xxx} .YOU.
"
`;

exports[`unified-latex-cli > can format document 1`] = `
"\\\\section*{Really Cool Math}
Below you'll$x$ $x$ find some {\\\\bf really} cool {\\\\em math} {\\\\em foo}.
"\\section*{Really Cool Math}
Below you'll$x$ $x$ find some {\\bf really} cool {\\em math} {\\em foo}.
\\\\def\\\\foo{FOO}
\\def\\foo{FOO}
Check it out!
\\\\begin{enumerate}
\\\\item[(a)] Hi there $sin(x)$
\\\\item $e^{2}$ is math mode!
\\\\[
\\\\begin{bmatrix}
12 & 3^{e} \\\\\\\\
\\\\pi & 0
\\\\end{bmatrix}
\\\\]
\\\\end{enumerate}
\\begin{enumerate}
\\item[(a)] Hi there $sin(x)$
\\item $e^{2}$ is math mode!
\\[
\\begin{bmatrix}
12 & 3^{e} \\\\
\\pi & 0
\\end{bmatrix}
\\]
\\end{enumerate}
"
`;

exports[`unified-latex-cli > can override default macros 1`] = `
"$\\\\mathbb{X} Y$
"$\\mathbb{X} Y$
"
`;

exports[`unified-latex-cli > can override default macros 2`] = `
"$\\\\mathbb X Y$
"$\\mathbb X Y$
"
`;

exports[`unified-latex-cli > can override default macros 3`] = `
"$\\\\mathbb{X}{Y}$
"$\\mathbb{X}{Y}$
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@ exports[`unified-latex-doc-examples > example count-macros.ts 1`] = `
"Macro statistics:
All macros: {
textbf: [ '\\\\\\\\textbf{an}', '\\\\\\\\textbf{amazing}' ],
LaTeX: [ '\\\\\\\\LaTeX' ],
textit: [ '\\\\\\\\textit{some}', '\\\\\\\\textit{\\\\\\\\textbf{amazing}}' ],
'^': [ '^{x}', '^{\\\\\\\\infty}', '^{n}' ],
sum: [ '\\\\\\\\sum' ],
textbf: [ '\\\\textbf{an}', '\\\\textbf{amazing}' ],
LaTeX: [ '\\\\LaTeX' ],
textit: [ '\\\\textit{some}', '\\\\textit{\\\\textbf{amazing}}' ],
'^': [ '^{x}', '^{\\\\infty}', '^{n}' ],
sum: [ '\\\\sum' ],
_: [ '_{n=0}' ],
infty: [ '\\\\\\\\infty' ],
frac: [ '\\\\\\\\frac{x^{n}}{n!}' ]
infty: [ '\\\\infty' ],
frac: [ '\\\\frac{x^{n}}{n!}' ]
}
Math mode macros: [ '^', 'sum', '_', '^', 'infty', 'frac', '^' ]
"
`;

exports[`unified-latex-doc-examples > example custom-macros.ts 1`] = `
"\\\\textbf{custom} \\\\abc
\\\\textbf{custom} \\\\abc{macro}
\\\\textbf \\\\abc{macro}
"\\textbf{custom} \\abc
\\textbf{custom} \\abc{macro}
\\textbf \\abc{macro}
"
`;

exports[`unified-latex-doc-examples > example expanding-or-replacing-macros.ts 1`] = `
"\\\\newcommand{\\\\abc}[1]{ABC} My \\\\textbf{custom} \\\\abc{macro}.
My \\\\textbf{custom} ABC.
\\\\abc{fun} $x=ABC$
My \\\\textbf{custom} ABC.
My \\\\textbf{custom} ABC.
"\\newcommand{\\abc}[1]{ABC} My \\textbf{custom} \\abc{macro}.
My \\textbf{custom} ABC.
\\abc{fun} $x=ABC$
My \\textbf{custom} ABC.
My \\textbf{custom} ABC.
"
`;

exports[`unified-latex-doc-examples > example ignore-defaults.ts 1`] = `
"\\\\textbf \\\\abc
"\\textbf \\abc
^
\\\\color{blue} \\\\textbf {foo}
\\color{blue} \\textbf {foo}
"
`;

Expand Down Expand Up @@ -77,11 +77,11 @@ exports[`unified-latex-doc-examples > example using-unified.ts 1`] = `
}
]
}
This is \\\\emph{an} example of a \\\\LaTeX{} document with \\\\textit{some} macros.
\\\\[
e^{x} = \\\\sum_{n=0}^{\\\\infty}\\\\frac{x^{n}}{n!}.
\\\\]
What an \\\\textit{\\\\emph{amazing}} formula!
This is \\emph{an} example of a \\LaTeX{} document with \\textit{some} macros.
\\[
e^{x} = \\sum_{n=0}^{\\infty}\\frac{x^{n}}{n!}.
\\]
What an \\textit{\\emph{amazing}} formula!
{
type: 'macro',
content: 'emph',
Expand Down
30 changes: 15 additions & 15 deletions packages/unified-latex-ctan/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "@unified-latex/unified-latex-ctan",
"version": "1.7.0",
"version": "1.7.1",
"description": "unified-latex tools relating to specific CTAN packages",
"main": "dist/index.js",
"type": "module",
"dependencies": {
"@unified-latex/unified-latex-builder": "^1.7.0",
"@unified-latex/unified-latex-types": "^1.7.0",
"@unified-latex/unified-latex-util-argspec": "^1.7.0",
"@unified-latex/unified-latex-util-arguments": "^1.7.0",
"@unified-latex/unified-latex-util-comments": "^1.7.0",
"@unified-latex/unified-latex-util-match": "^1.7.0",
"@unified-latex/unified-latex-util-pegjs": "^1.7.0",
"@unified-latex/unified-latex-util-print-raw": "^1.7.0",
"@unified-latex/unified-latex-util-render-info": "^1.7.0",
"@unified-latex/unified-latex-util-replace": "^1.7.0",
"@unified-latex/unified-latex-util-scan": "^1.7.0",
"@unified-latex/unified-latex-util-split": "^1.7.0",
"@unified-latex/unified-latex-util-trim": "^1.7.0",
"@unified-latex/unified-latex-util-visit": "^1.7.0",
"@unified-latex/unified-latex-builder": "^1.7.1",
"@unified-latex/unified-latex-types": "^1.7.1",
"@unified-latex/unified-latex-util-argspec": "^1.7.1",
"@unified-latex/unified-latex-util-arguments": "^1.7.1",
"@unified-latex/unified-latex-util-comments": "^1.7.1",
"@unified-latex/unified-latex-util-match": "^1.7.1",
"@unified-latex/unified-latex-util-pegjs": "^1.7.1",
"@unified-latex/unified-latex-util-print-raw": "^1.7.1",
"@unified-latex/unified-latex-util-render-info": "^1.7.1",
"@unified-latex/unified-latex-util-replace": "^1.7.1",
"@unified-latex/unified-latex-util-scan": "^1.7.1",
"@unified-latex/unified-latex-util-split": "^1.7.1",
"@unified-latex/unified-latex-util-trim": "^1.7.1",
"@unified-latex/unified-latex-util-visit": "^1.7.1",
"color": "^4.2.3"
},
"files": [
Expand Down
24 changes: 12 additions & 12 deletions packages/unified-latex-lint/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@unified-latex/unified-latex-lint",
"version": "1.7.0",
"version": "1.7.1",
"description": "Lints for LaTex code via the unified-latex framework",
"main": "dist/index.js",
"type": "module",
"dependencies": {
"@unified-latex/unified-latex-builder": "^1.7.0",
"@unified-latex/unified-latex-ctan": "^1.7.0",
"@unified-latex/unified-latex-types": "^1.7.0",
"@unified-latex/unified-latex-util-glue": "^1.7.0",
"@unified-latex/unified-latex-util-match": "^1.7.0",
"@unified-latex/unified-latex-util-packages": "^1.7.0",
"@unified-latex/unified-latex-util-print-raw": "^1.7.0",
"@unified-latex/unified-latex-util-replace": "^1.7.0",
"@unified-latex/unified-latex-util-scan": "^1.7.0",
"@unified-latex/unified-latex-util-trim": "^1.7.0",
"@unified-latex/unified-latex-util-visit": "^1.7.0",
"@unified-latex/unified-latex-builder": "^1.7.1",
"@unified-latex/unified-latex-ctan": "^1.7.1",
"@unified-latex/unified-latex-types": "^1.7.1",
"@unified-latex/unified-latex-util-glue": "^1.7.1",
"@unified-latex/unified-latex-util-match": "^1.7.1",
"@unified-latex/unified-latex-util-packages": "^1.7.1",
"@unified-latex/unified-latex-util-print-raw": "^1.7.1",
"@unified-latex/unified-latex-util-replace": "^1.7.1",
"@unified-latex/unified-latex-util-scan": "^1.7.1",
"@unified-latex/unified-latex-util-trim": "^1.7.1",
"@unified-latex/unified-latex-util-visit": "^1.7.1",
"unified-lint-rule": "^2.1.2",
"unist-util-position": "^4.0.4"
},
Expand Down
Loading

0 comments on commit 71439f0

Please sign in to comment.