Re: [NTG-context] \presentationstep

2004-11-10 Thread David Munger
Otared Kavian wrote :
 Hi David and all ConTeXters,
 
 I was away from my e-mail so I am late in answering.
 Thank you for the file you put on your site. Indeed everything works 
 as intended (the \placeformula no longer advances with each step), 
 and I think one may suggest to Hans to include this in future 
 distributions.
 
 However, in the spirit of ConTeXters who are always asking for a 
 step(!) towards perfectness, I let you know the following drawbacks 
 of the macros:
 
 1) Somehow the \FromStep[n][reserve] changes the internal mechanism 
 of glue or spaces in displayed formulas. So one needs (as you do in 
 your example) to add \; around operators such as +, -, =. Can one 
 avoid this?

I'm sorry, I'm no TeX/ConTeXt guru and I really have no idea of how to
achieve this. I think now we need Hans' help.

I have indeed noticed that enclosing an operator between braces breaks
the spacing system. Try, for instance:

\startformula
   \vec\nabla\cdot\vec u = 0
\stopformula
\startformula
   \vec\nabla\cdot\vec u {=} 0
\stopformula

Unfortunately, using \phatom{=} results in the same broken spacing as
second formula.

 2) When one refers (see example below) with the command (\in[eq:NS]) 
 to an equation which has been introduced with \placeformula[eq:NS] 
 the interaction makes appear the first instance of that formula, 
 which may be incomplete. Could one have a control over this, that is 
 for instance, in this particular case, make appear the completed 
 equation at the end of the slide made with \StartSteps[Navier||Stokes 
 equation]?

Good point! Here's the fix (file updated on my website):

37c37
   \dodoubleempty\doplaceformula[##1]}
---
   \dodoubleempty\doplaceformula}
50c50,54
   \dodoubleempty\doplaceformula[1]}
---
   [EMAIL PROTECTED]@number%
 [EMAIL PROTECTED]
   \else
 [EMAIL PROTECTED]
   [EMAIL PROTECTED]

Now we got rid of the duplicate label warnings. I also added your
contribution to the usage example. Thank you.

Regards,

David

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-10 Thread Hans Hagen
David Munger wrote:
I'm sorry, I'm no TeX/ConTeXt guru and I really have no idea of how to
achieve this. I think now we need Hans' help.
I haven't followed the discussion so closely, what is the problem?
Good point! Here's the fix (file updated on my website):
37c37
   \dodoubleempty\doplaceformula[##1]}
---
 \dodoubleempty\doplaceformula}
50c50,54
   \dodoubleempty\doplaceformula[1]}
---
 [EMAIL PROTECTED]@number%
   [EMAIL PROTECTED]
 \else
   [EMAIL PROTECTED]
 [EMAIL PROTECTED]
eh ... are you redefining low level macros?
Can you give a minimal example of what you're doing?
Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-10 Thread David Munger
Hans Hagen wrote :
 David Munger wrote:
 
  I'm sorry, I'm no TeX/ConTeXt guru and I really have no idea of how to
  achieve this. I think now we need Hans' help.
 
 I haven't followed the discussion so closely, what is the problem?

We're trying to implement steps-without-JavaScript for slides. You can
get the module here:

http://cfd.homelinux.org/tex/

The current problem, in its simplest form, is that using \mframed breaks
the spacing. Minimal example:

\starttext
We aim to get this spacing:
\startformula
a + b
\stopformula
but when using:
\startformula
a \mframed{+ b}
\stopformula
we get the same broken spacing as in:
\startformula
a {+ b}
\stopformula
\stoptext

 eh ... are you redefining low level macros?

I'd never dare to... ;-) Just overriding \placeformula within
\begingroup/\endgroup to mangle the formula numbers.


Thank you,

David

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-10 Thread Otared Kavian
At 12:08 -0500 10/11/04, David Munger wrote:
I'm sorry, I'm no TeX/ConTeXt guru and I really have no idea of how to
achieve this. I think now we need Hans' help.
I have indeed noticed that enclosing an operator between braces breaks
the spacing system. Try, for instance:
Yes you are right! This is a problem with ConTeXt. I am going to post 
a message for the gurus as you say.

Good point! Here's the fix (file updated on my website):
That's great! Everything works as expected.
But let's see, are you sure you are not a guru? I doubt now...
Best regards: OK
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-10 Thread Otared Kavian
At 19:25 +0100 10/11/04, Vit Zyka wrote:
Hi Otared,
I can give only explanation but in the moment i do not know the 
automatic solution.
Hi Vit,
Thank you for your insight. It is right that the same problem appears 
in Plain TeX, that is a binary operator within a pair of braces seems 
to loose its binary property.

