chiark / gitweb /
slowbox.dtx: Add a demonstration.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 7 Sep 2020 15:39:56 +0000 (16:39 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 7 Sep 2020 16:36:44 +0000 (17:36 +0100)
Also a test.

slowbox.dtx

index a2c390944ccd0571c025fa155fc04fff4ae21a96..5129a61ec0a2d0d3f696e240ec5497cc69a5f2d2 100644 (file)
@@ -56,6 +56,7 @@
 %
 %<*driver>
 \input{mdwtools}
 %
 %<*driver>
 \input{mdwtools}
+\PassOptionsToPackage{hide}{slowbox}
 \describespackage{slowbox}
 \newcommand\opt[1]{\textsf{#1}}
 \def\*{\hspace{0pt plus 0.1pt}\ignorespaces}
 \describespackage{slowbox}
 \newcommand\opt[1]{\textsf{#1}}
 \def\*{\hspace{0pt plus 0.1pt}\ignorespaces}
 % before, it always typesets the box contents, and saves the measurements for
 % later.
 %
 % before, it always typesets the box contents, and saves the measurements for
 % later.
 %
+% \begin{demo}{Slow boxes}
+%\newcommand{\pic}
+%  {\parbox[t]{20mm}
+%     {Just pretend that there's a picture
+%      here that would take aaaages to draw.}}
+%--
+%\begin{slowbox*}{show}
+%  \pic
+%\end{slowbox*}
+%--
+%\begin{slowbox}{hide}
+%  \pic
+%\end{slowbox}
+%--
+% \end{demo}
+%
 % \DescribeMacro\slowboxbegin
 % \DescribeMacro\slowboxend
 % It's useful to define your own commands environments which create slow
 % \DescribeMacro\slowboxbegin
 % \DescribeMacro\slowboxend
 % It's useful to define your own commands environments which create slow