On Wed, Aug 12, 2020, 5:19 AM [email protected] <[email protected]> wrote:
> The index.rst file below demonstrates that \newcommand does not work with > latexpdf. > > ------------ Below is my conf.py file ------------------------ > # For conf.py documentation see > # http://www.sphinx-doc.org/en/master/config > # > project = 'newcommand' > extensions = [ > 'sphinx.ext.mathjax', > ] > ------------- Below is my index.rst file ------------------------- > Problem With \newcommand in latexpdf > #################################### > This file builds just file, > and displays as intended, with ``make html``, > but with ``make latexpdf`` it generates and > ``Undefined control sequence.`` error for the > macro ``\B``. > > Define Latex Macro > ****************** > ``:math: \newcommand{\B}[1]{{\bf #1}}`` > :math:`\newcommand{\B}[1]{{\bf #1}}` > > Use Latex Macro \B > ****************** > ``:math: f : \B{R} \rightarrow \B{R}`` > :math:`f : \B{R} \rightarrow \B{R}` > > This File > ********* > .. literalinclude:: index.rst > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/92312617-c0dc-4c14-9d41-068e79f7bd76n%40googlegroups.com > <https://groups.google.com/d/msgid/sphinx-users/92312617-c0dc-4c14-9d41-068e79f7bd76n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAELGjd_%2Bmy34M%3DhixKh4%2Bq668a_ufNQK96cWYnHz_omEqdaWsQ%40mail.gmail.com.
