[tex-eplain] pause?

=?macintosh?Q?G=8Erald_Tenenbaum?= gtenenb at free.fr
Sat May 30 02:08:27 CEST 2009


Ë (At) 21:25 -0300 28/05/09, Jim Diamond Žcrivait (wrote)Ê:
>On Fri, May 29, 2009 at 01:15 (+0200), GŽrald Tenenbaum wrote:
>
>>  Hello,
>
>>  Is there a way, with eplain, to define a macro, say \pause with the
>>  following effect:
>
>>  \pause first develops as \vfill\eject
>>  but after pressing some key (ideally the space bar or the next arrow key)
>>  on the key board, the command \vfill\eject is hidden.
>
>>  Such a macro would be very convenient for lectures when you want to hide
>>  part of the displayed page.
>>  Regards,
>
>GŽrald,
>
>If I understand what you want...
>
>If you don't mind messing with the output routines, here is something
>I have used this with plain, and I don't know whether it will play
>nicely with eplain.  If eplain has its own output routine, you might
>be able to merge these changes in.
>
>I have used it a fair bit, and it works for my uses, but if you find a
>way to break it I won't be shocked.
>
>Here is the general idea of how your page looks
>
>%------------------------------------------------
>
>... some stuff ...
>
>\showpage
>
>more stuff...
>
>\showpage
>
>yet more stuff...
>
>< Whatever you do to do    \vfill\eject >
>
>%------------------------------------------------
>
>In this case, you will get three actual pages in the dvi or pdf file.
>The first one will have "some stuff", the second will have both "some
>stuff" and "more stuff", and so on.
>
>\relax
>\def\makeatletter{\catcode`\@11\relax}
>\def\makeatother{\catcode`\@12\relax}
>
>\makeatletter
>
>\newbox\mypageb at x
>\def\mypagec at ntents{%
>     \ifvoid\topins\else\unvcopy\topins\fi
>     \global\setbox\mypageb at x=\vbox{\unvcopy\@cclv}%
>     \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255
>     \ifvoid\footins\else % footnote info is present
>         \vskip\skip\footins
>         \footnoterule
>         \unvcopy\footins\fi
>     \ifr at ggedbottom \kern-\dimen@ \vfil \fi
>}
>
>\def\showpage{%
>     \bgroup
>         \let\pagecontents=\mypagec at ntents
>         % Need a \vfill to do The Usual Thing
>         \vfill\eject
>         \unvbox\mypageb at x
>     \egroup
>     % Get rid of the \vfill above (this must be outside the group)
>     \unskip
>     \advance\pageno by -1
>}
>
>\makeatother
>
>
>Cheers.
>				Jim

Jim,

Many thanks this is exactly what I want!
I tested it and it works beautifully with eplain.
It's a very nice peace of work.
Thank you so much.
With all best wishes,

GŽrald


More information about the tex-eplain mailing list