All Projects → mkhan45 → Calculatex

mkhan45 / Calculatex

Licence: mpl-2.0
in progress pretty printing calculator language

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Calculatex

fcal
Extensive math expression evaluator library for JavaScript and Node.js
Stars: ✭ 86 (-71.52%)
Mutual labels:  calculator, interpreter, math
string-math
Evaluates a math expression from a string. Supports variables and custom operators.
Stars: ✭ 14 (-95.36%)
Mutual labels:  calculator, math
cas
Cellular Automata Simulator
Stars: ✭ 22 (-92.72%)
Mutual labels:  science, math
hfmath
Render LaTeX math with Hershey Fonts
Stars: ✭ 76 (-74.83%)
Mutual labels:  latex, math
Mather
A powerful expression-based calculator, unit converter, and general computation engine for Android
Stars: ✭ 49 (-83.77%)
Mutual labels:  calculator, math
color-math
Expressions to manipulate colors.
Stars: ✭ 18 (-94.04%)
Mutual labels:  interpreter, math
arogozhnikov.github.io
'Brilliantly wrong' blog, Machine Learning visualizations live here
Stars: ✭ 120 (-60.26%)
Mutual labels:  science, math
Upmath.me
Markdown and LaTeX online editor - create text for web with equations and diagrams
Stars: ✭ 234 (-22.52%)
Mutual labels:  latex, math
quich
Just an advanced terminal calculator.
Stars: ✭ 59 (-80.46%)
Mutual labels:  calculator, math
desktop
Extendable calculator for the 21st Century ⚡
Stars: ✭ 85 (-71.85%)
Mutual labels:  calculator, math
keisan
A Ruby-based expression parser, evaluator, and programming language
Stars: ✭ 48 (-84.11%)
Mutual labels:  calculator, math
Atosym
algebraic expressions parsing and evaluation through a property system based algorithm
Stars: ✭ 15 (-95.03%)
Mutual labels:  calculator, math
kalker
Kalker/kalk is a calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals
Stars: ✭ 1,237 (+309.6%)
Mutual labels:  calculator, math
cpc
Text calculator with support for units and conversion
Stars: ✭ 89 (-70.53%)
Mutual labels:  calculator, math
Num-Plus-Plus
A scientific & intutive calculator written in Flutter.
Stars: ✭ 62 (-79.47%)
Mutual labels:  calculator, latex
rclc
Mathematical expression calculator with big integers, floats, common fractions, and complex numbers support
Stars: ✭ 24 (-92.05%)
Mutual labels:  calculator, math
Csharpmath
LaTeX. in C#. (ported from the wonderful iosMath project).
Stars: ✭ 205 (-32.12%)
Mutual labels:  latex, math
Katex
Fast math typesetting for the web.
Stars: ✭ 14,623 (+4742.05%)
Mutual labels:  latex, math
node calculator
Create Maya node-network by entering a math-formula.
Stars: ✭ 56 (-81.46%)
Mutual labels:  calculator, math
mightyscape-1.X
A maintained extension collection for Inkscape 1.0+, working on Windows and Linux
Stars: ✭ 23 (-92.38%)
Mutual labels:  science, math

CalcuLaTeX

Test Status Crates.io

Try it out at https://mkhan45.github.io/CalcuLaTeX-Web/

Example

'''
Given a rock with mass $m_{rock}$ thrown by a force of $F_0$ acting over a duration $dt_{force}$,
calculate its airtime and the max height it achieves.
'''

''' Given: '''
g = 9.81 m/s^2
m_{rock} = 10 kg
F_0 = 1000 N
dt_{force} = 0.1 s


''' Solution: '''
y_{vel} = F_0 / m_{rock} * dt_{force} = ?

airtime = y_{vel} / g * 2 = ?
height_{max} = y_{vel} * airtime / 4 = ? cm

Outputs:

example 1

''' 
CalcuLaTeX:

Write an expression followed by = ? to evaluate it:
'''

50 g + 1 kg = ?

'''
You can suggest a unit if it outputs the wrong one. \\
Make sure it's correct otherwise the document won't \\
compile!
'''

5 m/s^2 * 3 kg = ?
5 m/s^2 * 3 kg = ? N

'''
Assign variables with =
'''
x = 5
y = 10 kg
x * y = ?
z = x kg + y = ?

'''
Set the output digits or use scientific notation \\
by using !digits \{n\} or !scientific 
'''

1 / 3 = ?

!digits 10
1 / 3 = ?

!digits 1
!scientific
1 kg = ? mg

'''
Escape raw latex with three single quotes.

There's still plenty of bugs, so feel free to \\
open an issue at \\
https://github.com/mkhan45/CalcuLaTeX
'''

Outputs:

tutorial


CLI Usage

Assuming the binary is called calculatex, running calculatex [input] [output.pdf] will watch the input file and output to output.pdf on change. This is meant for use with a PDF viewer which updates in realtime.

To run the CalcuLaTeX cli, you'll also need pandoc and a texlive installation.


Compiling

To build CalcuLaTeX, you need a nightly Rust compiler and Cargo, preferably through rustup. After that, it's as simple as:

git clone [email protected]:mkhan45/CalcuLaTeX.git
cd CalcuLaTeX

# both of these output to target/release/
cargo build --release # builds the library only
cargo build --features build-binary --release # builds the CLI

Contributing

If you'd like to contribute, feel free to open an issue or send me an email. The code base is very messy right now but it's small enough to be pretty understandable. Performance suggestions are welcome, but only if they don't introduce any extra complexity. I haven't benchmarked anything but LaTeX compilation is pretty much guaranteed to take an order of magnitude longer than the interpreter.

For guidelines, read CONTRIBUTING.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].