Actually, this solution does allow me to italicize the code like I need, but it removes syntax highlighting!
Is there any way I could find a solution that both preserves the code syntax highlighting found when using the code-block directive and also allows me to italicize parts of the code as the parsed-literal directive allows me to? Thank you again for your help! On Tuesday, June 23, 2015 at 10:55:28 AM UTC-4, Steve wrote: > > Thank you very much Mr. Shimizukawa, this works well. > Have a great day. > > On Thursday, June 18, 2015 at 12:10:37 PM UTC-4, Takayuki SHIMIZUKAWA > wrote: >> >> Hi, >> >> parsed-literal directive may help such situation. >> >> http://docutils.sourceforge.net/docs/ref/rst/directives.html#parsed-literal-block >> Note that the directive has a side-effect. >> However it's useful. Please try it. >> >> -- >> Takayuki SHIMIZUKAWA >> http://about.me/shimizukawa >> >> 2015年6月18日(木) 21:55 Steve <[email protected]>: >> >>> When using the code blocks directive to include code, for ex, >>> >>> .. code-block:: python >>> >>> Some python code >>> *Some python code* >>> *More code, Multiline >>> Italics are sought* >>> >>> >>> How would i italicize the code in the code block directive over multiple >>> lines, or in one line? >>> Using asterisks as would italicize regular text not in the code-block >>> directive seemingly does not work. >>> >>> Some may question why I would want to italicize code as for code written >>> in most languages (at least ones that I know of) italicizing code does >>> nothing. >>> In the specific application in which I am using the code-block directive >>> to include code in my Sphinx documentation, I need to italicize the code. >>> >>> Thank you. >>> >>> -- >>> 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 http://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 http://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
