Hi! 

I am trying to achieve something I guess similar, I would like the toctree 
to inherit somehow the CSS class when creating the html of the toctree and 
adding its classes like "toctree-l".

It would be something like the following:

Section Title
===================

.. cssclass::desired-toctree-css

Subsection 1
----------------

I would like to hide this section for the toctree (for my sidebar 
navigation menu), but still be part of the toctree, that is why I would 
like a CSS way of achieving this.


Subsection 2
----------------

This one doesnt have any custom css class, so everything behaves like 
normal. 



Is there a way of achieving this? The directive *rubric* doesnt work for us 
since it removes the subsection from the toctree, which is not what we 
want. 

Thank you very much!

On Saturday, February 25, 2017 at 7:14:49 AM UTC+1, Komiya Takeshi wrote:
>
> Hi, 
>
> You're right. All directives should have :class: option. But toctree 
> does not have it. 
> Could you file that as a issue of Sphinx? 
> I'll work it later. 
>
> Thank you for reporting 
>
> Takeshi KOMIYA 
>
> 2017-02-24 8:57 GMT+09:00 Aladdin Mhaimeed <[email protected] 
> <javascript:>>: 
> > Hi, 
> > I use sphinx with sphinx_rtd_theme, and this is my code: 
> > 
> > .. toctree:: 
> >    :caption: Reference Pages 
> >    :maxdepth: 1 
> > 
> >    config-ref 
> >    command-ref 
> >    adapter-ref 
> >    message-ref 
> > 
> > 
> > I need to add css class to one of the items, 
> > Guys I searched and tried everything, nothing works, 
> > 
> > I can't believe rst does not have this option 
> > 
> > thanks 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sphinx-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/sphinx-users. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to