You can do it with raw directive and substitution::
.. |latex| raw:: latex
\LaTeX
hello |latex| world
But the LaTeX is only shown on LaTeX output. If you want to see it on
other outputs, any extension might be needed.
Thanks,
Takeshi KOMIYA
2018年10月27日(土) 6:03 John H Palmieri <[email protected]>:
>
> If I use the string "\LaTeX" in an reST document and run it through Sphinx's
> latex builder, it strips the leading backslash, so if I run it through
> Sphinx's pdf builder, I just get the text "LaTeX". I would instead like to
> use the command "\LaTeX", which produces a nicely typeset LateX symbol. Is
> there any way to do this?
>
> To be honest, I know one way, but it is hacky: use something like
> \hbox{\LaTeX} within math mode. But there is the broader question of how to
> use LaTeX commands which are not supposed to be in math mode. Suggestions?
>
>
> --
> 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.
--
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.