Get Verified Calculations running in your Quarto project in under a minute.
From your Quarto project directory, run:
quarto add mentormind/verified-calc
This installs the extension to _extensions/mentormind/verified-calc/
Add the extension and set the evaluator URL:
project:
type: website
filters:
- verified-calc
verified-calc:
api: https://mentormind-calc.fly.dev
For batch evaluation during build, add a pre-render script:
project:
type: website
pre-render:
- physics-calc pre-render --root . --api https://mentormind-calc.fly.dev --out site_data/calcs.json
This evaluates all .calc-request blocks before Quarto renders your pages.
Create a test file test.qmd:
---
title: "Test Verified Calculations"
---
The velocity-time equation:
{{< eq id="formula:velocity-time" >}}
::: {.calc-request}
request_id: "test-01"
formula_id: "formula:velocity-time"
solve_for: "v"
inputs:
u: { value: 0, unit: "m/s" }
a: { value: 10, unit: "m/s^2" }
t: { value: 5, unit: "s" }
:::
**Result:** {{< calc request="test-01" >}}
Then render:
quarto render test.qmd
eq, calc, and calc-playground shortcodesphysics-calc CLI tool