summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/handout/handout.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/handout/handout.sty')
-rw-r--r--Master/texmf-dist/tex/latex/handout/handout.sty31
1 files changed, 19 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/handout/handout.sty b/Master/texmf-dist/tex/latex/handout/handout.sty
index ae947b845e3..3431b2ea531 100644
--- a/Master/texmf-dist/tex/latex/handout/handout.sty
+++ b/Master/texmf-dist/tex/latex/handout/handout.sty
@@ -13,11 +13,14 @@
% The Current Maintainer of this work is Maïeul Rouquette
% This work consists of the files handout.sty and example and documentation files.
-\ProvidesPackage{handout}[2014/05/23 1.0.1 Handout package]
+\ProvidesPackage{handout}[2014/12/15 1.1.0 Handout package]
\RequirePackage{kvoptions,etoolbox}
% Options
\DeclareBoolOption[false]{disabled}
+\let\disablehandout\handout@disabledtrue
+\let\enablehandout\handout@disabledfalse
+
\DeclareBoolOption[false]{numbering}
\DeclareBoolOption[false]{sectioning}
@@ -51,7 +54,9 @@
\newcommand{\nothandout}[1]{#1}
\newcommand{\onlyhandout}[1]{}
\newcommand{\forhandout}[1]{%
- \immediate\write\@handout{\noexpand #1}%
+ \ifhandout@disabled\else%
+ \immediate\write\@handout{\noexpand #1}%
+ \fi%
}
% The command written in the .handout file
@@ -67,20 +72,22 @@
\ifhandout@sectioning%Only if needed by option
\apptocmd{\@sect}{%
- \immediate\write\@handout{\string\csuse{#1}{\unexpanded{#8}}}%
+ \ifhandout@disabled\else%
+ \immediate\write\@handout{\string\csuse{#1}{\unexpanded{#8}}}%
+ \fi%
}{}{\handout@warning{Can't patch sectioning commands}}
\fi
% Call the handout file at the end, if need
-\ifhandout@disabled\else
-
- \AtEndDocument{%
- \immediate\closeout\@handout%
- \before@handout%
- \ifdef{\beforehandout}{\beforehandout}{\handout@warning{No command defined to be run before handout}}
- \input\jobname.handout%
- }
-\fi
+
+\AtEndDocument{%
+ \ifhandout@disabled\else
+ \immediate\closeout\@handout%
+ \before@handout%
+ \ifdef{\beforehandout}{\beforehandout}{\handout@warning{No command defined to be run before handout}}
+ \input\jobname.handout%
+ \fi
+}
% Standard command before handout
\newcommand{\before@handout}{%