[OpenStack-docs] italicized python cmds, literal blocks

Anne Gentle annegentle at justwriteclick.com
Mon Jun 29 22:21:14 UTC 2015


On Mon, Jun 29, 2015 at 3:38 PM, Matt Kassawara <mkassawara at gmail.com>
wrote:

> I just use "Blah blah blah::" in the networking guide and it seems to
> handle both config files and CLI.
>
>
Interesting data point Matt, and observation Karen.

So, what she's pointing out can be seen by looking at
http://docs.openstack.org/networking-guide/misc_libvirt.html
and then looking at the RST source:
https://raw.githubusercontent.com/openstack/openstack-manuals/master/doc/networking-guide/source/misc_libvirt.rst

She's asking, why does # virsh net list not have italics but #virsh net
net-destroy default is not italicized? Both use the :: convention in the
prior paragraph. That's where we may need another convention to use
..code-block:: console throughout books like the Networking Guide.

What do you think, change conventions to use the ..code-block:: console for
those guides?
Anne


> On Mon, Jun 29, 2015 at 2:33 PM, Gauvain Pocentek <
> gauvain.pocentek at objectif-libre.com> wrote:
>
>> Le 2015-06-29 22:12, Karen Bradshaw a écrit :
>>
>>> Hi.  I have been looking into the use of :: vs .. code-block::
>>> in the newly converted RST guides.  I have found some inconsistencies.
>>> I found that using a root-privileged python executable with the pound
>>> sign, gets
>>>
>>> formatted like a python comment (italicized).
>>> If there is output shown after the command
>>> then the cmd and output are not italicized but treated as literal
>>> text; the single colon directive is used in this case.
>>> Using the dollar prompt, everything works as expected (not italicized).
>>> We use the literal block directive, double colon, throughout the RST
>>> guides.
>>> One way I found to get around this is to always use the dollar prompt.
>>> Another way is .. code-block::java.  It is a hack, but it generates the
>>> correct
>>> output for the pound sign <python cmd>.
>>> May be someone can shed some light on this problem.
>>>
>>
>> You probably want to use '.. code-block:: console' for interactive shell
>> sessions (a prompt and a command followed by its output). This will show a
>> different color for the prompt and for shell builtin commands.
>>
>> If I'm not mistaken :: always uses python syntax highlighting (so italic
>> after a # sign is normal behavior), unless you specified another lexer to
>> use in your document.
>>
>> Gauvain Pocentek
>>
>> Objectif Libre - Infrastructure et Formations Linux
>> http://www.objectif-libre.com
>>
>> _______________________________________________
>> OpenStack-docs mailing list
>> OpenStack-docs at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>>
>
>
> _______________________________________________
> OpenStack-docs mailing list
> OpenStack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>


-- 
Anne Gentle
Rackspace
Principal Engineer
www.justwriteclick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20150629/a53e0c7f/attachment-0001.html>


More information about the OpenStack-docs mailing list