Formatting fail on docs.sympy.org

52 views
Skip to first unread message

Joachim Durchholz

unread,
Nov 2, 2014, 4:11:31 AM11/2/14
to sy...@googlegroups.com
http://docs.sympy.org/dev/modules/concrete.html seems to contain
mathematical markup that isn't rendered correctly.

Could be intentional, I have no idea what the /dev subdirectory is for.
However, I got to that page via a Google search, so I guess it's being
linked to.

Ondřej Čertík

unread,
Nov 2, 2014, 9:45:35 AM11/2/14
to sympy
Hi Joachim,

On Sun, Nov 2, 2014 at 2:11 AM, Joachim Durchholz <j...@durchholz.org> wrote:
> http://docs.sympy.org/dev/modules/concrete.html seems to contain
> mathematical markup that isn't rendered correctly.

I don't see any rendering issues. Can you point me to them?

Ondrej

>
> Could be intentional, I have no idea what the /dev subdirectory is for.
> However, I got to that page via a Google search, so I guess it's being
> linked to.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/5455F541.3010400%40durchholz.org.
> For more options, visit https://groups.google.com/d/optout.

Joachim Durchholz

unread,
Nov 2, 2014, 10:50:09 AM11/2/14
to sy...@googlegroups.com
Am 02.11.2014 um 15:45 schrieb Ondřej Čertík:
> Hi Joachim,
>
> On Sun, Nov 2, 2014 at 2:11 AM, Joachim Durchholz <j...@durchholz.org> wrote:
>> http://docs.sympy.org/dev/modules/concrete.html seems to contain
>> mathematical markup that isn't rendered correctly.
>
> I don't see any rendering issues. Can you point me to them?

Under "Finite Sums", I'm seeing stuff like this:

\[\begin{split}\sum_{m \leq i < n} f(i)\end{split}\]

Actually the first paragraph has something like that, too:

\(a(n)\)
\(n\)

Aaron Meurer

unread,
Nov 2, 2014, 2:00:26 PM11/2/14
to sy...@googlegroups.com
Can you be more specific? Everything looks good to me. Maybe your
mathjax isn't rendering properly?

dev/ means the docs are from the development version of SymPy (the git
master). You probably want latest/ (although for this module I don't
think there is a difference).

Aaron Meurer

Aaron Meurer

unread,
Nov 2, 2014, 2:05:37 PM11/2/14
to sy...@googlegroups.com
Your browser isn't rendering the MathJax. Which browser are you using?
Can you try a different one? Also try clearing the cache. And if that
doesn't work, open the web inspector and see if there are any console
logs from the Javascript.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/545652AA.1090609%40durchholz.org.

Joachim Durchholz

unread,
Nov 2, 2014, 3:18:34 PM11/2/14
to sy...@googlegroups.com
Am 02.11.2014 um 20:05 schrieb Aaron Meurer:
> Your browser isn't rendering the MathJax. Which browser are you using?
> Can you try a different one? Also try clearing the cache. And if that
> doesn't work, open the web inspector and see if there are any console
> logs from the Javascript.

I have Javascript disabled, so I guess that's the reason.

It would be nice if the site didn't fall back to that all-backslashes
representation for non-JS visitors.

Aaron Meurer

unread,
Nov 2, 2014, 5:29:11 PM11/2/14
to sy...@googlegroups.com
You can't really expect to browse the modern web without Javascript. I
think showing the raw latex is fine. It's far more accessible than
images, and it is readable. I really don't know what you would expect
to happen here. Literally any kind of nice thing that could happen
requires Javascript. Also note that we didn't write this code. We're
just using MathJax, so if you have any suggestions on how they could
improve their usability for your situation you should make a feature
request to them.

Aaron Meurer

>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/54569191.5040403%40durchholz.org.

Joachim Durchholz

unread,
Nov 2, 2014, 6:06:42 PM11/2/14
to sy...@googlegroups.com
Am 02.11.2014 um 23:28 schrieb Aaron Meurer:
> On Sun, Nov 2, 2014 at 2:18 PM, Joachim Durchholz <j...@durchholz.org> wrote:
>> Am 02.11.2014 um 20:05 schrieb Aaron Meurer:
>>>
>>> Your browser isn't rendering the MathJax. Which browser are you using?
>>> Can you try a different one? Also try clearing the cache. And if that
>>> doesn't work, open the web inspector and see if there are any console
>>> logs from the Javascript.
>>
>>
>> I have Javascript disabled, so I guess that's the reason.
>>
>> It would be nice if the site didn't fall back to that all-backslashes
>> representation for non-JS visitors.
>
> You can't really expect to browse the modern web without Javascript.

