On 8/18/2021 6:06 PM, Aditya Mahajan via ntg-context wrote:
On Wed, 18 Aug 2021, Bruce Horrocks via ntg-context wrote:

Is there a simple way to get both root signs in this MWE to be the same size?

\starttext
\startformula
\sqrt[3]{4n} \ne \sqrt[3] {n}
\stopformula
\stoptext

Make the quantities whose roots are being taken to be of the same size.

\starttext

% The simplest solution:
\startformula
\sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n}
\stopformula

% More general
% \strut = \vphantom{(}, which is too big
\startformula
\sqrt[3]{\strut 4n} \ne \sqrt[3] {\strut n}
\stopformula

% We can define our own phantom sizes. You can play around with the numbers.
\define\filler{\vrule width 0pt height 2ex depth 0.3ex \relax}
\startformula
\sqrt[3]{\filler 4n} \ne \sqrt[3] {\filler n}
\stopformula

\stoptext
This is for Aditya to think about

\starttext

\unprotect

\defcsname\??mathradicalalternative Mine\endcsname#1%
  {\csname\??mathradicalalternative\v!normal\endcsname
     {\synchronizestrut{\mathradicalparameter\c!strut}\strut#1}}

% \defcsname\??mathradicalalternative Mine\endcsname#1%
%   {\rootradical
%      {\currentmathradicaldegree}
%      {\synchronizestrut{\mathradicalparameter\c!strut}\strut#1}}

\protect

\definemathradical[MyRoot] [strut=cap,alternative=Mine]
\definemathradical[MyRootX][strut=yes,alternative=Mine]

\startformula
\sqrt[3]{4n} \ne \sqrt[3] {\vphantom{4} n}
\stopformula

\startformula
\MyRoot[3]{4n} \ne \MyRoot[3] {n}
\stopformula

\startformula
\MyRootX[3]{4n} \ne \MyRootX[3] {n}
\stopformula

\startformula
\sqrt[3]{\strut 4n} \ne \sqrt[3] {\strut n}
\stopformula

\stoptext

we can have strut but also think of enforcing ht / dp

(or we can have minima but that i'd rather add some options to the engine - we already have some but i never came to apply them yet)

Hans



-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to