From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68710 Path: news.gmane.org!not-for-mail From: Paul Menzel Newsgroups: gmane.comp.tex.context Subject: Re: math: too big space between function and argument Date: Wed, 25 May 2011 15:52:17 +0200 Message-ID: <1306331537.10056.72.camel@mattotaupa> References: <1306235645.4255.17.camel@mattotaupa> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1256285117==" X-Trace: dough.gmane.org 1306331557 8332 80.91.229.12 (25 May 2011 13:52:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 May 2011 13:52:37 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed May 25 15:52:32 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QPEVf-0007RK-5K for gctc-ntg-context-518@m.gmane.org; Wed, 25 May 2011 15:52:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AFC94CAD1B; Wed, 25 May 2011 15:52:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tLNWbU6nG127; Wed, 25 May 2011 15:52:23 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0E262CAD1F; Wed, 25 May 2011 15:52:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 24422CAD1F for ; Wed, 25 May 2011 15:52:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LQIW93IJZEGr for ; Wed, 25 May 2011 15:52:20 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id F2512CAD1B for ; Wed, 25 May 2011 15:52:19 +0200 (CEST) Original-Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4PDqJS4016425 for ; Wed, 25 May 2011 15:52:19 +0200 Original-Received: from f053034074.adsl.alicedsl.de ([78.53.34.74] helo=[192.168.178.21]) by mail.gw90.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QPEVp-00065E-Uw for ntg-context@ntg.nl; Wed, 25 May 2011 13:52:38 +0000 In-Reply-To: X-Mailer: Evolution 2.32.3 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=188.40.100.199; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rELNQjN0 - c31a3d882607 - 20110525 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:68710 Archived-At: --===============1256285117== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-VKMajanULecBVwo6NKJN" --=-VKMajanULecBVwo6NKJN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Di, 2011-05-24 at 09:56 -0400, Aditya Mahajan wrote: > On Tue, 24 May 2011, Paul Menzel wrote: > > to markup the probability measure and the parenthesis around the > > argument, I defined the following command. > > > > \define[1]\P{{\mathbf P}\left( #1 \right)} > > > > Unfortunately the space between the P and the left ( is a little big in > > my opinion. Is that correct or should/can I fix that somehow? >=20 > Getting these spaces is tricky; especially if you consider spaces before= =20 > and after the definition. Choose your pick: >=20 > \starttext > \startformula > A{\mathbf P}\left( ABC \right)B \quad > A\mathop{\kern\zeropoint\mathbf P}\left( ABC \right)B \quad > A{\mathbf P}\mathopen{}\left( ABC \right)\mathclose{}B \quad > A\mathop{\kern\zeropoint\mathbf P}\mathopen{}\left( ABC \right)\mathcl= ose{}B \quad > \stopformula > \stoptext That looks tricky and complex. > Some information from the mathsets module (which does not work with MkIV)= . I hope you or somebody will have time to port that module to MkIV. > The entry is the latex bug database is not viewable now. >=20 > %D The \type{\left} and \type{\right} generate a math atom of type inner, > %D while for math sets, we want a math open atom. To see the difference, > %D consider > %D > %D \startbuffer > %D \startformula > %D 2\left(\frac {3}{4} \right) \qquad \hbox{ vs } \qquad > %D 2\biggl( \frac {3}{4} \biggr) > %D \stopformula > %D > %D and > %D > %D \startformula > %D \Pr\left(\frac {3}{4} \right) \qquad \hbox{ vs } \qquad > %D \Pr\biggl( \frac {3}{4} \biggr) > %D \stopformula > %D \stopbuffer > %D \typebuffer > %D > %D which gives (notice the spacing before the parenthesis) > %D > %D \getbuffer > %D > %D I will assume that if \type{text} is something, then > %D the default behaviour is desirable, if \type{text} is empty, then I ad= d > %D \type{\mathopen} and \type{\mathclose}. Using \type{\mathopen} to cor= rect > %D the spacing is due to Frank Mittelbach, see > %D \hyphenatedurl{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=3D= latex/3853} > %D > %D Mathset module ensures that we get the correct spacing in both cases > %D \startbuffer > %D \definemathset[SET][left=3D(,right=3D)] > %D \startformula > %D 2\SET{\frac{3}{4}} \qquad \hbox{ and } \qquad > %D \PR{ \frac{3}{4} } > %D \stopformula > %D \stopbuffer > %D \getbuffer[PR] \getbuffer which was typed as \typebuffer > %D > %D Also, if its argument is a single character, \type{\mathop} centers it= =20 > to > %D with respect to the math||axis. Compare the outputs of > %D > %D \startbuffer > %D \ruledhbox{$\mathop{y}\nolimits_x\left\{A\,\middle|\,B\right\}$} > %D \ruledhbox{$\mathop{\kern\zeropoint y}\nolimits_x\left\{A\,\middle|\,B= \right\}$} > %D \stopbuffer > %D > %D \typebuffer > %D \getbuffer > %D > %D I have added a \type{\kern\zeropoint} to prevent that. Could you explain the advantage over `\!` which Wolfgang suggested at least for the space after the definition. In addition, I think AMSTeX defines a command `\DeclareMathOperator` [1] which takes care of these things. Thanks, Paul [1] http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#Custom_operator= s --=-VKMajanULecBVwo6NKJN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk3dCZEACgkQPX1aK2wOHVi28ACgjclqyIZgJ1FynZQ73lEMHa/x nBkAn1SV8ULOAL1AecEvNFp+uNXfdE/Z =nZt/ -----END PGP SIGNATURE----- --=-VKMajanULecBVwo6NKJN-- --===============1256285117== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1256285117==--