Re: stepdescription?
"Hans F. Nordhaug" <[email protected]> Tue, 22 Mar 2005 09:07:32 +0100
| Newsgroups | gmane.comp.tex.texpower.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 15, 2005 at 02:57:17PM +0100, Prof. Dr. Jobst Hoffmann wrote:
> Dear texpower-users,
[cut]
> to get a dimmed list with highlighted items. Now I wanted to do the same
> trick for a stepdescription-environment.
[cut]
> Every thing works fine, but the contents of the brackets - the arguments
> of item - come out all on the same place near of the slide's bottom. Is
> there anybody with a hint?
The problem is how you define \mystep - which you didn't include.
I have two solutions:
1) Straight forward - by using the "\NOT" line you get the opposite.
----
\documentclass{article}
\usepackage[lightbackground,display]{texpower}
\def\mystep{\usecolorset{stwcolors}%
\dstep[][\boolean{firstactivation}]%
% \dstep[][\NOT\boolean{firstactivation}]%
}%
\newenvironment{stepdescription}{%
\begin{description}
\let\origitem=\item
\renewcommand{\item}{\mystep\origitem}%
}{\end{description}}
\begin{document}
\stepwise*{
\begin{stepdescription}
\item[Something] some
\item[Another thing] another
\item[Yet another thing] yet another
\end{stepdescription}
}
\end{document}
----
2) Using functions from tplists.sty (which is part of texpower)
----
\documentclass{article}
\usepackage[lightbackground,display]{texpower}
\usepackage{tplists}
\makeatletter
\newenvironment{flipdescription}{%
\tpl@collect@body\@flipdescription%
}{\global\@ignoretrue}
\newcommand\@flipdescription[1]{%
\@fliplist{description}{#1}}
\makeatother
\begin{document}
\begin{flipdescription}
\item[Something] some
\item[Another thing] another
\item[Yet another thing] yet another
\end{flipdescription}
\end{document}
----
The benefit of using tplists is that you don't have to surround the
environment with \stepwise. tplists.sty defines step/dim/flip
enviroments for several standard env - like itemize, enumerate and so
on. (Read the header of the file.) Should I also include the same for
the description environment in the next release of TeXPower?
Sorry for the late replay.
Hans - wishing everyone on the list a Happy Easter!
--
Associate professor Hans F. Nordhaug
Department of Informatics, Molde University College
<http://home.himolde.no/~nordhaug/english.php>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click