Hi,

Did you see the tutorial? I hope it will help your development.
http://www.sphinx-doc.org/en/stable/extdev/tutorial.html

Thanks,
Takeshi KOMIYA

2017-03-11 1:42 GMT+09:00 vibebusiness3 <[email protected]>:
> I'm looking for an efficient way to display math equations correctly in both
> html/pdf and texinfo output. Currently I am doing this:
>
> .. only:: not texinfo
>
>    .. math::
>
>       \left( \sum_n n^2 + 1 \right) = \log{y}
>
> .. only:: texinfo
>
>    .. math::
>
>        ( sum_n n^2 + 1 ) = log(y)
>
> This way the texinfo (ascii) output doesn't have all the latex formatting
> symbols. I would like to define a new directive to save some space, i.e.,
>
> .. latexmath::
>
>    \left( \sum_n n^2 + 1 \right) = \log{y}
>
> .. timath::
>
>    ( sum_n n^2 + 1 ) = log(y)
>
> So essentially my goal is to define 2 new directives: (1) "latexmath" which
> is equivalent to "only:: not texinfo" and "math::" and
> (2) "timath" which is equivalent to "only:: texinfo" and "math::".
>
> Can someone give pointers on how this can be done?
>
> --
> 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.

Reply via email to