Also consistent font; and move to the edge.

91 views
Skip to first unread message

Dr J R Stockton

unread,
Aug 16, 2012, 7:18:36 AM8/16/12
to mathja...@googlegroups.com
FYI : I now have the 500 equations in MathJax (finding 4 typos in the original PDF equations, printed about 150 years ago) at <http://www.merlyn.demon.co.uk/math-jax.htm>, and they take 95 seconds to appear (P4/3GHz, WinXP sp3).  For that, I'll review the earlier remarks.

Q1 :  Source :

<br><i>qwertyuiop zxcvbnm1234567890
$$ \text{qwertyuiop zxcvbnm1234567890} $$ End.</i><br>

The \text{...} string is displayed in an inelegant upright serif font.  Might it be possible to have it in the external HTML font (now or in the future)?

Q2 : Source (after Davide Cervone ) :

$$ (Z) ~~~~~~~~~~~~
   \left\{ \begin{array}{l}
   Row 1 , \\
   Row 2 , \\
   Row 3 ;
   \end{array} \right. $$

Is it possible, without HTML, to get the "(Z)" placed at the left margin (still aligned with Row 2), with the brace and the array centred, as may be seen in
<http://www.ltas-vis.ulg.ac.be/cmsms/uploads/File/Lagrange_essai_3corps.pdf> page 231 (the third page; PDF ~ 5MB) ?
-- 
  (c) John Stockton, near London, UK.  Using Google, no spell-check.
 Mail: J.R.""""""""@physics.org or (better) via Home Page at
 Web:  <http://www.merlyn.demon.co.uk/> (may move soon)
 FAQish topics, acronyms, links, etc.; Date, Lagrange, JavaScript, ..|

Davide P. Cervone

unread,
Aug 16, 2012, 7:39:39 AM8/16/12
to mathja...@googlegroups.com
For Q1, you can set the mtextFontInherit parameter to true in the HTML-CSS and SVG sections of your configuration.  For example, place

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  "HTML-CSS": {mtextFontInherit: true},
  SVG: {mtextFontInherit: true}
});
</script>

somewhere BEFORE the script that loads MathJax.js itself.  This will cause all \text{} commands to use the surrounding font rather than the MathJax \rm font.  (The font renderer on XP in my opinion is a pretty poor one, and it requires extensive font hinting to work properly even at normal sizes.  Proper hinting (I'm told) requires hinting each glyph by hand, and that has not been done with the MathJax fonts.  They do have the FontForge auto-hinint, but apparently that is not great, and doesn't seem to help XP very much.)

For Q2, the best solution is to use

$$
 \left\{ \begin{array}{l}
   Row 1 , \\
   Row 2 , \tag{Z} \\

   Row 3 ;
\end{array} \right.
$$

which will label the second row with "(Z)" (the parentheses are added automatically by \tag).  Then change the TagSide parameter in the TeX section of your configuration to "left" (it is "right" by default).  E.g.,

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  TeX: {TagSide: "left"}
});
</script>

Of course, you can combine the two configuration changes into one MathJax.Hub.Config() call (but be careful to have the commas separating this correct, with no extra one at following the last item or it won't work in some versions of IE).

Hope that takes care of things for you.

Davide

FYI, it took 25 seconds to display your page in Safari 5.0.6 on my 3GHz MaxBook Pro running OS X 10.5.8, and 40 seconds in Firefox 13.  Just for comparison.  

J.R.St...@physics.org

unread,
Aug 16, 2012, 5:36:37 PM8/16/12
to mathja...@googlegroups.com
On Thursday, August 16, 2012 12:39:39 PM UTC+1, Davide Cervone wrote:
For Q1, you can set the mtextFontInherit parameter to true in the HTML-CSS and SVG sections of your configuration.},

Thanks - that's a job for tomorrow.

For Q2, the best solution is to use ... [\tag & TagSide] ... . I add :
with {TagIndent: "0.0ex"} to get the full width.  I've had to follow the c.19 printer in shrinking some equations to fit.

Hope that takes care of things for you.

All equations now look, and align, sufficiently nearly as in the original.  Before I insert them in the translation, I need to think more about controlling when MathJax starts processing, etc.  But I no longer need to rely on the original PDF being availaable..

A small point : Lagrange used "tang" where nowadays it would be "tan".  I would have been happy enough to use your \tan\varphi, but am actually using  \text{tang}\,\varphiHowever, so that you can support maths functions that you have never even heard of, is there or could there be a means of defining entities like \tang to be treated like the known functions?  I guess it would just mean adding them to an existing internal list, the user to worry (or be warned?) about clashes with existing entities.  Again, I don't need it; I'n just thinking that it could be needed.

FYI, it took 25 seconds to display your page in Safari 5.0.6 on my 3GHz MaxBook Pro running OS X 10.5.8, and 40 seconds in Firefox 13.  Just for comparison. 

A little under 60 seconds for me, same computer as before, using Chrome 21.0.


On Aug 16, 2012, at 7:18 AM, Dr J R Stockton wrote:
No, I was in bed at the time.  When will systems learn to indicate the offset from GMT? <g>

Thanks.

Lord_Farin

unread,
Aug 16, 2012, 5:42:48 PM8/16/12
to mathja...@googlegroups.com, J.R.St...@physics.org


On Thursday, August 16, 2012 11:36:37 PM UTC+2, (unknown) wrote:

A small point : Lagrange used "tang" where nowadays it would be "tan".  I would have been happy enough to use your \tan\varphi, but am actually using  \text{tang}\,\varphiHowever, so that you can support maths functions that you have never even heard of, is there or could there be a means of defining entities like \tang to be treated like the known functions?  I guess it would just mean adding them to an existing internal list, the user to worry (or be warned?) about clashes with existing entities.  Again, I don't need it; I'n just thinking that it could be needed.
 
