-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macros for documentation #2216
base: main
Are you sure you want to change the base?
Macros for documentation #2216
Conversation
Personally I would macro-fy only the human-readable text description and take the function parameter names as parameters in the macro. That way you can apply the macros also to slightly non-conforming functions, e.g.
Also I would display the parameters like
instead of using formulas, so that the name |
I thought about this at first, but this standardizes parameter names. I think it is more clear if the parameter names are set in stone, so that the first input is always X, and the second one is always Y etc.
I believe it is important to be consistent with the usage of fonts. One problem is that, typically, they should be typeset with monospace, but that restricts the usage of mathmode. What do you think about this? |
This would ensure coherent docstrings, and simplify the writing of them.
One downside is that M4 would be required to build the documentation (I didn't manage to do something nice with Python). One will still be able to check whether the documentation is coherent with headers, but one has to run
make preprocess
when insidedoc/
before the actual RST files are ready.@rburing @edgarcosta @lgoettgens @fredrik-johansson, what are your opinions? The two files you should look at is
fmpz.rst.pp
andmacros.m4
insidedoc/source/
.