diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-10 22:20:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-10 22:20:13 +0000 |
commit | 23023f7f597d32093136b854d157773aa6ccbe06 (patch) | |
tree | 2f83111e02c06541f68333c963789b281daa0cd3 /Master/texmf-dist/source/latex/answers | |
parent | 89b1e5bd32239fb16c2f42b9ac734c24e48a806f (diff) |
answers (10aug14)
git-svn-id: svn://tug.org/texlive/trunk@34892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/answers')
-rw-r--r-- | Master/texmf-dist/source/latex/answers/answers.dtx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/answers/answers.dtx b/Master/texmf-dist/source/latex/answers/answers.dtx index a9563da67ad..a3a3e27fb00 100644 --- a/Master/texmf-dist/source/latex/answers/answers.dtx +++ b/Master/texmf-dist/source/latex/answers/answers.dtx @@ -9,7 +9,7 @@ % % Originally developed by Mike Piff % Copyright (C) 1990,1994-1996 by Mike Piff -% Copyright (C) 2009-2010 by +% Copyright (C) 2009-2010,2014 by % Joseph Wright <joseph.wright@morningstar2.co.uk> % % This file may be distributed and/or modified under the conditions of @@ -24,7 +24,7 @@ % % \fi % -% \CheckSum{247} +% \CheckSum{267} % % \changes{2.0}{1994/03/25}{First version for LaTeX2e} % \changes{2.01}{1994/03/30}{Whoops! |ProvidesPackage{answers}|, @@ -47,6 +47,7 @@ % \changes{2.12}{2009/09/16}{License change to LPPL} % \changes{2.12}{2009/09/16}{New maintainer} % \changes{2.13}{2010/10/11}{Make hyperlinks to solutions work correctly} +% \changes{2.14}{2014/08/08}{Use a protected write for creating output files} % % % \title{Production of solution sheets in \LaTeXe} @@ -378,7 +379,7 @@ % Announce the package name and its version: % \begin{macrocode} \ProvidesPackage{answers} - [2010/10/11 v2.13 Production of solution sheets in LaTeX2e] + [2014/08/08 v2.14 Production of solution sheets in LaTeX2e] % \end{macrocode} % % \section{Options} @@ -402,6 +403,26 @@ \RequirePackage{verbatim} % \end{macrocode} % +% \begin{macro}{\protected@iwrite} +% An immediate version of \cs{protected@write}: not available in the +% kernel but needed for safety. +% \begin{macrocode} +\long\def\protected@iwrite#1#2#3{% + \begingroup + \let\thepage\relax + #2% + \let\protect\@unexpandable@protect + \edef \reserved@a{\immediate\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak + \ifvmode + \nobreak + \fi + \fi +} +% \end{macrocode} +% \end{macro} % % \section{File handling} % @@ -451,7 +472,7 @@ {% \let\protect\string \Ifanswerfiles{% - \immediate\write\@nameuse{#1@file}{#2}% + \protected@iwrite\@nameuse{#1@file}{#2}% }{}% }% }{}% |