为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

LaTeX brackets don't display correctly (jsMath)

  • 7 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 zenolas

more options

I'm currently working with OLAT (a java based web application to manage lectures) and try to write some text containing LaTeX code inside (there is a html text editor which allows the use of LaTeX formulas via jsMath). When I try to display large brackets around a vector (with more than two rows), schematically :

\begin{pmatrix}
x_1 \\ x_2 \\ x_3
\end{pmatrix}

, the brackets aren't visible and there are some symbols instead (look at the screenshots). For shorter vectors (up to two rows), the problem doesn't appear.

Note that I encounter this problem on Firefox 27.0.1, both on Linux (Kubuntu 13.10) and Windows (7), but for instance not with other browsers (chromium, rekonq, etc.). Interestingly, someone tried this on a 27.0.01 version of Firefox under Archlinux, and the large brackets seems to be displayed correctly. It also seems to be working on Internet Explorer 9, 10 and 11.

I'm currently working with OLAT (a java based web application to manage lectures) and try to write some text containing LaTeX code inside (there is a html text editor which allows the use of LaTeX formulas via jsMath). When I try to display large brackets around a vector (with more than two rows), schematically : <pre><nowiki>\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}</nowiki></pre> , the brackets aren't visible and there are some symbols instead (look at the screenshots). For shorter vectors (up to two rows), the problem doesn't appear. Note that I encounter this problem on Firefox 27.0.1, both on Linux (Kubuntu 13.10) and Windows (7), but for instance not with other browsers (chromium, rekonq, etc.). Interestingly, someone tried this on a 27.0.01 version of Firefox under Archlinux, and the large brackets seems to be displayed correctly. It also seems to be working on Internet Explorer 9, 10 and 11.

由cor-el于修改

被采纳的解决方案

The www.math.union.edu page uses their own fonts (jsMath-cmex10). The page works for me after installing the fonts as shown on the page. Note that the page can use images instead of a font.

Note that the presence of boxes with the hex code instead of the character indicates that Firefox didn't find a font that includes the glyphs.

What does the Inspector (Firefox/Tools > Web Developer) say about fonts that are used on the page and possible CSS rules for those missing glyphs?

定位到答案原位置 👍 2

所有回复 (7)

more options

And here are the screenshots...

more options
more options

Hello cor-el,

Thank you for your suggestion. Yes, all the fonts were already present on my Linux system (I installed them again under Linux/Windows just to be sure, but the problem is still present).

However, I wonder if it is a font-related problem, since the large brackets display correctly for instance in Chromium, but not in Firefox, both working under the same Linux (or Windows) system (all browsers should normally have access to the same collection of fonts available under a given OS). I also checked if it could be a possible encoding issue, but it doesn't seem to be the case since the parameters are the same in all my browsers.

Today, I also tried to run my line of LaTeX code in this test page for the jsMath package : http://www.math.union.edu/~dpvc/jsMath/jsMath-lab.html

Interestingly, the large brackets are displayed correctly with Firefox, so my guess of a jsMath related issue seems to be a wrong way...

由zenolas于修改

more options

选择的解决方案

The www.math.union.edu page uses their own fonts (jsMath-cmex10). The page works for me after installing the fonts as shown on the page. Note that the page can use images instead of a font.

Note that the presence of boxes with the hex code instead of the character indicates that Firefox didn't find a font that includes the glyphs.

What does the Inspector (Firefox/Tools > Web Developer) say about fonts that are used on the page and possible CSS rules for those missing glyphs?

more options

Well, the page inspector seemed indeed to indicate that those specific jsMath fonts were required... and it solves the problem ! Shame on me not to have checked that additional point... And thank you for your help !

So for anyone encountering the same problem, you just have to install the missing jsMath fonts available here :

http://www.math.union.edu/~dpvc/jsmath/download/jsmath-fonts.html


However, there's still something that I don't quite understand : without the jsMath fonts installed on my OS, the page displayed correctly within some other browsers running on the same machine, is there a particular explanation or does Firefox work in a different way when it comes to those font problematics ?

more options

I got a notification that no fonts were font installed and that images would be used instead.
This choice is probably stored in a cookie once displayed and you may not notice the difference unless you would right-click such an image.

more options

Ok, I understand it for the math.union website.

But in fact, I was thinking about the problematic page of my initial question : previously, no images were displayed instead (since there were those hexa boxes), but still it was possible to visualize it correctly with other browsers than Firefox.