[OS X TeX] A little help needed (math formula problem)

Samuel Lelievre samuel.lelievre.tex at free.fr
Fri Dec 18 11:18:26 CET 2009


Joe Java wrote:

>From: Joe Java <joe.java at eyeasme.com>
>To: <macosx-tex at email.esm.psu.edu>
>Date: Thu, 17 Dec 2009 08:32:15 -0700
>
>Hello TeX group,
>
>I wrote a webpage for testing MathML support in a browser.
>I used TeX as the "gold standard" for mathematical representation.
>See:  https://eyeasme.com/Joe/MathML/MathML_browser_test
>Click on any equation to see the code that generated it.
>
>Comments and suggestions on improving the TeX coding for
>any of the examples would be appreciated.


Hello!  In the example with lots of root signs, I find it unnice
that the bottoms of the root signs get lower and lower (leftwards).
I thought of aligning these bottoms of root signs using \smash[b],
as explained in section 30 of H. Voss's "Mathmode" guide.
http://www.tex.ac.uk/tex-archive/info/math/voss/mathmode/Mathmode.pdf

However, I just tried this out, and I'm a bit puzzled with the
results.  In the example below, I defined \rt to mimick \sqrt,
and \srt to be the smashed version, but I'm obviously missing
some subtleties.

- I would expect the command \rt to work just as \sqrt, but it
  doesn't: using \rt, the leftmost root sign slightly sticks out
  of the fraction bar, contrary to the \sqrt version.

- With \srt, first, compiling the whole expression seems to take
  forever, so I've commented it out in the example below, and put
  a reduced version with fewer root signs.

- second, I don't understand why the bottoms of the root signs
  are not vertically aligned;

- last, the horizontal bars at the top are not evenly spaced as
  they were with the \sqrt command, is there a way to fix that?

Any hints appreciated...
Best, SL

%%% smash-root.tex %%%
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath}
\newcommand{\rt}[2][{}]{\sqrt[#1]{#2}}
\newcommand{\srt}[2][{}]{\sqrt[#1]{\smash[b]{#2}}}
\begin{document}
${\displaystyle
  \frac{\sqrt{1 + \sqrt[3]{2 + \sqrt[5]{3 + \sqrt[7]{4
  + \sqrt[11]{5 + \sqrt[13]{6 + \sqrt[17]{7
  + \sqrt[19]{A}}}}}}}}}{e^\pi} = x^{'''}
}$

${\displaystyle
  \frac{\rt{1 + \rt[3]{2 + \rt[5]{3 + \rt[7]{4
  + \rt[11]{5 + \rt[13]{6 + \rt[17]{7
  + \rt[19]{A}}}}}}}}}{e^\pi} = x^{'''}
}$

% ${\displaystyle
%   \frac{\srt{1 + \srt[3]{2 + \srt[5]{3 + \srt[7]{4
%   + \srt[11]{5 + \srt[13]{6 + \srt[17]{7
%   + \srt[19]{A}}}}}}}}}{e^\pi} = x^{'''}
% }$

${\displaystyle
  \frac{\srt{1 + \srt[3]{2 + \srt[5]{3
  + \srt[7]{4}}}}}{e^\pi} = x^{'''}
}$
\end{document}




More information about the macostex-archives mailing list