From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80519 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Math typesetting problems Date: Mon, 28 Jan 2013 16:09:24 -0500 (EST) Message-ID: References: <3332D3B9-E47C-47C2-8879-C0B5BE5ACADA@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359407374 1463 80.91.229.3 (28 Jan 2013 21:09:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jan 2013 21:09:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 28 22:09:54 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tzvxh-0001hP-9n for gctc-ntg-context-518@m.gmane.org; Mon, 28 Jan 2013 22:09:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4DACA1024E; Mon, 28 Jan 2013 22:09:35 +0100 (CET) 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 WifjfpBFIYvq; Mon, 28 Jan 2013 22:09:32 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2199A10215; Mon, 28 Jan 2013 22:09:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFB8810215 for ; Mon, 28 Jan 2013 22:09:30 +0100 (CET) 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 RUkyXImyGdaY for ; Mon, 28 Jan 2013 22:09:30 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 080F71020E for ; Mon, 28 Jan 2013 22:09:29 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0SL9R4S027343 for ; Mon, 28 Jan 2013 22:09:28 +0100 Original-Received: FROM Decentralized.ECE.McGill.CA (Decentralized.ECE.McGill.CA [132.206.69.142]) By tombraider.mr.itd.umich.edu ID 5106E905.C9938.22175 ; Authuser adityam; 28 Jan 2013 16:09:25 EST In-Reply-To: User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VIRx9rhO - 380f07df9030 - 20130128 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80519 Archived-At: On Mon, 28 Jan 2013, Otared Kavian wrote: > Hi Janne, > > Personnally I prefer to use the Plain TeX alternative \over (which works fine in ConTeXt), that is > ${a \over b}$ > instead of > $\frac{a}{b}$ > > Compare the following two outputs in the example you want to typeset: I think the second is more or less what you want > > \starttext > Using \type{\frac} gives: > \startformula > f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + > U(t-s)) + \frac{(S(u-t) + > U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} > \stopformula Formatting and temporary macros (I usually use \1 \2 etc) make a huge difference in readability: \startformula \def\1 {\frac{ (u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2} {(u-s)} }{ 2(t-s)(u-t)} } % f_{B_t | B_s = S, B_u = U}(x) = \frac { e^{\1} } { \sqrt{2\pi\frac{(t-s)(u-t)}{u-s}} } \stopformula > \blank > Using \type{\over} gives: > \startformula > f_{B_t | B_s = S, B_u = U}(x) = { > e^{-{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + > {(S(u-t) + U(t-s))^2 \over (u-s)} \over 2(t-s)(u-t)}} \over > \sqrt{2\pi {(t-s)(u-t) \over u-s}}} > \stopformula > > \stoptext At some stage, we also need to look at nath's automatic conversion of display fractions to inline fractions (e.g., in the numberator \frac{ (S(u-t) + U(t-s))^2 } { (u-s) } should be typeset as (S(u-t) + U(t-s))^2/(u-s) because it is being typeset in \scriptstyle. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________