You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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^2m_{rock} = 10 kgF_0 = 1000 Ndt_{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^2m_{rock} = 10 kgF_0 = 1000 Ndt_{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.
The text was updated successfully, but these errors were encountered:
colindean
changed the title
Use as a pandoc plugin
Use as a pandoc filter plugin
Feb 28, 2021
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.The text was updated successfully, but these errors were encountered: