A pretty printing calculator language with support for units. Makes calculations easier and more presentable with real time LaTeX output, along with support for units, variables, and mathematical functions.
It would be really awesome to be able to use CalcuLaTeX as a pandoc filter plugin.
A document might look something like this:
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:
~~~ {calculatex #eq:facts}
g = 9.81 m/s^2
m_{rock} = 10 kg
F_0 = 1000 N
dt_{force} = 0.1 s
~~~
Solution:
~~~ {calculatex #eq:velocity}
y_{vel} = F_0 / m_{rock} * dt_{force} = ?
~~~
~~~ {calculatex #eq:airtime}
airtime = y_{vel} / g * 2 = ?
~~~
~~~ {calculatex #eq:heightmax}
height_{max} = y_{vel} * airtime / 4 = ? cm
~~~
and the output would essentially be this:
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
$$ {#eq:facts}
Solution:
$$
y_{vel} = F_0 / m_{rock} * dt_{force} = 10 m/s
$$ {#eq:velocity}
$$
airtime = y_{vel} / g * 2 = 2.039 s
$$ {#eq:airtime}
$$
height_{max} = y_{vel} * airtime / 4 = 5.097 m
$$ {#eq:heightmax}
Passing additional code block classes through to the generated equation block enables compatibility with pandoc-crossref, too.
It'd be assumed that the calculatex block creates one environment per document. However, I'll bet you could add some kind of class with a key-value attribute that can assign calculatex code blocks to a certain environment or clear the state of the default.
This is a really good idea and seems like a great way for CalcuLaTeX to be used in research. I definitely want to do this but it'll have to wait for the core functionality to be done.
It would be really awesome to be able to use CalcuLaTeX as a pandoc filter plugin.
A document might look something like this:
and the output would essentially be this:
Passing additional code block classes through to the generated equation block enables compatibility with pandoc-crossref, too.
It'd be assumed that the
calculatex
block creates one environment per document. However, I'll bet you could add some kind of class with a key-value attribute that can assigncalculatex
code blocks to a certain environment or clear the state of the default.