From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68370 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: displaying lines of formulas one by one Date: Fri, 13 May 2011 08:50:43 +0200 Message-ID: <64BB9034-D8BC-4E97-800E-EDEBB84B3974@gmail.com> References: <7FB40D20-86AC-4E2B-8AC4-BF7858D10F62@me.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/mixed; boundary=Apple-Mail-19-544729275 X-Trace: dough.gmane.org 1305269466 30961 80.91.229.12 (13 May 2011 06:51:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 May 2011 06:51:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 13 08:51:02 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 1QKmDC-0006Ty-K7 for gctc-ntg-context-518@m.gmane.org; Fri, 13 May 2011 08:50:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 31B1CCAC2D; Fri, 13 May 2011 08:50:57 +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 slkFNlt7nQJs; Fri, 13 May 2011 08:50:56 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C6E3CACE4; Fri, 13 May 2011 08:50:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BCBAFCACE4 for ; Fri, 13 May 2011 08:50:52 +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 XgtgrFHqz7K2 for ; Fri, 13 May 2011 08:50:50 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 0C94ACAC2D for ; Fri, 13 May 2011 08:50:50 +0200 (CEST) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4D6olV7012757 for ; Fri, 13 May 2011 08:50:48 +0200 Original-Received: by wwi36 with SMTP id 36so2030960wwi.2 for ; Thu, 12 May 2011 23:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id:x-mailer; bh=4Y6mnEwjLAnzzDrJUxEi/P7GxdHBaIn2CkJQdE4IEZ4=; b=e262qojHTh/pY8I7lZPV2v1+kNK0i+mJIedrJFZ8hJ1pgPS2QOZn3Q8MLNinT4sgpC J+p44UePrYLnVRVGf/tGnhbOJ1pwD8j2LyLAZ8/Dpt+2QCFynht4ScIIAvwjPc1mv9ea USEPue8mQYZZoqzZCDBKhv/FYRXHpTIq7NBwU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=cm8WrYB7UrULCzOXX+0QoyDTlPnV8mQ9IlNHgBI5zUWJcoY4E+AxV3cBc16euyFmtW tei1N7DdVwf+Nx/JqXKM3ErTh7tpWvWAcvAG4TLYOu8cyR/cjrZE72ulzlgfT5l4Kx4y UQWOrK1AbQml7wKUf8RvsE+VWHy7s4KA6FX9o= Original-Received: by 10.217.7.73 with SMTP id z51mr969398wes.107.1305269447659; Thu, 12 May 2011 23:50:47 -0700 (PDT) Original-Received: from new-host.home (AOrleans-553-1-17-160.w90-63.abo.wanadoo.fr [90.63.127.160]) by mx.google.com with ESMTPS id m14sm962879wes.38.2011.05.12.23.50.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2011 23:50:45 -0700 (PDT) In-Reply-To: <7FB40D20-86AC-4E2B-8AC4-BF7858D10F62@me.com> X-Mailer: Apple Mail (2.1084) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xEGSOMbF - 3141771067ec - 20110513 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:68370 Archived-At: --Apple-Mail-19-544729275 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hi Jeong, If you are interested in using the commands defined in the old = t-rsteps.tex for showing formulas or text step by step, below is an = example I use (it works with mkii and mkiv). The input file I use can = be found here http://dl.dropbox.com/u/4316076/t-rsteps-ok.tex but I attach it also to this message.=20 The old =AB raw steps =BB is handy when one may need to go backward in = the steps or when you want to show, say, the third line of your formula = before the second line, but it has the disadvantage of creating one page = per step. \starttext \setuppapersize[S6][S6] \setuppagenumbering[state=3Dstop] \input t-rsteps-ok.tex \setupinteraction[state=3Dstart]=20 % uncomment the following when not needing teps % \UseStepsfalse % when using \UseStepstrue, we redefine \placeformula... \ifx\UseStepstrue{\def\placeformula[#1]{\PlaceFormula[#1]}}\fi \StartSteps[Formula with steps] \startformula \startalign \Step{1}{\NC T(4) \NC =3D T(3) + 4 \NR}=20 \Step{2}{\NC \NC=3D T(2) + 3 + 4 \NR} \Step{3}{\NC \NC=3D T(1) + 2 + 3 + 4 \NR} \Step{4}{\NC \NC=3D 1 + 2 + 3 + 4 =3D 10 \NR} \stopalign \stopformula \StopSteps \stoptext Best regards: OK --Apple-Mail-19-544729275 Content-Disposition: attachment; filename=t-rsteps-ok.tex Content-Type: application/octet-stream; name="t-rsteps-ok.tex" Content-Transfer-Encoding: 7bit %D \module %D [ file=t-rsteps, %D version=2004.11.10, %D title=\CONTEXT\ User Module, %D subtitle=Raw steps for slides, %D author=David Munger, %D date=\currentdate, %D copyright={David Munger}] %D Thanks to Otared Kavian whose work inspired this module, %D and who contributed to its development. %%D Changed \Subject to \Title (OK, December 13, 2004) \def\Title[#1]{\start% \page\switchtobodyfont[palatino,24pt]\centerline{#1}\bigskip\stop } \def\Step#1#2{\FromStep[#1]{#2}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % steps for slides %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \unprotect \newif\ifUseSteps \UseStepstrue % \UseStepsfalse \definecolor [highlightcolor] [blue] \long\def\StartSteps[#1]#2\StopSteps{% \begingroup% \let\steps@number\plusone% \let\steps@counter\plusone% \ifUseSteps% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Workaround to make formula numbers "stick" \def\PlaceFormula[##1]{% \incrementnumber[formula]% \expandafter\xdef\csname steps@eqnum##1\endcsname{\rawnumber[formula]} \expandafter\xdef\csname steps@eqnum\endcsname{\rawnumber[formula]} \dodoubleempty\doplaceformula} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \loop% \let\steps@autocounter\zerocount% \Title[#1]\par\steps@startstep#2\steps@stopstep% \steps@updatenumber\steps@autocounter% \ifnum\steps@counter<\steps@number% \increment\steps@counter% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Workaround to make formula numbers "stick" \def\PlaceFormula[####1]{% \setnumber[formula]{\csname steps@eqnum####1\endcsname}% \setfalse\incrementformulanumber% \ifnum\steps@counter=\steps@number% \def\steps@fnext{\dodoubleempty\doplaceformula[####1]}% \else \def\steps@fnext{\dodoubleempty\doplaceformula}% \fi\steps@fnext} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \repeat% \else% \Title[#1]\par\steps@startstep#2\steps@stopstep% \fi% \endgroup} \def\NextStep{\steps@stopstep\steps@startstep} \def\OnlyStep[#1]{% \relax \steps@updatenumber#1% \def\steps@cond{\steps@counter=#1}% \dosingleempty\steps@dostep} \def\FromStep[#1]{% \relax \steps@updatenumber#1% \let\steps@tmpcounter\zerocount% \increment(\steps@tmpcounter,#1-1)% \def\steps@cond{\steps@counter>\steps@tmpcounter}% \dosingleempty\steps@dostep} \def\AfterStep[#1]{% \relax \steps@updatenumber#1% \def\steps@cond{\steps@counter>#1}% \dosingleempty\steps@dostep} \def\UntilStep[#1]{% \relax \steps@updatenumber#1% \def\steps@cond{\steps@counter<#1}% \dosingleempty\steps@dostep} \def\HighlightStep[#1]#2{% {\UntilStep[#1]{#2}\OnlyStep[#1]{\highlightcolor #2}\AfterStep[#1]{#2}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % internal macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcounter\steps@counter \newcounter\steps@autocounter \newcounter\steps@number \newcounter\steps@tmpcounter \def\steps@startstep{% \increment\steps@autocounter% \def\steps@hide{no}% \ifUseSteps% \ifnum\steps@autocounter>\steps@counter% \def\steps@hide{yes}% \fi% \fi% \starthidden} \def\steps@stopstep{\stophidden} \def\steps@updatenumber#1{\ifnum\steps@number<#1% \doglobal\let\steps@number\zerocount% \doglobal\increment(\steps@number,#1)\fi} \defineframedtext [step@frame] [offset=overlay,width=broad,height=fit,frame=off] \def\starthidden{\startstep@frame[empty=\steps@hide]} \def\stophidden{\stopstep@frame} \long\def\steps@dostep[#1]#2{% \processallactionsinset [#1] [ reserve=>\let\steps@next=\steps@dostepreserve, \s!default=>\let\steps@next=\steps@dostepnoreserve] \steps@next{#2}} \long\def\steps@dostepreserve#1{% \def\steps@hide{no}% \ifUseSteps% \ifnum\steps@cond\else% \def\steps@hide{yes}% \fi% \fi% \ifmmode\expandafter\mframed\else\expandafter\framed\fi% [empty=\steps@hide,frame=off,offset=overlay]{#1}% \ifmmode\;\fi} \long\def\steps@dostepnoreserve#1{% \def\steps@next{#1\ifmmode\;\fi}% \ifUseSteps% \ifnum\steps@cond\else\def\steps@next{\relax}\fi% \fi\steps@next} \protect \doifnotmode{demo}{\endinput} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % usage example % partly contributed by: Otared Kavian %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usemodule [pre-original] %\usemodule [rsteps] \starttext \StartSteps[Slide Title] % the title is passed to % the \Title macro \startitemize \item Item 1 \OnlyStep[2] {\item (oops!)} \UntilStep[4] {\item Item 2*} \FromStep[4] {\item Item 2} \HighlightStep[3]{\item Here is another version of Navier-Stokes equation} \stopitemize \StopSteps \StartSteps[Navier||Stokes equation] \placeformula[eq:incompressibility] \startformula \vec\nabla\cdot\vec u = 0 \stopformula \placeformula[eq:NS] \startformula \frac{D\vec u}{Dt} = \FromStep[2][reserve]{-{\red \frac1\rho \vec\nabla p}} \FromStep[3][reserve]{+\;{\green \vec g}} \FromStep[4][reserve]{+\;{\blue \frac1\rho \vec\nabla\cdot S}} \stopformula Momentum transport: \NextStep \item {\red Pressure gradient} \par\NextStep \item {\green Gravity} \par\NextStep \item {\blue Stress (viscous, turbulent, Maxwell)} \StopSteps \StartSteps[Navier Stokes equation] \placeformula[eq:div-nul] \startformula \vec\nabla\cdot\vec u = 0 \stopformula \placeformula[eq:NStokes] \startformula { \partial u \over \partial t} - \Delta u \FromStep[1][reserve]{{\red \; +\; (u\cdot \nabla)u}} \FromStep[2][reserve]{{\green \; +\; \nabla p}} \FromStep[3][reserve]{{\blue \; =\; f(t,x)}} \stopformula Comments: \NextStep \item Nonlinear equation (same is true for equation (\in[eq:NS]) \par\NextStep \item One should add initial conditions \par\NextStep \item and boundary conditions \StopSteps \stoptext --Apple-Mail-19-544729275 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 13 mai 2011, at 02:13, Jeong Dalyoung wrote: > Dear all, >=20 > I'd like to show the following formula line by line in a = presentation, > For example,=20 > \startformula\startalign > \NC T(4) \NC =3D T(3) + 4 \NR > \NC \NC=3D T(2) + 3 + 4 \NR > \NC \NC=3D T(1) + 2 + 3 + 4 \NR > \NC \NC=3D 1 + 2 + 3 + 4 =3D 10 \NR > \stopalign\stopformula >=20 >=20 > I tried to use \StartSteps and \StopSteps but not succeed. >=20 > \starttext > \usemodule[pre-60] >=20 > \StartSteps > \startformula\startalign > \NC T(4) \NC =3D T(3) + 4 \NR\FlushStep %(nor \FlushStep\NR) > \NC \NC=3D T(2) + 3 + 4 \NR\FlushStep > \NC \NC=3D T(1) + 2 + 3 + 4 \NR\FlushStep > \NC \NC=3D 1 + 2 + 3 + 4 =3D 10 \NR\FlushStep > \stopalign\stopformula > \StopSteps >=20 > \stoptext >=20 > Is there a way to do so? >=20 > Thank you. >=20 > Best regards, >=20 > Dalyoung > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail-19-544729275 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 ___________________________________________________________________________________ --Apple-Mail-19-544729275--