From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16933 Path: main.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: \presentationstep Date: Wed, 3 Nov 2004 09:35:00 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Trace: sea.gmane.org 1099471027 18087 80.91.229.6 (3 Nov 2004 08:37:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2004 08:37:07 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 03 09:36:54 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CPGdS-0000Da-00 for ; Wed, 03 Nov 2004 09:36:54 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B3CE512772; Wed, 3 Nov 2004 09:36:53 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28816-01; Wed, 3 Nov 2004 09:36:53 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C34D61277B; Wed, 3 Nov 2004 09:35:09 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6B6EA1277B for ; Wed, 3 Nov 2004 09:35:08 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28682-03-3 for ; Wed, 3 Nov 2004 09:35:07 +0100 (CET) Original-Received: from mwinf0912.wanadoo.fr (unknown [193.252.22.22]) by ronja.ntg.nl (Postfix) with ESMTP id AF25912772 for ; Wed, 3 Nov 2004 09:35:07 +0100 (CET) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0912.wanadoo.fr (SMTP Server) with SMTP id 68E6B180010F for ; Wed, 3 Nov 2004 09:35:07 +0100 (CET) Original-Received: from postfix.math.uvsq.fr (AMontsouris-151-1-9-24.w82-123.abo.wanadoo.fr [82.123.134.24]) by mwinf0912.wanadoo.fr (SMTP Server) with ESMTP id 8CBBE1800159 for ; Wed, 3 Nov 2004 09:35:06 +0100 (CET) Original-Received: from [10.0.1.7] (localhost [127.0.0.1]) by postfix.math.uvsq.fr (Postfix) with ESMTP id B87952F9D1D for ; Wed, 3 Nov 2004 09:35:04 +0100 (CET) X-Sender: otared@pop.wanadoo.fr Original-To: mailing list for ConTeXt users X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16933 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16933 At 18:38 -0500 2/11/04, David Munger wrote: > >I think the latest Acrobat Reader version for Linux is 5.0.9. I guess >this means I should forget about steps. Thanks anyway. > >David > Hi David, A few months ago I had to use steps in my presentations, but since I could not use thouroughly s-pre-60.tex (and the examples given in s-pre-61.tex) I ended up writing a few macros which work fine with ConTeXt and the presentation modules. These macros are very elementary and crude, but they work... If I succeed to learn how to use layers smartly as does Hans, I will write these macros again. :-) Below are the macros and some examples. Best regards: OK %%%%%%%%%%%% begin test-step-ok.tex %%K test-step-ok.tex %%K Here we use the plain \TeX\ command \phantom{} in order to have %%K some material appear step by step. %%K The structure is quite simple, but since I am not very %%K familiar with ConTeXt, I cannot write elegant code as does %%K Hans Hagen... %%K %%K An advantage is that the code can be used also in %%K plain TeX, in LaTeX and other macro-packages. %%K \newif\ifSteppingSlide \SteppingSlidetrue %%K this is when you want a step by step presentation %\SteppingSlidefalse %%K this is when you want to print the slides % \newcount\StepsCounter \StepsCounter=0 % \newcount\NumberOfSteps \NumberOfSteps=10 % \newcount\BeforeStepNumber \BeforeStepNumber=0 % %%K StepBetween[number1,number2]{material} will make "material" %%K appear between steps "number1" and "number2" \def\StepBetween[#1,#2]#3{% \ifSteppingSlide \ifnum#1>\StepsCounter \phantom{#3} \else \ifnum#2<\StepsCounter \phantom{#3} \else \relax #3 \fi \fi \else {#3} \fi} % %%K Step{number1}{material} will make "material" %%K appear beginning with step "number1" until "NumberOfSteps" \def\Step#1#2{\StepBetween[#1,\NumberOfSteps]{#2}} % %%K OnlyStep{number1}{material} will make "material" %%K appear only on step "number1" \def\OnlyStep#1#2{\StepBetween[#1,#1]{#2}} % %%K StepBefore{number1}{material} will make "material" %%K appear only on all steps before "number1" \def\StepBefore#1#2{ \global\BeforeStepNumber=#1 \StepBetween[0,\BeforeStepNumber]{#2}} % \long\def\SlideWithSteps#1#2{ \ifSteppingSlide \global\StepsCounter=0 \global\NumberOfSteps=#1 \MakeSteps{#2} \else #2 \fi} % \long\def\MakeSteps#1{\loop #1 \ifnum\StepsCounter<\NumberOfSteps \global\advance\StepsCounter by 1\vfill\eject \repeat \vfill\eject} % %%K This is the end of the macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \endinput %%K Here is a sample of how you can use these macros %%K \starttext \startitemize \SlideWithSteps{8}{ \item Consider the following nonlinear equation: $$\Step{8}{{\partial u \over \partial t}} \Step{1}{-\Delta u + |u|^{p-1}u} \Step{2}{=} \Step{3}{f} \Step{4}{+{\rm div}(g)} \Step{5}{+|\nabla u|{\Step{6}{^2}}}$$ \StepBetween[3,5]{\item This line appears only between steps 3 and 5} \Step{8}{\item The equation may be parabolic.} \StepBefore{4}{\item This line appears only before step 4.} \OnlyStep{4}{\item This line appears only at step 4.} \vfill (Here you see step number \the\StepsCounter) } % end of \SlideWithSteps \stopitemize \page \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%