-
Notifications
You must be signed in to change notification settings - Fork 1k
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
centrally defined abbreviations for units with special formatting #2209
Conversation
@echedey-ls do you have any ideas about this? I was not confident about the latex commands since the docs are html, not pdf, but I thought creating the new roles would work, or at the very least just typing out the superscript manually with |
I haven't had a look at your commits, but the best thing that comes to my mind is the following:
IDK at what point I've become your sphinx reference guy, but I don't dislike that hahahaha. |
and reverting other changes
I think this PR is now a nice example (thx Dax) of how this would look like: https://pvlib-python--2209.org.readthedocs.build/en/2209/reference/generated/pvlib.irradiance.get_total_irradiance.html Params |
@echedey-ls credit to you for suggesting the substitutions method! I was not aware of that functionality in sphinx. |
|
The flake8 job is configured to only check lines that are near other lines that have changed in the PR, and we don't change
My two cents: reviewing PRs is already hard enough without extra "clutter" of unrelated formatting changes. Best to do them in a separate PR where improved formatting is the objective. |
had trouble with "merge remote-tracking..." to resolve conflicts so updated the conf.py file manually to match the file on main
Closed, see comment |
docs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.Additional context
Suggested replacements:
|wm2| -> Wm⁻²
|wm2nm1| -> Wm⁻²nm⁻¹
|degc| -> °C
|deg| -> °
Note: click shift+\ to type |
Includes some common units but the current list just gives an idea of what is possible. Feel free to recommend inclusions/exclusions/modifications. See here for example usage (
solar_azimuth
,dhi
,dni_extra
)I also tried:
|^-1| -> ⁻¹
|^-2| -> ⁻²
to create some individual superscripts for more flexible applications (e.g. in atmosphere.pres2alt we have ms⁻²) but this did not render correctly in the docs. Is this a problem / does anyone have a suggestion to resolve this?
ps ignore the branch name, nothing to do with latex