I tried the sample file I sent in the thread bug with glue and 
spaces in formulas?, with other macros packages and the result is 
the same.

Best regards: OK
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-08 Thread Otared Kavian
At 19:57 -0500 7/11/04, David Munger wrote:
Oh sorry for not being clear about it. I was assuming that some
presentation module would be imported, for instance:
\usemodule[pre-original]
So probably there lacks a \page command in your \Subject definition.
About the \[ and \]: you're right. I was using the amsl module from
Giuseppe Bilotta.
Thanks for your remarks. :-)
So, assuming that the steps code is in a file name t-rsteps.tex, the
complete example would be:
--
\usemodule [pre-original]
\usemodule [rsteps]
Hi David,
Thanks for the details. Indeed I get now what is expected from your 
macros, and as a matter of fact the result is much much better than 
that of my crude macros... You did a great improvement!
So I am going to use yours from now on: thanks again!

If I can suggest a possible improvement to the t-rsteps.tex macros, 
it is the following:
When one uses these macros with an automatic numbering such as 
\placeformula[equation-reference] (see the example below), with each 
invocation of \page (that is a step) the number increases, and this 
is an unwanted side result. Would it possible to freeze the 
numbering procedure in such a way that the number doesn't change in 
each step? (When I was using my macros, I didn't use \placeformula in 
sildes with steps, but rather an old \leqno from plain TeX).

Best regards: OK
%%% example steps-david-2.tex
\usemodule [pre-original]
\usemodule [rsteps]
\starttext
\StartSteps[Slide Title]   % the title is passed to
   % the \Subject macro defined in pre-original
\startitemize
\FromStep[1] {\item {\bf Lemma. } {\it For any $u,v \in H$, a Hilbert 
space, we have the following Cauchy-Schwarz inequality\/}
\placeformula[Cauchy-Schwarz]
\startformula
|(u|v)| \leq \Vert u\Vert \cdot \Vert v \Vert.
\stopformula}

\FromStep[2] {\item {\bf Proof. } Consider $f(t):= (u+tv|u+tv)$ for 
$t\in {\Bbb C}$.}

\FromStep[3]{\item We have $f(t) \geq 0$ for all $t\in {\Bbb C}$.}
\stopitemize
\StopSteps
\stoptext
%% end example steps-david-2.tex
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-08 Thread David Munger
Otared Kavian wrote :
 Hi David,
 
 Thanks for the details. Indeed I get now what is expected from your 
 macros, and as a matter of fact the result is much much better than 
 that of my crude macros... You did a great improvement!
 So I am going to use yours from now on: thanks again!
 
 If I can suggest a possible improvement to the t-rsteps.tex macros, 
 it is the following:
 When one uses these macros with an automatic numbering such as 
 \placeformula[equation-reference] (see the example below), with each 
 invocation of \page (that is a step) the number increases, and this 
 is an unwanted side result. Would it possible to freeze the 
 numbering procedure in such a way that the number doesn't change in 
 each step? (When I was using my macros, I didn't use \placeformula in 
 sildes with steps, but rather an old \leqno from plain TeX).

Excellent idea indeed! Here's the fix. It is obviously not optimal,
though it allows for multiple formula numbers on the same slide. Try it
with:
texexec --pdf --mode=demo t-rsteps

Thanks for your advice.

David



%D \module
%D   [  file=t-rsteps,
%Dversion=2004.11.08,
%D  title=\CONTEXT\ User Module,
%D   subtitle=Raw steps for slides,
%D author=David Munger,
%D   date=\currentdate,
%D  copyright={David Munger}]

% Thanks to Otared Kavian whose work inspired this module,
% and who contributed to its development.



% steps for slides


\unprotect

\newif\ifUseSteps
\UseStepstrue
% \UseStepsfalse

\definecolor [highlightcolor] [blue]