Sorry, you can. I do it every day.

> I
> think showing the raw latex is fine.

Is
\(a\)
raw latex?

> It's far more accessible than
> images, and it is readable.

Do you consider this:

\[\begin{split}\sum_{m \leq i < n} f(i)\end{split}\]

readable?

I can't make heads nor tails of it.

> I really don't know what you would expect
> to happen here.

It would be fine if we could simply have the HTML+CSS that MathJax
generates.

> Literally any kind of nice thing that could happen
> requires Javascript.

That's a gross exaggeration.
Nicely formatted math is possible, even in HTML+CSS - MathJax
demonstrates it, the final result after it did its work is indeed just HTML.

> Also note that we didn't write this code. We're
> just using MathJax, so if you have any suggestions on how they could
> improve their usability for your situation you should make a feature
> request to them.

I would be unable to even word such a requests, because my knowledge
about how these web pages are built is practically nonexistent.

AFAICT MathJax scans the page for <span class="math">, parses the Latex
it finds, and replaces the contents of the <span> with whatever output
format is desired.
That's essentially broken by design, since you can't have a better
format than Latex as a fallback display. Unless MathJax allows a better
input format by itself.

Ondřej Čertík

unread,
Nov 3, 2014, 11:26:35 AM11/3/14
to sympy
Do you know how to make mathjax pre-generate just html + css, so that
we can put the generated html+css into our docs? I am not sure that it
allows that. There is another project, called KaTeX:

http://khan.github.io/KaTeX/

Which allows that, but it doesn't yet parse all the math, but they are
quickly fixing all the issues, e.g. see this one I reported:

https://github.com/Khan/KaTeX/issues/74

So maybe we could use it.

Ondrej



>
>> Literally any kind of nice thing that could happen
>>
>> requires Javascript.
>
>
> That's a gross exaggeration.
> Nicely formatted math is possible, even in HTML+CSS - MathJax demonstrates
> it, the final result after it did its work is indeed just HTML.
>
>> Also note that we didn't write this code. We're
>>
>> just using MathJax, so if you have any suggestions on how they could
>> improve their usability for your situation you should make a feature
>> request to them.
>
>
> I would be unable to even word such a requests, because my knowledge about
> how these web pages are built is practically nonexistent.
>
> AFAICT MathJax scans the page for <span class="math">, parses the Latex it
> finds, and replaces the contents of the <span> with whatever output format
> is desired.
> That's essentially broken by design, since you can't have a better format
> than Latex as a fallback display. Unless MathJax allows a better input
> format by itself.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/5456B8FB.8000203%40durchholz.org.

Joachim Durchholz

unread,
Nov 3, 2014, 12:04:32 PM11/3/14
to sy...@googlegroups.com
Am 03.11.2014 um 17:26 schrieb Ondřej Čertík:
> Do you know how to make mathjax pre-generate just html + css, so that
> we can put the generated html+css into our docs? I am not sure that it
> allows that.

I have no idea, my knowledge of Mathjax is limited to a quick skim over
their website.
Pregeneration is certainly not the primary purpose of Mathjax.

The Mathjax-generated HTML doesn't look very nice though, lots of
absolute sizing. I guess the JS reacts to size changes and adjusts all
the absolute sizings on the fly.

> There is another project, called KaTeX:
>
> http://khan.github.io/KaTeX/
>
> Which allows that, but it doesn't yet parse all the math, but they are
> quickly fixing all the issues, e.g. see this one I reported:
>
> https://github.com/Khan/KaTeX/issues/74
>
> So maybe we could use it.

That one looks nice.
It also isn't shy to compare itself with Mathjax, so the Katex people at
least know the playing field, which is good.
And the ability to render server-side seems to be a development goal, so
that's good (as opposed to Mathjax where I don't see such a statement -
I might have missed it though). I have no idea what kind of setup would
be required server-side rendering though, so I can't really judge it.

The one question that's on my mind is: How much of the SymPy pages can
it render, and how quickly are these going to be fixed?

So, first impressions look good, but somebody with real JS knowledge
should double-check that. And somebody with real knowledge about how the
SymPy documentation is generated should check what's needed to integrate
it, and see whether it's really a breeze or not.
Reply all
Reply to author
Forward
0 new messages