0

I want to have something in my document like

This module uses the constant of 150000 m/s as the speed of light.

where the 150000 was generated programmatically from the module. This would reduce the maintainance of my documentation, as often just these numbers get updated.

For blocks, there is the .. exec:: directive; but is there something similar to do this inline?

mzjn
  • 48,958
  • 13
  • 128
  • 248
olebole
  • 521
  • 4
  • 17
  • Are you looking for something like this? https://stackoverflow.com/q/36320992/407651 – mzjn May 23 '23 at 09:20
  • That is similar (and would be a possible fall-back); however the disadvantage is that the code to generate the values would be centralized in `conf.py` instead of being part of the documentation itself. And for extensive use, this may become quite crowded and difficult to maintain. – olebole May 23 '23 at 09:55

0 Answers0