From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/20423 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: Re: Is there a mathematica typesetting manual for ConTeXt ? Date: Wed, 18 May 2005 09:22:10 +0200 Message-ID: <6faad9f00505180022372c3258@mail.gmail.com> References: <20050514133654.06E4C10DF63@smtp.sibsnet.org> <20050514174150.25730@mail.comp.lancs.ac.uk> Reply-To: Mojca Miklavec , mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1116401141 4822 80.91.229.2 (18 May 2005 07:25:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 May 2005 07:25:41 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed May 18 09:25:37 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DYIvL-0002pV-S8 for gctc-ntg-context-518@m.gmane.org; Wed, 18 May 2005 09:25:00 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2EE3B1281B; Wed, 18 May 2005 09:25:41 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25171-03; Wed, 18 May 2005 09:25:40 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B316812817; Wed, 18 May 2005 09:22:16 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1D2FF12817 for ; Wed, 18 May 2005 09:22:15 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25171-01 for ; Wed, 18 May 2005 09:22:14 +0200 (CEST) Original-Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by ronja.ntg.nl (Postfix) with ESMTP id A6C73127ED for ; Wed, 18 May 2005 09:22:13 +0200 (CEST) Original-Received: by wproxy.gmail.com with SMTP id 36so106707wra for ; Wed, 18 May 2005 00:22:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=A9MK4rJy6b00eMLiSeLRYUDsRUBnX2Pat7yv/PHRTIz2ZCxp9kVdQDncVhdVI0qF6ZDAF4FIduj6w94pR8r077KMAr0cj/A/qfLWAbYnQ2bkLwG2wtfxiRYKBTyRiV66K8NLPihZHE5ilIxFUekj0ns7AUjZExzXv38JFmThbc0= Original-Received: by 10.54.79.16 with SMTP id c16mr253655wrb; Wed, 18 May 2005 00:22:10 -0700 (PDT) Original-Received: by 10.54.139.6 with HTTP; Wed, 18 May 2005 00:22:10 -0700 (PDT) Original-To: mailing list for ConTeXt users In-Reply-To: <20050514174150.25730@mail.comp.lancs.ac.uk> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:20423 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:20423 I'm affraid I'm too late already, but I'm sending this anyway. The lines you sent as an example have two pecculiarities: - bad alignment - too short arrows I managed to solve the first problem -- alignment (with some "cheating", using TeXBOOK), but I have no idea how to extend \downharpoonright for example and \longrightleftharpoons also don't look as they should. In plain TeX it is possible to say \big\downarrow or \Bigg\downarrow and the arrow is as long as desired. I neither do understand how this mechanism works nor did I found out how \downharpoonright was defined (which font, ...). Does any Font/TeXnician have any idea how to make \Big\updownharpoons work? xiaojf said this at Sat, 14 May 2005 21:36:45 +0800: >=20 > Hi, > I can code the cycle in ConTeXt,but it's too ugly and I will try to > improve it. > here is my code: > > \starttext > \placeformula > \startformula > \matrix{A+B&{\Delta G_1\atop\rightleftharpoons}&AB\cr > \Delta G_3\!\!\upharpoonleft\!\downharpoonright&& > \upharpoonleft\!\downharpoonright\!\!\Delta G_4\cr > A'+B&{\rightleftharpoons\atop\Delta G_2}&A'B\cr} > \stopformula > \stoptext see below > There is a similar example in "The TeXbook"(example 18.46). > You can try the follow code: > > $$\def\normalbaselines{\baselineskip20pt\lineskip3pt \lineskiplimit3pt } these are just a few local space adjustment, not important to undestand the content. > \def\mapright#1{\smash{ > \mathop{\longrightarrow}\limits^{#1}}} define a command \mapright: - \mathop makes \longrightarror behave in a similar way as big operators like \sum, \int, ... - \limits makes the ^{#1} appear centered above the arrow smaller than the rest (the same as super/sub-scripts) > \def\mapdown#1{\Big\downarrow > \rlap{$\vcenter{\hbox{$\scriptstyle#1$}}$}} define a command \mapdown: - \Big makes the \downarrow longer (no idea how to make something similar for a harpoon) - \rlap places the argument to the right of the arrow with virtual box width 0 (so that the arrow can be centered) - $\vcenter{\hbox{...}}$ takes care of vertical centering - $\scriptstyle #1$ is a compensation for ^{#1} above and takes care that the argument becomes "smaller". Note that if equation is not typeset in \displaystyle, than it may be that this is not of the same size as the argument in \mapright > \matrix{&&&&&&0\cr > &&&&&&\mapdown{}\cr > 0&\mapright{}&{\cal O}_C&\mapright\iota& > \cal E&\mapright\rho&\cal L&\mapright{}&0\cr > &&\Big\Vert&&\mapdown\phi&&\mapdown\psi\cr > 0&\mapright{}&{\cal O}_C&\mapright{}& > \pi_*{\cal O}_D&\mapright\delta& > R^1f_*{\cal O}_V(-D)&\mapright{}&0\cr > &&&&&&\mapdown{\theta_i\otimes\gamma^{-1}}\cr > &&&&&&\hidewidth R^1f_*\bigl({\cal O} > _V(-iM)\bigr)\otimes\gamma^{-1}\hidewidth\cr > &&&&&&\mapdown{}\cr > &&&&&&0\cr}$$ > > Since i'm just a newbie of TeX, I don't really understand the first a few= lines > of the solution. I still need some learning and practice :) I hope I explained at least a little bit of it.=20 So here's my proposal (not perfect yet): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usemodule[nath] % is there any other way to use local variables than \unprotect? % I also had to define \m@th once more, which is not very elegant, % but I don't know any other way \unprotect \def\m@th{\mathsurround=3D0pt} % The TeXBOOK, page 358, modified \longrightarrow % for some reason, the harpoon and line are not 100% perfectly joined \def\longrightharpoonup{\relbar\joinrel\rightharpoonup} \def\longleftharpoondown{\leftharpoondown\joinrel\relbar} % slightly longer line which didn't work: it this looks ugly % probably a definition, similar as in \overrightarrow % would help producing longer harpoons % % \def\longrightharpoonup{\relbar\joinrel\relbar\joinrel\rightharpoonup} % \def\longleftharpoondown{\leftharpoondown\joinrel\relbar\joinrel\relbar} % The TeXBOOK, page 361m modified \rightleftharpoons \def\longrightleftharpoons{\mathrel{\mathpalette\rlh@{}}} \def\rlh@#1{\vcenter{\m@th\hbox{\ooalign{\raise2pt \hbox{$#1\longrightharpoonup$}\crcr $#1\longleftharpoondown$}}}} % copied from your code \def\updownharpoons{\upharpoonleft\!\downharpoonright} % here are four different placements of \Delta G_i, % based on Knuth's example above %=20 % I tried to explain the command already above % please ask if there is something you don't understand yet % \def\MyEquivTop#1{\smash{\mathop{\longrightleftharpoons}\limits^{#1}}} \def\MyEquivBot#1{\smash{\mathop{\longrightleftharpoons}\limits_{#1}}} \def\MyEquivLft#1{\llap{$\vcenter{\hbox{$\scriptstyle{#1}$}}$}\updownharpoo= ns} \def\MyEquivRt#1{\updownharpoons\rlap{$\vcenter{\hbox{$\scriptstyle{#1}$}}$= }} \protect $$ % copied from the Knuth's example above \def\normalbaselines{\baselineskip20pt\lineskip10pt\lineskiplimit10pt} \matrix{A+B & \MyEquivTop{\Delta G_1} & AB \cr \MyEquivLft{\Delta G_3} & & \MyEquivRt{\Delta G_4} \cr A'+B' & \MyEquivBot{\Delta G_2} & A'B \cr} $$ \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mojca