diff options
author | Karl Berry <karl@freefriends.org> | 2015-01-07 22:55:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-01-07 22:55:21 +0000 |
commit | bea41f5e2c2a13912cb3e946f8939964e5dd5857 (patch) | |
tree | 01e9271973e4aafa1fa81a14e92ae8228819dba9 /Master/texmf-dist/tex | |
parent | e9fbb4ed6dce2e5d9b76bb70d72d9c575da9d5a6 (diff) |
handout (7jan15)
git-svn-id: svn://tug.org/texlive/trunk@35986 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/handout/handout.sty | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/handout/handout.sty b/Master/texmf-dist/tex/latex/handout/handout.sty index 3431b2ea531..41655ac69cc 100644 --- a/Master/texmf-dist/tex/latex/handout/handout.sty +++ b/Master/texmf-dist/tex/latex/handout/handout.sty @@ -13,7 +13,7 @@ % 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/12/15 1.1.0 Handout package] +\ProvidesPackage{handout}[2015/01/06 1.2.0 Handout package] \RequirePackage{kvoptions,etoolbox} % Options @@ -24,6 +24,8 @@ \DeclareBoolOption[false]{numbering} \DeclareBoolOption[false]{sectioning} +\DeclareBoolOption[true]{printing} + \DeclareStringOption[.]{dir} \ProcessKeyvalOptions* @@ -43,7 +45,9 @@ \stepcounter{handoutnumber}% \handoutnumberintxt{\thehandoutnumber}% \fi% - \immediate\write\@handout {\string\csuse{handout@input}{#1}}% + \ifhandout@printing% + \immediate\write\@handout {\string\handout@input{#1}}% + \fi% \fi% \input{\handout@dir/#1}% Add the handout } @@ -55,7 +59,9 @@ \newcommand{\onlyhandout}[1]{} \newcommand{\forhandout}[1]{% \ifhandout@disabled\else% - \immediate\write\@handout{\noexpand #1}% + \ifhandout@printing% + \immediate\write\@handout{\noexpand #1}% + \fi% \fi% } @@ -73,7 +79,9 @@ \apptocmd{\@sect}{% \ifhandout@disabled\else% - \immediate\write\@handout{\string\csuse{#1}{\unexpanded{#8}}}% + \ifhandout@printing% + \immediate\write\@handout{\string\csuse{#1}{\unexpanded{#8}}}% + \fi% \fi% }{}{\handout@warning{Can't patch sectioning commands}} @@ -81,12 +89,16 @@ % Call the handout file at the end, if need \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 + \ifhandout@printing% + \ifhandout@disabled\else + \immediate\closeout\@handout% + \before@handout% + \ifdef{\beforehandout}{\beforehandout}{\handout@warning{No command defined to be run before handout}} + \makeatletter% + \input\jobname.handout% + \makeatother% + \fi% + \fi% } % Standard command before handout |