executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
264 stars 68 forks source link

Any way to customize the code-tab label/tab name #52

Closed ABartzGit closed 4 years ago

ABartzGit commented 4 years ago

I show examples of how to run code using Python and R. But when I use

.. tabs::
   .. code-tab:: r

    library(somelibrary)

The label in the output is "S". I'm assuming this has something to do with the R/S lexers http://pygments.org/docs/lexers/#lexers-for-the-r-s-languages.

Screen Shot 2019-10-07 at 12 06 42 PM

Is there any way to change the label?

I tried using group-tab with coded text, but the highlighting is a little different.

stefanodavid commented 4 years ago

This should work:

.. tabs::
   .. code-tab:: r R

    library(somelibrary)

The first r is the lexer, the second (and subsequent) the label.

ABartzGit commented 4 years ago

That worked, thanks!!!