-
Notifications
You must be signed in to change notification settings - Fork 388
Description
For almost all plotting modules, we usually have two separate ReST files for modern and classic modes, respectively. For example, we have image.rst
and psimage.rst
and gmtlogo.rst
and gmtlogo-classic.rst
.
More ReST files usually mean more maintenance burden, especially sometimes we may fix or update the modern mode examples in one file, but forget to update the corresponding examples in another file.
So, I guess it makes more sense to have only one documentation file for a single module. Usually, the differences of modern and classic ReST files are:
-K
/-O
/-P
is only available in classic mode- Examples have different syntax.
For point 1, this can be addressed by emphasizing the these options are classic-mode only. For point 2, modern/classic modes can be switched using sphinx-design's tab directive (https://sphinx-design.readthedocs.io/en/furo-theme/tabs.html).
#8487 is an example PR showing how it works.
The title:
Classic-only options:
Modern-mode example:
Classic-mode examples (after clicking the "Classic mode" Tab: