From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40831 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \indenting[next] and math => no vertical space before the formula Date: Wed, 30 Apr 2008 13:02:41 -0400 (EDT) Message-ID: References: <115224fb0804240429p195cf84bpf9cd25d1b75e3179@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1209574986 16622 80.91.229.12 (30 Apr 2008 17:03:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2008 17:03:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 30 19:03:42 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JrFiC-0003uX-8Y for gctc-ntg-context-518@m.gmane.org; Wed, 30 Apr 2008 19:03:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CC7D71FC03; Wed, 30 Apr 2008 19:02:36 +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 11856-01-9; Wed, 30 Apr 2008 19:02:20 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 24FCD1FB38; Wed, 30 Apr 2008 19:02:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F3FC51FB1F for ; Wed, 30 Apr 2008 19:02:18 +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 10524-02-12 for ; Wed, 30 Apr 2008 19:01:52 +0200 (CEST) Original-Received: from skycaptain.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.160]) by ronja.ntg.nl (Postfix) with ESMTP id 67C291FB38 for ; Wed, 30 Apr 2008 19:01:52 +0200 (CEST) Original-Received: FROM adi-laptop.local (c-68-40-40-75.hsd1.mi.comcast.net [68.40.40.75]) BY skycaptain.mr.itd.umich.edu ID 4818A5FB.F0B87.22169 ; 30 Apr 2008 13:01:48 -0400 In-Reply-To: User-Agent: Alpine 1.00 (DEB 882 2007-12-20) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40831 Archived-At: On Wed, 30 Apr 2008, Mikael Persson wrote: > On Tue, Apr 29, 2008 at 6:49 AM, Aditya Mahajan wrote: >> On Mon, 28 Apr 2008, Mikael Persson wrote: >> >> > Hello again, >> > >> > * snip * >> >> >> >> I could reproduce the result and have also a fix but I don't know what >> >> the correct >> >> reults should be and other people like Aditya should decide if it makes sense >> >> to change the current behaviour. >> >> >> >> \def\startdisplaymath >> >> {\ifgridsnapping >> >> \beforedisplayspace >> >> \snapmathtogrid\vbox >> > * snip * >> >> Wolfgang >> > >> > This fix seems not to solve the problem entirely. With this fix >> > applied, If one now put a formula inside an enumeration one gets >> > "double" space before the formula. This is a test file that shows the >> > problem: >> >> This is basically because in enumerations indenting is set to never. >> >> You can see the same affect with >> >> \setupindenting[no] >> \testtext >> >> One possible fix is to add >> >> indenting=(reset|next|first) %default is never >> >> to the \setupenumeration command. For example >> >> >> > \defineenumeration[example] >> > [text=Example, >> > location=serried, >> > width=fit, >> indenting=reset, %%<<<---- Add This >> >>> distance=0.5em, >> > way=bysection, >> > ] >> >> Another is to change \startdisplaymath to >> >> >> \def\startdisplaymath >> {\ifgridsnapping >> \beforedisplayspace >> \snapmathtogrid\vbox >> >> \bgroup >> \informulatrue >> %\forgetall % breaks side floats >> \else >> \bgroup >> \parskip\formulaparskip % ! ! >> \informulatrue >> %\forgetall % otherwise backgrounds fail >> \ifdim\lastskip<\zeropoint\else >> \par >> \ifvmode \ifdim\parskip>\zeropoint\relax >> \whitespace \vskip-\parskip % kind of forces and cancels again >> \fi \fi >> \fi >> \doif\displaygridcorrection{-\v!top}{\kern-\strutht}% new, currently only option/default >> \beforedisplayspace >> \par >> \ifvmode \ifdim\parskip>\zeropoint\relax \else >> >> \ifindentfirstparagraph >> \verticalstrut >> \vskip-\struttotal >> \vskip-\baselineskip >> \fi\fi >> \fi >> \fi >> $$\setdisplaydimensions >> \setpredisplaysize\lastlinewidth >> \startinnermath} >> >> But this is getting ugly. >> >> Aditya >> > > Thank you Aditya, but I don't get that to work. Both with > > ConTeXt ver: 2007.04.03 13:01 MKII fmt: 2008.4.24 int: > english/english (with the fix earlier in this thread) > and > ConTeXt ver: 2007.09.28 16:52 MKII fmt: 2008.4.24 int: > english/english (which is the one from new ubuntu, without the fix) > > this fails with the following error msg: > > %% Start error msg > ! Illegal unit of measure (pt inserted). > > \chardef > \@@in:reset ...rue \parindent \zerocount \chardef > \indentingtoggle \zerocount > \next1 #1,->\docomplexsetupindentingB {#1} > \doprocesscommaitem > \doprocesscommalist ...item \gobbleoneargument #1, > ]\relax \global \advance \... > ...ndenting ]\docomplexsetupindentingB > \checkeverypar \ifindentfi... > > \firstofoneargument #1->#1 > An old bug (more than two month old :) Also add this \unprotect \defineindentingmethod [\v!reset] {\indentfirstparagraphtrue \parindent\zeropoint%AM was \zerocount \chardef\indentingtoggle\zerocount} \protect 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 ___________________________________________________________________________________