Open rekomodo opened 1 week ago
@rekomodo can you add the markdown code to display the values in a table pls?
Syntax from this guide . The example I used was
|Trap|k_0|E_k|p_0|...|
|:---|:--|:--|:--|:--|
|1|{glue}`trap1k_0`|{glue}`trap1E_k`|{glue}`trap1p_0`|...|
|2|{glue}`trap2k_0`|{glue}`trap2E_k` | ... | ... |
Which renders to | Trap | k_0 | E_k | p_0 | ... |
---|---|---|---|---|---|
1 | {glue}trap1k_0 |
{glue}trap1E_k |
{glue}trap1p_0 |
... | |
2 | {glue}trap2k_0 |
{glue}trap2E_k |
... | ... |
We can definitely generate the markdown for these with a script if need be, but I doubt we'll need more than 3 anytime soon...
We can display parameters dynamically using MyST-NB's
{glue}
directive. We define variables in code cells usingglue('name', value)
and use them in markdown via{glue}`name`
.Here's the code for dynamically adding trap variables to the document