Fixed Width Paragraph with italic, bold, and normal font

25 views
Skip to first unread message

bradley...@gmail.com

unread,
Sep 4, 2022, 9:27:43 AM9/4/22
to sphinx-users
How in sphinx does one create a paragraph that uses a fixed width for all characters and allows one to switch between normal, italic, and bold fonts.

This quesiton is similar to the following question on stackoverflow .

Matthias Geier

unread,
Sep 5, 2022, 2:17:53 PM9/5/22
to sphinx...@googlegroups.com
On Sun, Sep 4, 2022 at 3:27 PM bradley...@gmail.com
<bradley...@gmail.com> wrote:
>
> How in sphinx does one create a paragraph that uses a fixed width for all characters and allows one to switch between normal, italic, and bold fonts.

You should try the parsed-literal directive:

https://docutils.sourceforge.io/docs/ref/rst/directives.html#parsed-literal

But be warned about this issue:

https://github.com/sphinx-doc/sphinx/issues/2167

cheers,
Matthias

> This quesiton is similar to the following question on stackoverflow .
>
> --
> 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 sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/a7a88ff0-6bcc-4f5c-87c3-8b7696aee44an%40googlegroups.com.

bradley...@gmail.com

unread,
Oct 18, 2022, 7:05:56 AM10/18/22
to sphinx-users
Thanks, the following input

.. parsed-literal::

    *variable_one* = constant_one( *variable_two* )
    *variable_three* = constant_two( *variable_four* )

generates the output I was looking for
Reply all
Reply to author
Forward
0 new messages