Re: Stepwise

Stephan Lehmke <[email protected]> Thu, 27 Mar 2003 18:20:34 +0100 (MET)
Newsgroups gmane.comp.tex.texpower.user
Message-ID <[email protected]>
Agustín E. Bolzán wrote on Thu, 27 Mar 2003 09:37:32 -0300:
>
>i.e., I would like to indicate the actual text by putting
>it in bold face and a finger pointing to it. Once we move to
>the next statement, the text should remain in the standard
>color and face but with a checkmark, indicating that it is
>OK. What I find is that the first happens without problems
>but the is no checkmark after moving to the next step. Am I
>doing something wrong or missed something in the way?

\activatestep is used only on first activation anyway.

For this purpose, you should hook into \displaystep:

\newcommand{\mydisplay}[1]
{%
  {%
    \ifthenelse{\boolean{firstactivation}}
    {\color{blue}{\Huge\Pisymbol{pzd}{42}}\bfseries}
    {{\Huge\color{yellow}\Pisymbol{pzd}{51}}}%
    #1%
  }%
}

\stepwise[\let\hidestepcontents=\hidedimmed\let\displaystepcontents=\mydisplay]
{%
  \step{test}

  \step{foo}

  \step{bar}
}

But I find this a bit too `dynamic': Things are jumping around
badly. What about

\newcommand{\mydisplay}[1]
{%
  {%
    \ifthenelse{\boolean{firstactivation}}
    
{\color{blue}{\leavevmode\vphantom{\Huge\Pisymbol{pzd}{51}}\Huge\Pisymbol{pzd}{4
2}}\bfseries}
    
{\makebox[\widthof{\Huge\Pisymbol{pzd}{42}}]{\Huge\color{yellow}\Pisymbol{pzd}{5
1}}}%
    #1%
  }%
}

\newcommand{\myhide}{\leavevmode\vphantom{\Huge\Pisymbol{pzd}{51}}\phantom{\Huge
\Pisymbol{pzd}{42}}\hidedimmed}

\stepwise[\let\hidestepcontents=\myhide\let\displaystepcontents=\mydisplay]

Looks a bit jumbled, for sure...

Probably one could do this a bit more systematic ;-)



>
>By the way; i also tried to define a
>\newenvironment{stepitemize} following the examples of
>texpower, but the results were worse (good indication of my
>capacity in mastering texpower).


Maybe like this:

\def\mystep
{%
  \switch
  
{\def\labelitemi{\vphantom{\Huge\Pisymbol{pzd}{51}}}\mdseries\dimcolors\color{te
xtcolor}}
  {%
    \ifthenelse{\boolean{firstactivation}}
    
{\def\labelitemi{\vphantom{\Huge\Pisymbol{pzd}{51}}\color{blue}\Huge\Pisymbol{pz
d}{42}}\bfseries}
    {\def\labelitemi{\Huge\color{yellow}\Pisymbol{pzd}{51}}}%
  }%
}%

\newenvironment{stepitemize}
{%
  \begin{itemize}
    \let\origitem=\item
    \renewcommand{\item}{\mystep\origitem}%
  }
  {%
  \end{itemize}
}

\liststepwise
{%
  \begin{stepitemize}
  \item test
    
  \item foo
    
  \item bar
  \end{stepitemize}
}


regards
Stephan

-- 
  Stephan Lehmke     		 [email protected]
  Fachbereich Informatik, LS I	 Tel. +49 231 755 6434 
  Universitaet Dortmund		 FAX 		  6555
  D-44221 Dortmund, Germany             



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en