From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Value of Metapost variable as a label
Date: Tue, 24 Mar 2009 00:16:47 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.00.0903240011080.7016@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <87mybbfzsq.fsf@gmail.com>
On Mon, 23 Mar 2009, Eythan Weg wrote:
>
> Aditya Mahajan <adityam@umich.edu>
> Sun, 22 Mar 2009 22:24:17 -0400 (EDT)
>
> On Mon, 23 Mar 2009, Mojca Miklavec wrote:
>
> >> This however fails:
> >> k:=2;
> >> label.bot(textext("$1\over" & decimal k & "$"), (10,0)) ;
> >
> > Try with \frac instead.
>
> Or prevent expansion of \over
>
> label.bot(textext("$1\noexpand\over" & decimal k & "$"), (10,0)) ;
>
> Why \atop or \choose do not need \noexpand?
> What is special about \over?
It is redefined by ConTeXt to be a useful command in text mode.
\starttext
\section[sec:test] {Some section}
See \over[sec:test]
\stoptext
Hans, is it OK to change the definitions in core-def to
\ifnum\texengine=\luatexengine
\ifx\in \undefined\else \let\normalmathin \in
\unexpanded\def\in {\mathortext\normalmathin \dospecialin } \fi
\ifx\at \undefined\else \let\normalmathat \at
\unexpanded\def\at {\mathortext\normalmathat \dospecialat } \fi
\ifx\about\undefined\else \let\normalmathabout\about
\unexpanded\def\about{\mathortext\normalmathabout\dospecialabout} \fi
\ifx\from \undefined\else \let\normalmathfrom \from
\unexpanded\def\from {\mathortext\normalmathfrom \dospecialfrom } \fi
\ifx\over \undefined\else \let\normalmathover \over
\unexpanded\def\over {\mathortext\normalmathover \dospecialabout} \fi
\fi
(added \unexpanded). This is certainly useful for \in and \over, maybe not
so much for the other three.
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://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2009-03-24 4:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 20:39 Curiouslearn
2009-03-21 22:04 ` Aditya Mahajan
2009-03-21 22:40 ` Curious Learn
2009-03-22 2:53 ` Eythan Weg
2009-03-23 0:36 ` Mojca Miklavec
2009-03-23 2:24 ` Aditya Mahajan
2009-03-24 1:57 ` Eythan Weg
2009-03-24 4:16 ` Aditya Mahajan [this message]
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=alpine.LNX.2.00.0903240011080.7016@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--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).