Skip to content

Additional TeX syntax support and direct web-compatible build outputs#11

Closed
thatcomputerguy0101 wants to merge 15 commits into
davidtranhq:mainfrom
thatcomputerguy0101:main
Closed

Additional TeX syntax support and direct web-compatible build outputs#11
thatcomputerguy0101 wants to merge 15 commits into
davidtranhq:mainfrom
thatcomputerguy0101:main

Conversation

@thatcomputerguy0101

Copy link
Copy Markdown
Contributor

This is a fairly major update adding many additional TeX features in addition to adding two more build targets. The updated README has documentation on all of the new user-facing features, whereas the below list touches on those briefly but adds some notes about the internals.

New TeX features:

  • Variable subscripts: a_b
  • Custom symbols used in multiple places, such as greek letter variables (\alpha), and certain operators.
  • Comparison operator support: \ne, <, \geq, etc...
  • Functions with custom bases: \sqrt[3]{x}, \log_3{y}

Other improvements:

  • Build scripts for, node outputs (CJS), web (ESM and browser), and all of the above added to package.json
  • ES6 module and global variable script utilizing Webpack (both work directly in a web browser)
  • Consistency improvements to parsing logic, such as with strings and symbols
  • MathJS updated to v10.6.4, where the typing logic of nodes was improved allowing for more specific types utilized here.
  • Formatting cleanup to reduce linter errors/warnings

@thatcomputerguy0101

thatcomputerguy0101 commented Jun 17, 2024

Copy link
Copy Markdown
Contributor Author

The build improvements in this PR cover a similar set of needs to #10, but using Webpack instead of Vite. Vite may be a better build system, so I'll split the parser changes in this PR apart from the build changes if that is accepted.

@thatcomputerguy0101

Copy link
Copy Markdown
Contributor Author

I also believe this set of changes should also be compatible with MathJS 11, but not MathJS 12.

@davidtranhq

Copy link
Copy Markdown
Owner

Thanks so much for all of this! It looks great. I've updated the dependencies from some previous PRs so that the project uses MathJS 12 now: if you still want it to be merged feel free to make those changes so that the tests pass again!

@thatcomputerguy0101

Copy link
Copy Markdown
Contributor Author

For the symbols test, do you prefer the unit test style of this PR, or the integration test style of #9? (Or both, but that seems excessive to me.)

This was referenced Jul 19, 2025
@thatcomputerguy0101

Copy link
Copy Markdown
Contributor Author

Superseded by #13 and #14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants