diff options
author | Karl Berry <karl@freefriends.org> | 2014-12-15 22:38:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-12-15 22:38:58 +0000 |
commit | ade183f85a77d940bb5e7c38dbe0d5ffbd025858 (patch) | |
tree | 7d83cc7d98b7403b42719174d42978e519a62fb0 /Master/texmf-dist/tex/latex/handout | |
parent | 01d6be75dbb4b3d42fd1076315469a432172627b (diff) |
handout (15dec14)
git-svn-id: svn://tug.org/texlive/trunk@35834 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/handout')
-rw-r--r-- | Master/texmf-dist/tex/latex/handout/handout.sty | 31 |
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}{% |