On Tue, Aug 4, 2020 at 1:41 AM [email protected] wrote:
>
> I like to put macro definitions at the top of my latex files. It seems that 
> sphinx generates empty vertical space when I do this in rst files. Attached 
> is a conf.py and index.rst file that demonstrates this problem:
>
> Is there some place I can put a set of latex macro definitions and not have 
> this problem ?

It's a bit of a hack, but you can try something like this:

############################

.. raw:: html

    <div hidden>

:math:`\newcommand{\B}[1]{{\bf #1}}`

.. raw:: html

    </div>

############################

Alternatively, you can do it with a CSS class, which makes the .rst
file a bit simpler:

############################
.. rst-class:: hidden

:math:`\newcommand{\B}[1]{{\bf #1}}`
############################

... but you need to defined some custom CSS:

############################
.hidden {
    display: none;
}
############################

cheers,
Matthias

-- 
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/CAFesC-frAcGSYZ6-MEwzAVNbuMJa5BspnNk5ev%3DpE05QuM%2BfYQ%40mail.gmail.com.

Reply via email to