Substituting placeholder variables in the text with values from a JSON #732
Replies: 3 comments
-
Does this help: https://jupyterbook.org/en/stable/content/executable/output-insert.html |
Beta Was this translation helpful? Give feedback.
-
Maybe some of the substitutions patterns would help? I think it might be tricky to define them programmatically, but this might be worth exploring: https://jupyterbook.org/en/stable/content/content-blocks.html?highlight=substitute#substitutions-and-variables-in-markdown |
Beta Was this translation helpful? Give feedback.
-
Thanks, both of these links look good 👍 I'll come back to this thread when I can give a progress report. EDIT: Just linking this for later: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2 |
Beta Was this translation helpful? Give feedback.
-
Hi,
let's say I'm writing something on a computational method, or data analysis that is still under development.
And let's assume that the precise numbers (accuracy, probabilities, percentages, etc.) from my analysis are still changing, but the general conclusion remains the same.
(How) would it be possible to put placeholder variables in my text so I don't have to manually update the numbers each time they change in their 2nd decimal place?
For example:
And a JSON file with the values, exported by the analysis pipeline:
I assume that this is already possible with custom LaTeX commands or so, but I wonder what would be the most elegant solution.
Beta Was this translation helpful? Give feedback.
All reactions