\long\def\StartSteps[#1]#2\StopSteps{%
  \begingroup%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \ifUseSteps%
%%%
%% Workaround to make formula numbers stick
\def\placeformula[##1]{%
  \incrementnumber[formula]%
  \expandafter\xdef\csname [EMAIL PROTECTED]
\endcsname{\rawnumber[formula]}
  \expandafter\xdef\csname [EMAIL PROTECTED]
\endcsname{\rawnumber[formula]}
  \dodoubleempty\doplaceformula[##1]}
%%%
\loop%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@stopstep%
  [EMAIL PROTECTED]@autocounter%
[EMAIL PROTECTED][EMAIL PROTECTED]
  [EMAIL PROTECTED]
  %%%
  %% Workaround to make formula numbers stick
  \def\placeformula[1]{%
\setnumber[formula]{\csname [EMAIL PROTECTED]
\setfalse\incrementformulanumber%
\dodoubleempty\doplaceformula[1]}
  %%%
\repeat%
  \else%
[EMAIL PROTECTED]@stopstep%
  \fi%
  \endgroup}

[EMAIL PROTECTED]@startstep}

\def\OnlyStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@counter=#1}%
  [EMAIL PROTECTED]

\def\FromStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \increment([EMAIL PROTECTED],#1-1)%
  [EMAIL PROTECTED]@counter[EMAIL PROTECTED]
  [EMAIL PROTECTED]

\def\AfterStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@counter#1}%
  [EMAIL PROTECTED]

\def\UntilStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@counter#1}%
  [EMAIL PROTECTED]

\def\HighlightStep[#1]#2{%
  {\UntilStep[#1]{#2}\OnlyStep[#1]{\highlightcolor
#2}\AfterStep[#1]{#2}}}


%%
% internal macros
%%

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

[EMAIL PROTECTED]
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \ifUseSteps%
[EMAIL PROTECTED][EMAIL PROTECTED]
  [EMAIL PROTECTED]
\fi%
  \fi%
  \starthidden}

[EMAIL PROTECTED]

[EMAIL PROTECTED]@number#1%
  [EMAIL PROTECTED]
  \doglobal\increment([EMAIL PROTECTED],#1)\fi}

\defineframedtext
  [EMAIL PROTECTED]
  [offset=overlay,width=broad,height=fit,frame=off]

[EMAIL PROTECTED]@hide]}
[EMAIL PROTECTED]


[EMAIL PROTECTED]
  \processallactionsinset
[#1]
[   reserve=[EMAIL PROTECTED]@dostepreserve,
\s!default=[EMAIL PROTECTED]@dostepnoreserve]
  [EMAIL PROTECTED]

[EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \ifUseSteps%
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
\fi%
  \fi%
  \ifmmode\expandafter\mframed\else\expandafter\framed\fi%
  [EMAIL PROTECTED],frame=off,offset=overlay]{#1}%
  \ifmmode\;\fi}

[EMAIL PROTECTED]
  [EMAIL PROTECTED];\fi}%
  \ifUseSteps%
[EMAIL PROTECTED]@next{\relax}\fi%
  [EMAIL PROTECTED]

\protect

\doifnotmode{demo}{\endinput}

%
% usage example
%

\usemodule [pre-original]
\usemodule [rsteps]

\starttext
\StartSteps[Slide Title]   % the title is passed to
   % the \Subject macro

\startitemize
\item Item 1
\OnlyStep[2]  {\item (oops!)}
\UntilStep[4] {\item Item 2*}
\FromStep[4]  {\item Item 2}
\stopitemize

\StopSteps


Re: [NTG-context] \presentationstep

2004-11-08 Thread Otared Kavian
At 13:01 -0500 8/11/04, David Munger wrote:
Excellent idea indeed! Here's the fix. It is obviously not optimal,
though it allows for multiple formula numbers on the same slide. Try it
with:
texexec --pdf --mode=demo t-rsteps
Thanks for your advice.
Hi David,
I could not get through the example file: here is what I get:
% begin error report:
! Missing number, treated as zero.
to be read again
   [EMAIL PROTECTED]:incompressibility
\setcounter ...ame #1\endcsname {\the \numexpr (#2
  )}
\placeformula ...\csname [EMAIL PROTECTED] }
  \setfalse \incrementformul...
\@@plnbody ...\placeformula [eq:incompressibility]
   \startformula \vec \nabla...
\@@plniterate -\@@plnbody
   \expandafter \@@plniterate \else \fi
\StartSteps ...y \doplaceformula [1]} \repeat
  \else \Subject {#1}\par \s...
l.41 \StopSteps
  
?
Process aborted
% end error report
I tried also the short example I sent you today, 
but I get the same result. Is there a 
transmission error in your file? (I should say 
that everything is fine if one doesn't have a 
\placeformula).

Finally, if I am not being too demanding, at the 
end of t-rsteps.tex, in your example of how to 
use the command (for the user's convenience) 
could you please incude all the possibilities of 
using the Step commands? that is instances of:

\OnlyStep[1]{\item something}
\FromStep[2]{\item something}
\AfterStep[3]{\item something}
\UntilStep[4]{\item something}
\HighlightStep[5]{\item something}
\NextStep[1]{\item something}
(Actually it seems that there is also a problem with \NextStep)
Best regards: OK
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-08 Thread David Munger
Otared Kavian wrote :
 Hi David,
 
 I could not get through the example file: here is what I get:


Argh... It's because of the line splits in email. I just put the file on
my website:

http://cfd.homelinux.org/tex/


Regards,

David

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-07 Thread Otared Kavian
At 3:07 -0500 6/11/04, David Munger wrote:
Hi all,
Inspiring from Otared Kavian's code and Han's presentation styles with
support for steps, I cooked the following in order to solve the non
JavaScript version issue. I post it in case it could be useful to other
people.
This implementation supports an \{Only|From|Until}Step[n] syntax as well
as the simple \NextStep-style one.
Otared: Any comments or suggestions?
And here is an example of usage:
---
\StartSteps[Slide Title]   % the title is passed to
   % the \Subject macro
Hi David, Hi all Contexters,
Sorry for being late in answering.
I just tried to test your code but did not succeed in showing things 
step by step, even after adding:
\def\Subject#1{\centerline{\bf #1}}
\setuppapersize [S6][S6]
\setupcolors[state=start]
and changing the commands \[ and \] (which are probably from a LaTeX 
background) into \startformula and \stopformula.

What I get doesn't show any step, but only one or two pages with 
several Slide Title, and the items you had in your example, on it, 
and one or two pages with Navier-Stokes equation.

Am I missing something? Could you please send me (if necessary off 
List) a source file of yours which is completely working?

Best regards: OK
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-07 Thread David Munger
Otared Kavian wrote :
 Hi David, Hi all Contexters,
 
 Sorry for being late in answering.
 
 I just tried to test your code but did not succeed in showing things 
 step by step, even after adding:
 \def\Subject#1{\centerline{\bf #1}}
 \setuppapersize [S6][S6]
 \setupcolors[state=start]
 and changing the commands \[ and \] (which are probably from a LaTeX 
 background) into \startformula and \stopformula.
 
 What I get doesn't show any step, but only one or two pages with 
 several Slide Title, and the items you had in your example, on it, 
 and one or two pages with Navier-Stokes equation.
 
 Am I missing something? Could you please send me (if necessary off 
 List) a source file of yours which is completely working?
 
 Best regards: OK

Oh sorry for not being clear about it. I was assuming that some
presentation module would be imported, for instance:
\usemodule[pre-original]

So probably there lacks a \page command in your \Subject definition.

About the \[ and \]: you're right. I was using the amsl module from
Giuseppe Bilotta.

Thanks for your remarks. :-)


So, assuming that the steps code is in a file name t-rsteps.tex, the
complete example would be:

--

\usemodule [pre-original]
\usemodule [rsteps]

\starttext
\StartSteps[Slide Title]   % the title is passed to
   % the \Subject macro

\startitemize
\item Item 1
\OnlyStep[2]  {\item (oops!)}
\UntilStep[4] {\item Item 2*}
\FromStep[4]  {\item Item 2}
\stopitemize

\StopSteps

\StartSteps[Navier||Stokes equation]

\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
\stoptext

--


___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-06 Thread David Munger
Hi all,

Inspiring from Otared Kavian's code and Han's presentation styles with
support for steps, I cooked the following in order to solve the non
JavaScript version issue. I post it in case it could be useful to other
people.

This implementation supports an \{Only|From|Until}Step[n] syntax as well
as the simple \NextStep-style one.

Otared: Any comments or suggestions?

And here is an example of usage:

---
\StartSteps[Slide Title]   % the title is passed to
   % the \Subject macro

\startitemize
\item Item 1
\OnlyStep[2]  {\item (oops!)}
\UntilStep[4] {\item Item 2*}
\FromStep[4]  {\item Item 2}
\stopitemize

\StopSteps
---

And here is a mixed example:

---
\StartSteps[Navier||Stokes equation]

\[
  \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 \div S}}
