I guess this is a feature "by design":

> (DefaultSubstitutions won't help, since these are used as Text nodes as 
> well.)
>

>From https://github.com/sphinx-doc/sphinx/issues/2173


On Monday, May 16, 2016 at 4:52:21 PM UTC-7, Peter Burdine wrote:
>
> I think this is related to 
> https://github.com/sphinx-doc/sphinx/issues/2167 that Andrea put in last 
> year.
>
> On Saturday, May 14, 2016 at 10:27:47 AM UTC-7, Peter Burdine wrote:
>>
>> Is there a way to either completely enable or disable syntax-highlighting 
>> for parsed-literal and code-blocks?  I am running into an issue where I 
>> have to use parsed-literal directives because I need some formatting in 
>> code blocks to show which words are variables, eg something like this:
>>
>> .. parsed-literal::
>>
>>     # cd *someDirectory*
>>
>> In other places I used rst replacements like:
>>
>> .. parsed-literal::
>>     
>>     # cd |directory|
>>
>> In the first example, in the PDF output it shows up like a normal code 
>> block (black border, syntax highlighting, etc), but the second example 
>> doesn't
>>
>> In the .tex file for the marked up parsed-literal it looks like:
>> \begin{Verbatim}[commandchars=\\\{\}]
>> ...content here...
>> \end{Verbatim}
>>
>> But in the parsed-literal with the substitution, it renders like:
>> \begin{alltt}
>> ...content here...
>> \end{alltt}
>>
>> The same thing happens in HTML output (though not as noticible).  The 
>> marked up parsed-literal gets rendered with 'default-highlight' but the one 
>> with the replacement gets rendered with 'literal-block'.
>>
>> Is there a way to force to do one or the other?  
>>
>>
>>

-- 
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