ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Non-square roots?
Date: Sun, 31 Jul 2005 22:25:50 +0200	[thread overview]
Message-ID: <42ED33CE.1060307@wxs.nl> (raw)
In-Reply-To: <4.3.1.2.20050731011127.02c22a70@cits1.stanford.edu>

Brooks Moses wrote:

> LaTeX offers the following way to write a cube root: $\sqrt[3]{x}$.  
> Is there a way to do this in ConTeXt other than the TeX way of $\root 
> 3\of x$?
>
> Also, Hans, if there isn't a direct way to do this, the following code 
> is pretty much how LaTeX implements it, with an extra line at the top 
> to make it work in ConTeXt.  Would it be reasonable to put something 
> like this (or something that implements this syntax) in m-newmat?
>
>    \let\sqrtsign=\sqrt
>    \def\sqrt{\@ifnextchar[\@sqrt\sqrtsign}
>    \def\@sqrt[#1]{\root #1\of}

\let\normalsqrt\sqrt % \dohandlemathtoken {sqrt}

\def\sqrt{\doifnextcharelse[\notsosqrt\normalsqrt}
\def\notsosqrt[#1]{\root#1\of}

$\sqrt[3]{10}$

Do you want this in the kernel? 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

  reply	other threads:[~2005-07-31 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-31  8:36 Brooks Moses
2005-07-31 20:25 ` Hans Hagen [this message]
2005-07-31 20:49   ` Brooks Moses

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42ED33CE.1060307@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).