From e1c2f9c178270c5502cabfa209b37446c4e0fc1f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 23 May 2022 19:56:44 +0000 Subject: pdfpages (23may22) git-svn-id: svn://tug.org/texlive/trunk@63381 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/pdfpages/pdfpages.dtx | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx b/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx index 2deaa462065..1342d7ba424 100644 --- a/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx +++ b/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx @@ -27,12 +27,12 @@ %<*dtx> \makeatletter % -\def\AM@fileversion{v0.5u} +\def\AM@fileversion{v0.5v} \def\AM@Git@Date@process$#1: #2 #3${\AM@Git@Date@process@i#2\END} \def\AM@Git@Date@process@i#1-#2-#3\END{\def\AM@Git@Date{#1/#2/#3}} \def\AM@Git@SHA@process$#1: #2${\def\AM@Git@SHA{#2}} -\AM@Git@Date@process$Date: 2022-01-29 16:59:20 +0100 $ -\AM@Git@SHA@process$SHA-1: 7a5d1a24653fdc93c11ca1043f6d77a403446d92 $ +\AM@Git@Date@process$Date: 2022-05-22 20:11:16 +0200 $ +\AM@Git@SHA@process$SHA-1: 059ee4174cc52b0e6a4c834c1a9719bcf5a453b0 $ % % % @@ -1339,6 +1339,7 @@ \newcommand*{\AM@findfile@ii}[1]{% \ifx\AM@currentdocname\relax \PackageError{pdfpages}{Cannot find file `#1'}{}% + \let\AM@filenotfound\relax \fi } % \end{macrocode} @@ -1393,7 +1394,7 @@ \def\AM@pagecount{0}% }{% \AM@findfile{#2}% - \if\AM@threadname\relax + \ifx\AM@threadname\relax \def\AM@threadname{\AM@currentdocname}% \fi }% @@ -1481,8 +1482,17 @@ % \macro{\AM@output} % This is the main output routine used by |\includepdf| % and |\includepdfmerge|. +% Let's stop here if the PDF file doesn't exist and the user did not quit +% \LaTeX\ yet (which may result from `--interaction=scrollmode`). +% If we do not quit here, we might run into an infinite loop. % \begin{macrocode} -\newcommand{\AM@output}[1]{% +\newcommand\AM@output{% + \ifdefined\AM@filenotfound + \else + \expandafter\AM@output@i + \fi +} +\newcommand{\AM@output@i}[1]{% % \end{macrocode} % For the following calculations we need to know the page size. % But since we are still before |\newpage| we must not set |\paper{width,height}| @@ -4851,6 +4861,12 @@ % \item Adding |\leavevmode| before |\@chapter|,... in |addtotoc|. % Bug fix for \url{https://tex.stackexchange.com/questions/631514/}. % \end{itemize} +% +% \subsection*{2022/05/21 v0.5v} +% \begin{itemize} +% \item Do not enter an infinite loop if the PDF file doesn't exist. +% Bug fix for \url{https://tex.stackexchange.com/questions/644971/}. +% \end{itemize} % \Finale % % \iffalse -- cgit v1.2.3