Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sagebind/mathpad
Interactive scratchpad calculator for VS Code
https://github.com/sagebind/mathpad
calculator math-expressions visual-studio-code vscode vscode-extension
Last synced: about 2 months ago
JSON representation
Interactive scratchpad calculator for VS Code
- Host: GitHub
- URL: https://github.com/sagebind/mathpad
- Owner: sagebind
- License: mit
- Created: 2020-05-01T23:35:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T15:41:00.000Z (almost 2 years ago)
- Last Synced: 2024-12-24T16:02:47.818Z (about 2 months ago)
- Topics: calculator, math-expressions, visual-studio-code, vscode, vscode-extension
- Language: TypeScript
- Size: 61.5 KB
- Stars: 21
- Watchers: 4
- Forks: 6
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Mathpad
Mathpad is a small extension for [Visual Studio Code] that turns a Markdown editor into an interactive scratchpad calculator.
[](LICENSE)
[](https://marketplace.visualstudio.com/items?itemName=sagebind.mathpad)

[](https://github.com/sagebind/mathpad/actions)I created this because I couldn't find a good notebook calculator that I liked that
- is free and open source,
- supports all the platforms I care about,
- works completely offline,
- supports variables and functions,
- allows you to edit anywhere (as opposed to REPL style),
- and works in and saves as plain text.I already have [Visual Studio Code] installed on all my computers and use it for lots of text editing purposes, so I decided to make it also my calculator using this extension.
## Features
- Math expressions on their own line inside a Markdown editor are evaluated automatically and their results are displayed in grey at the end of the line.
- Variables can be defined on their own line like `x = 42` and referenced on any line below it.
- Functions can be defined on their own line like `f(x) = 42 / x` and referenced on any line below it.
- Changing a variable or function definition will automatically re-evaluate everywhere it is used in the rest of the document.Much more is available as math expressions, which are powered by [Math.js]. Check out the Math.js documentation for even more examples of what sorts of expressions can be evaluated.
## Future ideas
There's a lot more neat ideas that _could_ be implemented, including:
- Defining our own language/editor type with dedicated math syntax highlighting.
- Evaluating expressions embedded in normal text.
- Replacing an expression with its result.## License
This project's source code and documentation is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.
[Math.js]: https://mathjs.org
[Visual Studio Code]: https://code.visualstudio.com