From 86b66441c6a9beb50462a4afe5daff114d70b0f8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 29 Jan 2019 22:13:34 +0000 Subject: apxproof (29jan19) git-svn-id: svn://tug.org/texlive/trunk@49865 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/apxproof/Makefile | 20 +++++++ .../texmf-dist/source/latex/apxproof/apxproof.dtx | 63 ++++++++++++++-------- 2 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 Master/texmf-dist/source/latex/apxproof/Makefile (limited to 'Master/texmf-dist/source/latex/apxproof') diff --git a/Master/texmf-dist/source/latex/apxproof/Makefile b/Master/texmf-dist/source/latex/apxproof/Makefile new file mode 100644 index 00000000000..d24336a7d7c --- /dev/null +++ b/Master/texmf-dist/source/latex/apxproof/Makefile @@ -0,0 +1,20 @@ +all: apxproof.pdf apxproof.sty + +clean: + -rm -f *.aux *.log *.gl? *.idx *.ilg *.fls *.ind *.axp *.bbl *.blg *.hd *.out + +ctan: + git archive --format zip master --prefix=apxproof/ --output apxproof.zip + +%.pdf: %.dtx %.sty + pdflatex $< + makeindex -s gind.ist $(patsubst %.pdf,%.idx,$@) + makeindex -s gglo.ist -o $(patsubst %.pdf,%.gls,$@) $(patsubst %.pdf,%.glo,$@) + bibtex $(patsubst %.pdf,%,$@) + bibtex bu1 + pdflatex $< + pdflatex $< + +%.sty: %.ins %.dtx + -rm $@ + latex $< diff --git a/Master/texmf-dist/source/latex/apxproof/apxproof.dtx b/Master/texmf-dist/source/latex/apxproof/apxproof.dtx index 9c7bdb81c2c..25de2a7dcb2 100644 --- a/Master/texmf-dist/source/latex/apxproof/apxproof.dtx +++ b/Master/texmf-dist/source/latex/apxproof/apxproof.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2016-2018 by Pierre Senellart +% Copyright (C) 2016-2019 by Pierre Senellart % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -24,7 +24,7 @@ % \iffalse %\NeedsTeXFormat{LaTeX2e}[2005/12/01] %\ProvidesPackage{apxproof} -% [2018/08/08 v1.1.0 Automatic proofs in appendix] +% [2019/01/28 v1.1.1 Automatic proofs in appendix] % %<*driver> \documentclass{ltxdoc} @@ -45,7 +45,7 @@ % % \fi % -% \CheckSum{716} +% \CheckSum{729} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -448,9 +448,6 @@ This is a citation in the appendix~\cite{proofsAreHard}. % \item |appendixproof|, |proof|, |toappendix| environments cannot be nested. This is a limitation of % the \textsf{fancyvrb} package that \textsf{apxproof} relies on. Note % the existence of the |nestedproof| environment for nested proofs. -% \item \textsf{apxproof} is incompatible with a separate use of the -% \textsf{fancyvrb} package. This is because \textsf{apxproof} redefines -% some internal mechanisms of \textsf{fancyvrb}. % \item \textsf{apxproof} poorly interacts with Sync\TeX: identifying % which source line has produced which box does not work for appendix % content managed by \textsf{apxproof} or repeated theorems. No obvious @@ -460,7 +457,7 @@ This is a citation in the appendix~\cite{proofsAreHard}. % Issues not listed here should be reported to the author. % % \section{License} -% Copyright \textcopyright{} 2016--2018 by Pierre Senellart. +% Copyright \textcopyright{} 2016--2019 by Pierre Senellart. % % This work may be distributed and/or modified under the conditions of the % \LaTeX{} Project Public License, either version 1.3 of this license or (at @@ -885,16 +882,37 @@ This is a citation in the appendix~\cite{proofsAreHard}. % \end{macrocode} % \end{macro} % \end{environment} -% \begin{macro}{\FVB@VerbatimOut} -% \begin{macro}{\FVE@VerbatimOut} -% We modify the internal behavior of the \textsf{fancyvrb} package to -% write to the |\axp@proofsfile|, without closing it and re-opening it -% on every write. -% \begin{macrocode} - \def\FVB@VerbatimOut{% +% \begin{macro}{\axp@unactivateeightbit} +% \changes{v1.1.0-dev}{2019/01/28}{Fix compilation of non-ASCII +% characters with \texttt{\textbackslash usepackage[utf8]\{inputenc\}}} +% We need an auxiliary macro to disable active characters that have the +% high bit set when writing to the |.axp| file. See +% \url{https://tex.stackexchange.com/a/145361/166858} +% \begin{macrocode} + \def\axp@unactivateeightbit{% + \count@=128% + \loop + \catcode\count@=12% + \ifnum\count@<255% + \advance\count@\@ne + \repeat} +% \end{macrocode} +% \end{macro} +% \begin{environment}{axp@VerbatimOut} +% \begin{macro}{\FVB@axp@VerbatimOut} +% \begin{macro}{\FVE@axp@VerbatimOut} +% \changes{v1.1.0-dev}{2018/10/02}{Make \textsf{apxproof} compatible with +% independent use of \textsf{fancyvrb}} +% Using the functionalities of the \textsf{fancyvrb} package, we define a +% custom verbatim environment |axp@VerbatimOut| that writes every line +% to the |\axp@proofsfile|. We also use the previous macro to disable active +% characters with the eighth bit set. +% \begin{macrocode} + \DefineVerbatimEnvironment{axp@VerbatimOut}{axp@VerbatimOut}{} + \def\FVB@axp@VerbatimOut{% \@bsphack \begingroup - \FV@UseKeyValues + \axp@unactivateeightbit \FV@DefineWhiteSpace \def\FV@Space{\space}% \FV@DefineTabOut @@ -902,17 +920,18 @@ This is a citation in the appendix~\cite{proofsAreHard}. \let\FV@FontScanPrep\relax \let\@noligs\relax \FV@Scan} - \def\FVE@VerbatimOut{\endgroup\@esphack} -% \end{macrocode} -% \end{macro} + \def\FVE@axp@VerbatimOut{\endgroup\@esphack} +% \end{macrocode} +% \end{macro} % \end{macro} +% \end{environment} % \begin{environment}{toappendix} % The entire content of this environment is put in appendix, % starting a new appendix section beforehand if needed. % \begin{macrocode} \newenvironment{toappendix} - {\axp@writesection\VerbatimOut} - {\endVerbatimOut} + {\axp@writesection\axp@VerbatimOut} + {\endaxp@VerbatimOut} % \end{macrocode} % \end{environment} % \subsubsection{Definition of New Theorems} @@ -1150,10 +1169,10 @@ This is a citation in the appendix~\cite{proofsAreHard}. \immediate\write\axp@proofsfile{% \noexpand\begin{axp@oldproof}% }% - \VerbatimOut + \axp@VerbatimOut } {% - \endVerbatimOut + \endaxp@VerbatimOut \immediate\write\axp@proofsfile{% \noexpand\end{axp@oldproof}% }% -- cgit v1.2.3