* Size of root symbol
@ 2021-08-18 15:18 Bruce Horrocks via ntg-context
2021-08-18 16:06 ` Aditya Mahajan via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Horrocks via ntg-context @ 2021-08-18 15:18 UTC (permalink / raw)
To: ntg-context; +Cc: Bruce Horrocks
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
Thanks.
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Size of root symbol
2021-08-18 15:18 Size of root symbol Bruce Horrocks via ntg-context
@ 2021-08-18 16:06 ` Aditya Mahajan via ntg-context
2021-08-18 17:22 ` Hans Hagen via ntg-context
2021-08-22 14:09 ` Bruce Horrocks via ntg-context
0 siblings, 2 replies; 4+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-08-18 16:06 UTC (permalink / raw)
To: Bruce Horrocks via ntg-context; +Cc: Aditya Mahajan
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
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Size of root symbol
2021-08-18 16:06 ` Aditya Mahajan via ntg-context
@ 2021-08-18 17:22 ` Hans Hagen via ntg-context
2021-08-22 14:09 ` Bruce Horrocks via ntg-context
1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2021-08-18 17:22 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Size of root symbol
2021-08-18 16:06 ` Aditya Mahajan via ntg-context
2021-08-18 17:22 ` Hans Hagen via ntg-context
@ 2021-08-22 14:09 ` Bruce Horrocks via ntg-context
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Horrocks via ntg-context @ 2021-08-22 14:09 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Bruce Horrocks
> On 18 Aug 2021, at 17:06, Aditya Mahajan via ntg-context <ntg-context@ntg.nl> 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
Thanks Aditya, the \vphantom solution works for me -> now Wikified.
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-22 14:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 15:18 Size of root symbol Bruce Horrocks via ntg-context
2021-08-18 16:06 ` Aditya Mahajan via ntg-context
2021-08-18 17:22 ` Hans Hagen via ntg-context
2021-08-22 14:09 ` Bruce Horrocks via ntg-context
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).