\]

Momentum transport: \NextStep
\item {\red   Pressure gradient}\par\NextStep
\item {\green Gravity}  \par\NextStep
\item {\blue  Stress (viscous, turbulent, Maxwell)}

\StopSteps
---

And here's the code:


% steps for slides


\unprotect

\newif\ifUseSteps
\UseStepstrue
% \UseStepsfalse


\long\def\StartSteps[#1]#2\StopSteps{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \ifUseSteps%
\loop%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@stopstep%
  [EMAIL PROTECTED]@autocounter%
[EMAIL PROTECTED][EMAIL PROTECTED]
  [EMAIL PROTECTED]
\repeat%
  \else%
[EMAIL PROTECTED]@stopstep%
  \fi}

[EMAIL PROTECTED]@startstep}

\def\OnlyStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@counter=#1}%
  [EMAIL PROTECTED]

\def\FromStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \increment([EMAIL PROTECTED],#1-1)%
  [EMAIL PROTECTED]@counter[EMAIL PROTECTED]
  [EMAIL PROTECTED]

\def\UntilStep[#1]{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@counter#1}%
  [EMAIL PROTECTED]



%%
% internal macros
%%

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

[EMAIL PROTECTED]
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \ifUseSteps%
[EMAIL PROTECTED][EMAIL PROTECTED]
  [EMAIL PROTECTED]
\fi%
  \fi%
  \starthidden}

[EMAIL PROTECTED]

[EMAIL PROTECTED]@number#1%
  [EMAIL PROTECTED]
  \doglobal\increment([EMAIL PROTECTED],#1)\fi}

\defineframedtext
  [EMAIL PROTECTED]
  [offset=overlay,width=broad,height=fit,frame=off]

[EMAIL PROTECTED]@hide]}
[EMAIL PROTECTED]


