Re: prosper style files
Peter Møller Neergaard <[email protected]>
| Newsgroups | gmane.comp.tex.latex.prosper.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 09, 2003 at 08:07:24PM +0100, Diana Galletly wrote:
> I'm preparing a presentation using the prosper extensions to the LaTeX
> seminar class. For reasons best known only to myself in my more deluded
> moments, I decided I didn't like any of the basic template styles and
> that I'd prefer to write my own. My problem is that I'd like the first
> page (titlepage, basically) to have an entirely different look to the rest of
> the pages. But I don't know how to tell the style to "do X if it's the
> first page, else do Y"; I've generally managed to avoid digging around
> too much in LaTeX/TeX internals up until now, so any pointers would be
> gratefully received ...
Though prosper does not maintain a page counter, TeX's counter 0 keeps
track of the number of the output page. You can therefore test
whether this counter is 1 to see whether you are on the first page.
This is achieved with the following macro \iffirstslide{...}{...}:
\makeatletter
\newcommand{\iffirstslide}{%
\ifnum\the\count0=1\relax%
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
\makeatother
The use of \expandafter and \relax is used to avoid messing with other
TeX conditionals.
A quick illustration is the following:
\newcommand{\slidetest}{\iffirstslide{first}{rest}}
\begin{document}
\overlays{3}{%
\begin{slide}{Foo}
\slidetest
\end{slide}}
\begin{slide}{Bar}
\slidetest
\end{slide}
I hope this works.
/Peter
--
http://www.linearity.org/turtle/contact.html
``If we're an arrogant nation, they'll resent us.
If we're a humble nation but strong, they'll welcome us.''--George W. Bush
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.