sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
69 stars 45 forks source link

two small additions to auto-link functionality #191

Closed rdzman closed 1 year ago

rdzman commented 1 year ago

I may continue to have small tweaks to the auto-link functionality as I dive into my own Matlab documentation project now, but thought I'd pass these 2 additions along now in case you want to include them in 0.20.

The new pieces are:

  1. Auto-linking of property and method names in "see also" lines. That is, for a "see also" line in the docstring of a class, property or method, we can auto-link property and method names, since we know which class they belong to.
  2. Property and method names in their own docstrings are also linked, mostly for the formatting, since the link isn't really very useful in that context. But it looks closer to MATLAB's output.
rdzman commented 1 year ago

Just added another feature that allows you to disable a particular auto-link (when matlab_auto_link = "all") by preceding or following the name with a non-breaking space.

rdzman commented 1 year ago

I suspect I may continue to tweak the auto-linking here and there as I get deeper into writing my own docs and run across issues. I'll continue adding the tweaks here as long as this is open.

But please feel free to merge this any time you are ready.

joeced commented 1 year ago

Next week I have much more time to work on the project. I'll review and probably merge this in. Until that, please enjoy your work in the public: https://numad.readthedocs.io/en/latest/user/classDefs.html