SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Fernando P. <fpe...@gm...> - 2009年04月15日 18:15:27
Hi all,
in the NIPY documentation, we're heavily taking advantage of mpl's
math support, and for the most part it's working great. But having it
in there, we may have gotten a bit carried away... If you look at this
page:
http://neuroimaging.scipy.org/site/doc/manual/html/users/glm_spec.html
its reST sources here:
http://neuroimaging.scipy.org/site/doc/manual/html/_sources/users/glm_spec.txt
Contain text like:
/begin quote
"""
Typically, the events occur in groups, say odd events are labelled
*a*, even ones *b*. We might rewrite this as
.. math::
 E = \delta_{(t_1,a)} + \delta_{(t_2,b)} + \delta_{(t_3,a)} + \dots +
 \delta_{t_{10},b}
This type of experiment can be represented by two counting processes
:math:`(E_a, E_b)` defined as
.. math::
 \begin{aligned}
 E_a(t) &= \sum_{t_j, \text{$j$ odd}} 1_{\{t_j \leq t\}} \\
 E_b(t) &= \sum_{t_j, \text{$j$ even}} 1_{\{t_j \leq t\}}
 \end{aligned}
These delta-function responses are effectively events of duration 0
and infinite height.
""" / end quote
In the final PDF
(http://neuroimaging.scipy.org/site/doc/manual/nipy.pdf) that all
renders fine, since it's 'real' latex doing the work. However, the
HTML linked above renders the first equation fine, while the multiline
one doesn't work.
Is this something possible with today's MPL but where we are just not
making the right calls, or is it a missing feature. If the latter, is
it realistic to expect it to be added, or should we rather plan for
avoiding such type of typesetting in our docs or switching math
engines for the html docs? Or is the feature 'almost there' but
slightly buggy?
Any hints much appreciated, I just wasn't sure whether this would be a
bug report, feature request or just seeking advice...
Cheers,
f
From: Michael D. <md...@st...> - 2009年04月15日 18:26:13
Multiline equations are not currently supported by the mathtext engine. 
It's the alignment stuff that makes it more than just a "throw a vbox 
together". It's a good feature request -- go ahead and add it to the 
tracker if you're really interested in it -- but I don't know if I'll 
have time to do this myself in the near future. I'm happy to help show 
someone around the code...
Of course, in your case, you could also investigate one of the other 
math rendering directives included with Sphinx.
Mike
Fernando Perez wrote:
> Hi all,
>
> in the NIPY documentation, we're heavily taking advantage of mpl's
> math support, and for the most part it's working great. But having it
> in there, we may have gotten a bit carried away... If you look at this
> page:
>
> http://neuroimaging.scipy.org/site/doc/manual/html/users/glm_spec.html
>
> its reST sources here:
>
> http://neuroimaging.scipy.org/site/doc/manual/html/_sources/users/glm_spec.txt
>
> Contain text like:
>
> /begin quote
> """
> Typically, the events occur in groups, say odd events are labelled
> *a*, even ones *b*. We might rewrite this as
>
> .. math::
>
> E = \delta_{(t_1,a)} + \delta_{(t_2,b)} + \delta_{(t_3,a)} + \dots +
> \delta_{t_{10},b}
>
> This type of experiment can be represented by two counting processes
> :math:`(E_a, E_b)` defined as
>
> .. math::
>
> \begin{aligned}
> E_a(t) &= \sum_{t_j, \text{$j$ odd}} 1_{\{t_j \leq t\}} \\
> E_b(t) &= \sum_{t_j, \text{$j$ even}} 1_{\{t_j \leq t\}}
> \end{aligned}
>
> These delta-function responses are effectively events of duration 0
> and infinite height.
>
> """ / end quote
>
> In the final PDF
> (http://neuroimaging.scipy.org/site/doc/manual/nipy.pdf) that all
> renders fine, since it's 'real' latex doing the work. However, the
> HTML linked above renders the first equation fine, while the multiline
> one doesn't work.
>
> Is this something possible with today's MPL but where we are just not
> making the right calls, or is it a missing feature. If the latter, is
> it realistic to expect it to be added, or should we rather plan for
> avoiding such type of typesetting in our docs or switching math
> engines for the html docs? Or is the feature 'almost there' but
> slightly buggy?
>
> Any hints much appreciated, I just wasn't sure whether this would be a
> bug report, feature request or just seeking advice...
>
> Cheers,
>
> f
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Fernando P. <fpe...@gm...> - 2009年04月15日 18:42:58
Hi Mike,
On Wed, Apr 15, 2009 at 11:26 AM, Michael Droettboom <md...@st...> wrote:
> Multiline equations are not currently supported by the mathtext engine.
> It's the alignment stuff that makes it more than just a "throw a vbox
> together". It's a good feature request -- go ahead and add it to the
> tracker if you're really interested in it -- but I don't know if I'll have
> time to do this myself in the near future. I'm happy to help show someone
> around the code...
Many thanks for the info. I did file it here, so you guys can track
it for when someone has a chance to tackle it:
https://sourceforge.net/tracker/?func=detail&aid=2766156&group_id=80706&atid=560723
> Of course, in your case, you could also investigate one of the other math
> rendering directives included with Sphinx.
For now, that seems the most prudent course of action for us, since I
don't think we can tackle the mpl code right now.
Best,
f
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /