sphinx_tabs_selector
This plugin is created based on the sphinx_tabs plugin and supports all formats supported by sphinx_tabs v3.4.7.
Features
- Supports all formats supported by
sphinx_tabswith v3.4.7. - Supports showing tabs in switching mode or flat mode.
- Supports Unix glob pattern for
tabs_includeandtabs_excludeconfiguration. You can use Unix glob pattern to select multiple tabs. For example:tabs_include = ["tab1_*", "tab2_*", "tab3_*"]will select all tabs that start withtab1_,tab2_,tab3_.tabs_exclude = ["tab4_*", "tab5_*", "tab6_*"]to exclude all tabs that start withtab4_,tab5_,tab6_.
- When
tabs_flatis set toTrue, and builder islatex, the tabs will be displayed in flat mode, and pdf will show the tab with blue,bold tab name and the tab contents will be surrounded by a box. The non-nested tabs are displayed very well. But the nested tabs are displayed not very well. - Supports replace
stringsin tab contents by setflat_tabs_replace_dict. This only effect on flat mode. - If you don't want to display tab title when gen flat pdf, you can set with
flat_not_display_title_tabs. This only effect on flat mode. - If you want to replace one tab by another tab in one tabs, you can set with
flat_tab_conflict_titles. This only effect on flat mode.
Installation
pip install sphinx-tabs-selector
Usage
Add the following configuration to conf.py:
extensions = [
...
'sphinx_tabs_selector.selector',
...
]
# tabs_include is used to configure the tabs to be selected. Support Unix glob pattern.
# The configuration item is a list. Each element in the list is a string, which is the name of the tab to be selected.
# If the tab is nested, you need to write down all the names of the tabs in the nesting path.
tabs_include = ["tab1_name", "tab2_name", "tab3_*"]
# tabs_exclude is used to configure the tabs to be skipped. Support Unix glob pattern.
# The configuration item is a list. Each element in the list is a string, which is the name of the tab to be skipped.
tabs_exclude = ["tab4_name", "tab5_name", "tab6_*"]
# default is False. If True, the tabs will be displayed in flat mode. Otherwise, the tabs will be displayed in switching mode.
tabs_flat = True
tabs_replace_dict = {
"tab1":{
"key1":"value1"
}
}
For the way of writing tabs in RST files, you can refer to the documentation of the sphinx_tabs plugin. Thanks for the author of the sphinx_tabs plugin.
Notes
- If you want to use this plugin. You must add the
tabs_includeortabs_excludeconfiguration toconf.py; Otherwise, the plugin will not take effect. Therefore, you can use thetabs_includeortabs_excludeconfiguration to control the activation of the plugin.- If any of the
tabs_includeortabs_excludeconfiguration is added, the plugin will be activated. - If either of the
tabs_includeortabs_excludeconfiguration is not added, the plugin will not be activated. - If only
tabs_includeis added, the plugin will only select the tabs in thetabs_includeconfiguration. - If only
tabs_excludeis added, the plugin will select all tabs except the tabs in thetabs_excludeconfiguration. - If both
tabs_includeandtabs_excludeare added, the plugin will select the tabs in thetabs_includeconfiguration, and exclude the tabs in thetabs_excludeconfiguration. But excluding takes precedence over selecting.
- If any of the
- You need add the
tabs_flatconfiguration toconf.pyto control the display mode of the tabs.- If the
tabs_flatconfiguration is not added, the tabs will be displayed in switching mode. - If the
tabs_flatconfiguration is added and set toTrue, the tabs will be displayed in flat mode. - If the
tabs_flatconfiguration is added and set toFalse, the tabs will be displayed in switching mode.
- If the
- If both the
sphinx_tabsplugin and thesphinx_tabs_selectorplugin are added to theextensionsinconf.py, for thesphinx_tabs_selectorplugin to work, it must be added aftersphinx_tabs. - The
sphinx_tabs_selectorplugin can be used independently even if thesphinx_tabsplugin is not added toconf.py. - If only set the
sphinx_tabs_selectorplugin inconf.pyand not set thesphinx_tabsplugin, andtabs_flatis set toFalseor not set, and not set thetabs_includeortabs_excludeconfiguration, the plugin will work as thesphinx_tabsplugin with v3.4.7. - If one
tabshas no content, it will not be displayed. (updated in v1.0.12)
Release files for sphinx-tabs-selector 1.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx_tabs_selector-1.0.15.tar.gz | 13.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_tabs_selector-1.0.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / sphinx_tabs_selector-1.0.15.tar.gz
| Download URL | sphinx_tabs_selector-1.0.15.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aebdea4a1e5b67a7af50cd3aee63cf6827ada1ed4d9b69a4c76d47e0c0517584
|
|
BLAKE2b-256 checksum How to use checksums |
bfdf701ff5b713e87193aaacb48852d9251535c8b7a806dee8f4a95c7aed3ecd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 15, 2026.
Transparency logRelease files / sphinx_tabs_selector-1.0.15-py3-none-any.whl
| Download URL | sphinx_tabs_selector-1.0.15-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e19607e50f02b152f4d616b53d5bdcbb39d3da0857605a175120d66e0df899b
|
|
BLAKE2b-256 checksum How to use checksums |
d693308e2a1be48bccbccf2ec8eedf73ae99d0017b58e2c1cdc1ad2fdd6466b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 15, 2026.
Transparency log