[EMAIL PROTECTED]
  \processallactionsinset
[#1]
[   reserve=[EMAIL PROTECTED]@dostepreserve,
\s!default=[EMAIL PROTECTED]@dostepnoreserve]
  [EMAIL PROTECTED]

[EMAIL PROTECTED]
  [EMAIL PROTECTED]
  \ifUseSteps%
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
\fi%
  \fi%
  \ifmmode\expandafter\mframed\else\expandafter\framed\fi%
  [EMAIL PROTECTED],frame=off,offset=overlay]{#1}%
  \ifmmode\;\fi}

[EMAIL PROTECTED]
  [EMAIL PROTECTED];\fi}%
  \ifUseSteps%
[EMAIL PROTECTED]@next{\relax}\fi%
  [EMAIL PROTECTED]

\protect



___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-03 Thread Otared Kavian
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

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-03 Thread David Munger
Hi Otared,

Thanks a lot for you macros. They do the job pretty well. They remind me
of the way Prosper does things. When I have time, I'll try to find out
how to Wiki your post. Thanks again!

David

Otared Kavian wrote :
 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
 
 ___
 ntg-context mailing list
 [EMAIL PROTECTED]
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-02 Thread Hans Hagen
Henning Hraban Ramm wrote:
Am 02.11.2004 um 07:04 schrieb David Munger:
Could someone tell me if I'm doing something bad here, please?
File test.tex
---
\usemodule[pre-original]
\starttext
\Subject{Test}
step 1
\presentationstep
step 2
\stoptext
---
texexec --mode=step --output=pdf test.tex
This gives me a white page instead of the text I get without
`--mode=step'.

You doesn't define a step mode, so there's no output.
Completely logical. What's the matter?
You can use --mode=something switch only for environments like
\startmode[something]
\stopmode[something]
\startnotmode[something]
\stopnotmode[something]
See the wiki:
http://contextgarden.net/Modes
But probably you're looking for:
http://contextgarden.net/Presentation_effects
another option is to use s-pre-60
Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-02 Thread David Munger
Nothing seems to work here. I'm afraid the problem is indeed that
Acrobat Reader under Linux is not really JavaScript aware...

Would it be possible to implement the steps commands such that steps
span over multiple slides instead of being managed by JavaScript?

David


Le mardi 02 novembre 2004  10:58 +0100, Hans Hagen a crit :
 Henning Hraban Ramm wrote:
 
  Am 02.11.2004 um 07:04 schrieb David Munger:
  
  Could someone tell me if I'm doing something bad here, please?
 
  File test.tex
  ---
  \usemodule[pre-original]
  \starttext
  \Subject{Test}
  step 1
  \presentationstep
  step 2
  \stoptext
  ---
  texexec --mode=step --output=pdf test.tex
 
  This gives me a white page instead of the text I get without
  `--mode=step'.
  
  
  You doesn't define a step mode, so there's no output.
  Completely logical. What's the matter?
  
  You can use --mode=something switch only for environments like
  \startmode[something]
  \stopmode[something]
  
  \startnotmode[something]
  \stopnotmode[something]
  
  See the wiki:
  http://contextgarden.net/Modes
  
  But probably you're looking for:
  http://contextgarden.net/Presentation_effects
 
 another option is to use s-pre-60
 
 Hans
 
 
 -
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
   | www.pragma-pod.nl
 -
 
 ___
 ntg-context mailing list
 [EMAIL PROTECTED]
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-02 Thread h h extern
David Munger wrote:
Nothing seems to work here. I'm afraid the problem is indeed that
Acrobat Reader under Linux is not really JavaScript aware...
Would it be possible to implement the steps commands such that steps
span over multiple slides instead of being managed by JavaScript?
try
texexec --pdf --mode=demo s-pre-61
and see if that one suit syour needs (the stepper can be used with other sytles 
as well, once \usemodule[pre-60] is done; acrobat 6 needed)

Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep in standard pdf format