This can be accomplished by the \operatorname command, i.e. \operatorname{tang} \varphi would produce the desired output.
Of course, using \newcommand{\tang}{{\operatorname{\tang}}} would enable you to use \tang instead. You could even use \renewcommand to override \tan but that's all TeX, not MathJax, so I'll keep it at that.

Davide P. Cervone

unread,
Aug 16, 2012, 8:31:56 PM8/16/12
to mathja...@googlegroups.com
There is also

\DeclareMathOperator{\tang}{tang}

that is a little easier than the \newcommand approach.  It is part of the AMSmath extension, as is \operatorname.

Davide

J.R.St...@physics.org

unread,
Aug 17, 2012, 7:23:25 AM8/17/12
to mathja...@googlegroups.com
On Thursday, August 16, 2012 10:42:48 PM UTC+1, Lord_Farin wrote:

This can be accomplished by the \operatorname command, i.e. \operatorname{tang} \varphi would produce the desired output.

Indeed it does; thanks.

Aside : I see someone is looking into a fraction-bar problem with Chrome 21/22.
The \sqrt bar should also be looked at, with an argument including a superscript.

J.R.St...@physics.org

unread,
Aug 17, 2012, 8:22:49 AM8/17/12
to mathja...@googlegroups.com
On Thursday, August 16, 2012 12:39:39 PM UTC+1, Davide Cervone wrote:
For Q1, you can set the mtextFontInherit parameter to true in the HTML-CSS and SVG sections of your configuration.  For example, place

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  "HTML-CSS": {mtextFontInherit: true},
  SVG: {mtextFontInherit: true}
});
</script>

somewhere BEFORE the script that loads MathJax.js itself.  This will cause all \text{} commands to use the surrounding font rather than the MathJax \rm font.  (The font renderer on XP in my opinion is a pretty poor one, and it requires extensive font hinting to work properly even at normal sizes.  Proper hinting (I'm told) requires hinting each glyph by hand, and that has not been done with the MathJax fonts.  They do have the FontForge auto-hinint, but apparently that is not great, and doesn't seem to help XP very much.)

That works too, of course - and the output looks more natural.  The font face and size now seems inherited, but not the italic state (I don't need it here, but I think others might want to inherit all relevant styles).  To me, MathJax \rm font looks ugly - consider the word "OXO" - and the zero looks a definite misfit.

Thanks.

Davide P. Cervone

unread,
Aug 17, 2012, 12:06:54 PM8/17/12
to mathja...@googlegroups.com
> Aside : I see someone is looking into a fraction-bar problem with
> Chrome 21/22.
> The \sqrt bar should also be looked at, with an argument including a
> superscript.

Can you be more specific about the issue you are seeing?

Davide

Davide P. Cervone

unread,
Aug 17, 2012, 12:08:12 PM8/17/12
to mathja...@googlegroups.com
> On Thursday, August 16, 2012 12:39:39 PM UTC+1, Davide Cervone wrote:
> For Q1, you can set the mtextFontInherit parameter to true in the
> HTML-CSS and SVG sections of your configuration. For example, place
>
> <script type="text/x-mathjax-config">
> MathJax.Hub.Config({
> "HTML-CSS": {mtextFontInherit: true},
> SVG: {mtextFontInherit: true}
> });
> </script>
>
> somewhere BEFORE the script that loads MathJax.js itself. This will
> cause all \text{} commands to use the surrounding font rather than
> the MathJax \rm font. (The font renderer on XP in my opinion is a
> pretty poor one, and it requires extensive font hinting to work
> properly even at normal sizes. Proper hinting (I'm told) requires
> hinting each glyph by hand, and that has not been done with the
> MathJax fonts. They do have the FontForge auto-hinint, but
> apparently that is not great, and doesn't seem to help XP very much.)
>
> That works too, of course - and the output looks more natural. The
> font face and size now seems inherited, but not the italic state

Yes, that is a known issue, and I will take care of it for the next
release:

https://github.com/mathjax/MathJax/issues/226

Davide

J.R.St...@physics.org

unread,
Aug 18, 2012, 6:18:38 AM8/18/12
to mathja...@googlegroups.com

Win XP sp3, Chrome 21.0.1180.79, "up to date".  Page (short)
<http://www.merlyn.demon.co.uk/p231-jax.htm>, code
$$ r = \sqrt { x^2+y^2+z^2 }, ~~~~
r' = \sqrt { x'^2+y'^2+z'^2 }, ~~~~
r'' = \sqrt { (x'-x)^2+(y'-y)^2+(z'-z)^2 } . $$
not zoomed. The "roof" of the extended square root signs is slightly
(1px?) high over the outer two characters; "superscript" may be a red
herring.
Harmless; but not pretty.

<http://www.merlyn.demon.co.uk/math-jax.htm>(long) shows the
same in most, but not all, cases. See in particular page 271 : there, the
root-tick and root-bar of the sin xi equation have a gap, and the root-bar
stops before covering the final prime. The root after dtheta/dt is OK,
but the one after dthetaprime lacks its bar. After cosomega, the root-bar
has a central dip, and the Pi' is a pixel or so higher than the Pi.

Now Zoom by two Ctrl-mousewheel steps. The roots are better, the Pi'
 is still elevated with respect to the Pi, and the fraction-bars are too long.

Images are I hope attached.

p271.PNG
p271-B.PNG

Davide P. Cervone

unread,
Aug 18, 2012, 7:33:06 AM8/18/12
to mathja...@googlegroups.com
OK, thanks, I'll look into it.

Davide


<p271.PNG><p271-B.PNG>

Reply all
Reply to author
Forward
0 new messages