Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
There is a problem with how the pentagon graphics at monoidal category > pentagon is displayed:
at least on my system, every single label of the vertices has its last two characters chopped off.
(This diagram is included, of course, at monoidal category).
The layout is decent under my Firefox (direct MathML) modulo chopping off the ends of vertex labels. And the arrow labels appear nicely.
Under my Chrome (MathJax) the vertex labels are wrongly positioned but are not chopped off because they use a smaller font (which may be why in that size space they are in the wrong position). However the arrow label’s text and positions are badly wrong or non existent.
Given that that SVG was Created on May 11, 2009 20:05:19 by Toby Bartels, the display code or environment probably changed since then. I’m guessing that the SVG uses a default font size and figure that giving it the right explicit size will fix the chop off problem in Firefox.
I don’t know how to make it also work with MathJax which couldn’t handle that SVG when it was created in 2009.
Thanks. So, hm, do you have any suggestion as to what we should do?
do you have any suggestion as to what we should do?
For Firefox one could edit it to fix the presumed font size problem, but that probably wouldn’t fix the MathJax problem.
SVG figures should work correctly in both - so understanding that SVG enough to make a hand edit might be a lot of one time work, maybe more so to get it working in MathJax. If Toby remembers how he made that figure and used some software to make it he might be able to regenerate it to work correctly in both.
Such figures should be generated by a software package that guarantees they work in both MathML and MathJax. I’ve been working on software for generating SVG (+MathML) but it can’t produce that figure for now. The big problem in such software is fonts: you can’t be assured that 2 installed browsers use the same font and the metrics for a font are not exposed to JavaScript within a browser - you currently need indirect methods to determine how big some text is.
Maybe the right approach is to convert the text in a math diagram into SVG so the displaying browser doesn’t know what font is being used.
What's cut off for me is a single letter: the subscript ‘’ in the label ‘’ on the right-bottom arrow. I was able to make it visible by making two edits to the SVG file (neither alone was enough): adding 10 to the penultimate number in the viewbox
attribute of the overarching svg
tag, and adding 10 to the number in the width
attribute of the specific foreignObject
tag containing the cut-off text.
I made a third edit, adding 1 to the number in the width
attribute of the svg
tag. Without that, everything was slightly scaled-down; but with that, there is some spurious blank space on the left side. (This could possibly be fine-tuned with decimal fractions or a different unit of measurement.)
I'm viewing on Firefox with all of the fonts installed and SVG support.
Thanks!
If I go back to monoidal category > pentagon I see that more of the labels has appeared, but there is still some chop-off on my system.
It seems strange that this should happen at all and require anyone readjusting sizes. There ought to be a way to make a diagram with labels that simply displays as intended, no?
I still get the ends of the vertex labels chopped off in my Firefox.
In the Inspector, inspecting the first “w” at the top of the diagram, I am shown:
Computed font-family >serif body>Verdana,Arial,Helvetica,sans-serif instiki.css:1 math>serif mathml.css:16 font-size >16px; body>1em instiki.css:1 math>inherit mathml.css:16 line-height >20px; body>1.3em instiki.css:1 Fonts Cambria Math Box Model 11.8167×16.6667 (with margin, border, padding = 0)
Maybe I don’t have the fonts setup on my system correctly. I don’t recall modifying them.
This is probably the fonts problem I mentioned above.
There ought to be a way to make a diagram with labels that simply displays as intended, no?
That depends upon the fonts in your system being “set up correctly”. That’s why above I mentioned converting fonts to SVG so it doesn’t matter what fonts your system has.
I’m not sure what fonts I’m “supposed” to have on my system.
I should mention that MathJax has been wrestling with the font issue and its seems possible for it to dynamically download the “correct” font.
http://docs.mathjax.org/en/latest/font-support.html
Page authors can configure their font preference for each output format separately, see HTML-CSS output processor and SVG output processor. MathJax will download the necessary webfonts and fontdata dynamically and only those files necessary for the content.
For the HTML-CSS output, MathJax will download webfonts in the appropriate webfont format (depending on the client browser); for the SVG output, MathJax will download path data that corresponds to the fonts.
I’ve been watching the MathJax Google Groups mathjax-dev and mathjax-users, though I don’t technically understand how they get fonts working.
Maybe someone could give the nLab MathJax like font support.
While the SVG figure for the pentagon identity remains broken (the one at monoidal category > pentagon) I have replaced it in the entry monoidal category with something that works: here.
While googling for info on my SVG problems in nForum: does-the-nlab-parser-for-svg-not-like-use I came across the following MathJax bug discussion MathML in SVG in MathML #896, with last post on Apr 12, 2015.
In summary Jacques Distler is complaining about how badly MathJax handles Math in SVG using the existing working kludge. The respondents say that there is a better unimplemented way to handle Math in SVG. I think the concluding post is Jacques thanking MathJax for at least rendering something even if it is wrong.
Given this, I may eventually try redefining the SVG pentagon identity. In my experiments so far I’ve learned that Instiki actively ignores <style>
constituents - CSS can only be applied by something like style="font-size: 12"
. Of course this fix would only work in Firefox which has native MathMl. Chrome with MathJax will still render something wrong.
If you can make it work with Firefox that would be good. We should probably anyway get used to advertising that one needs Firefox to view the nLab.
We should also update the section on software requirements on the HomePage. The sentence about MathPlayer there is no longer up-to-date is it?
I think that section should highlight that users better stick to Firefox or Iceweasel, and that all other browswers will fail on nLab pages with substantial content.
I thought that I figured out how to fix the SVG (as a workaround), in comment #5. And I fixed it so that it works for me, so if somebody else’s browser still cuts some stuff off, then they should add some more to the numbers referenced in comment #5 until it works for them too.
Or at least, people should try that until we find somebody who can't make it work that way.
By the way, there was a typo in one of the tag names in #5, but now I fixed that.
Thanks for saying this. When I wrote #8 I still didn’t get the diagram displayed properly on my system, but now that I am checking again it comes out right.
Good, I'm glad that it's working for you now. But if you (or anybody else) find yourself on a browser somewhere else where it's not working, try editing the viewbox
and width
parameters referenced in comment #5.
1 to 17 of 17