2004-11-02 Thread Maurice Diamantini
Le 2 nov. 04, à 23:22, David Munger a écrit :
Nothing seems to work here. I'm afraid the problem is indeed that
Acrobat Reader under Linux is not really JavaScript aware...
Would it be possible to implement the steps commands such that steps
span over multiple slides instead of being managed by JavaScript?
David
I aggree with David that having the ConTeXt presentation feature
without needed javascript would realy be great.
Pdf is a standard, but not javascript.
It's realy nice to come to a seminar only with a pdf file without 
worrying about which pdf reader tool exists on the host computer.

- Even with acroread 6.02 on osx there is some problem with some button
  (I don't remember which problem, but I just remember it's not 
reliable);
- Also Preview, the fastest pdf reader on osx (provide by Apple, then
  the it is standard pdf reader on osx) don't support javascript;
- linux doesn't have pdf+javascript reader.

So I think that ConTeXt should provide a mean (option in textexec)
to make pdf-only version of presentation.
Finaly there could be three output levels for pdf presentation :
1 - presentation step using javascript (with allow blinking, merging,
zooming or other nice flashing features ;-)
2 - presentation step without javascript (one pdf page by step)
= Good format for presentation by foreign pdf reader
3 - pdf file one pdf page for each final step by page
= Good format for printing 2up or 4up slides
This third output would also allow to print a slide + comment
version of the presentation for the speacker.
The option of texexec could be something like
--pdfonly
instead of --pdf, or simply
--use-javascript=false
Maurice,
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \presentationstep

2004-11-01 Thread David Munger
Hi,

Could someone tell me if I'm doing something bad here, please?

File test.tex
---
\usemodule[pre-original]
\starttext
\Subject{Test}
step 1
\presentationstep
step 2
\stoptext
---
texexec --mode=step --output=pdf test.tex

This gives me a white page instead of the text I get without
`--mode=step'.

Thanks for any help,

David

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \presentationstep

2004-11-01 Thread Henning Hraban Ramm
Am 02.11.2004 um 07:04 schrieb David Munger:
Could someone tell me if I'm doing something bad here, please?
File test.tex
---
\usemodule[pre-original]
\starttext
\Subject{Test}
step 1
\presentationstep
step 2
\stoptext
---
texexec --mode=step --output=pdf test.tex
This gives me a white page instead of the text I get without
`--mode=step'.
You doesn't define a step mode, so there's no output.
Completely logical. What's the matter?
You can use --mode=something switch only for environments like
\startmode[something]
\stopmode[something]
\startnotmode[something]
\stopnotmode[something]
See the wiki:
http://contextgarden.net/Modes
But probably you're looking for:
http://contextgarden.net/Presentation_effects
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Presentationstep in pre-fuzzy

2003-09-26 Thread Shivkumar Chandrasekaran
Hi,

I have tried every combination of presentationstep and the NextStep 
button in pre-fuzzy presentation style, and nothing seems to work. I 
have the latest (ConTeXt  ver: 2003.9.25  fmt: 2003.9.26  int: english  
mes: english) running on Mac OS X (10.2.8) with Gierben Wierda's teTex 
distribution.

Can some one help me get presentationstep working in pre-fuzzy? Thanks,

--shiv--

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context