Re: Re: [NTG-context] Is there a mathematica typesetting manual for ConTeXt ?
======= 2005-05-14 13:31:00 You worte:=======
xiaojf said this at Sat, 14 May 2005 19:49:02 +0800:
The double-, triple-, and quadruple-integrals (\iiiint) are undefined in basic ConTeXt's math. I must say thank you very very much!
In fact I've been looking for \iint in ConTeXt in the last two days -_- so i'll try to use \int\!\!\!\int instead of looking for a ConTeXt implementation :)
I met another problem today. Since there are not as many arrows in ConTeXt as there in AMS-LaTeX,I don't konw how to type the formula in the attached picture which will be referred in my presentation next Monday.
Hello, Xiao.
I'm glad I could help: I'm learning these advanced requirements as I go along. My personal mathematics needs are much more modest.
I wouldn't give up on ConTeXt just yet. Try: \loadmapfile[original-ams-base] \starttext \showmathcharacters Note the \formula{\rightleftharpoons} and \formula{\upharpoonleft\!\downharpoonright}. \stoptext
Do you know how you would code that cycle in (AMS)LaTeX? 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 There is a similar example in "The TeXbook"(example 18.46). You can try the follow code: $$\def\normalbaselines{\baselineskip20pt \lineskip3pt \lineskiplimit3pt } \def\mapright#1{\smash{ \mathop{\longrightarrow}\limits^{#1}}} \def\mapdown#1{\Big\downarrow \rlap{$\vcenter{\hbox{$\scriptstyle#1$}}$}} \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 :)
-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
= = = = = = = = = = = = = = = = = = = = xiaojf jfxiao@sibs.ac.cn 2005-05-14
xiaojf said this at Sat, 14 May 2005 21:36:45 +0800:
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
Hmm. It seems like a reasonable starting point, but I'll admit this is beyond my abilities to fix over this weekend. I hope some other TeXnician might come along and offer some advice. Best of luck, adam
There is a similar example in "The TeXbook"(example 18.46). You can try the follow code:
$$\def\normalbaselines{\baselineskip20pt \lineskip3pt \lineskiplimit3pt } \def\mapright#1{\smash{ \mathop{\longrightarrow}\limits^{#1}}} \def\mapdown#1{\Big\downarrow \rlap{$\vcenter{\hbox{$\scriptstyle#1$}}$}} \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 :)
ah, don't we all... -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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:
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. 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=0pt} % 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 % % 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}$}}$}\updownharpoons} \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
participants (3)
-
Adam Lindsay
-
Mojca Miklavec
-
xiaojf