Part of a word bold in reStructuredText
Asked Answered
H

2

45

How can I make a part of a word bold in reStructuredText?

Here is an example of what I need: ".rst stands for restructured text."

Horripilate answered 7/10, 2012 at 18:19 Comment(0)
I
70

I was surprised that you could not simply write

.rst stands for **r**e**s**tructured **t**ext.

but the reStructuredText specification indeed states that inline markup must be followed by white-space or one of - . , : ; ! ? \ / ' " ) ] } or >, so the above string of reStructuredText is not valid. However, only a minor change is required to get valid character markup with backslash escapes. Changing the above to

.rst stands for **r**\ e\ **s**\ tructured **t**\ ext.

works fine. To see this in action try the online reST to HTML converter.

Ickes answered 8/10, 2012 at 11:54 Comment(1)
Just to add that in some cases you can get away without space after the backslash. In this case, **r**\e\ **s**\ tructured **t**\ext. (I'm not impressed by this aspect of reST, by the way.)Mala
J
0

An alternative solution is to use the setting character-level-inline-markup. Then, the example markup .rst stands for **r**e**s**tructured **t**ext. works as expected.

Jeffreys answered 26/11, 2023 at 20:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.