From 79e8ce24cb29fe2305051970182871069e3bf24f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 1 Nov 2021 20:34:25 +0000 Subject: pdfoverlay (1nov21) git-svn-id: svn://tug.org/texlive/trunk@60923 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/pdfoverlay/pdfoverlay.pdf | Bin 547326 -> 579134 bytes .../source/latex/pdfoverlay/pdfoverlay.dtx | 29 +++++++++++---------- .../source/latex/pdfoverlay/pdfoverlay.ins | 2 +- .../texmf-dist/tex/latex/pdfoverlay/pdfoverlay.sty | 26 +++++++++--------- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Master/texmf-dist/doc/latex/pdfoverlay/pdfoverlay.pdf b/Master/texmf-dist/doc/latex/pdfoverlay/pdfoverlay.pdf index 0be43b9f9e7..fc25f7bd7e1 100644 Binary files a/Master/texmf-dist/doc/latex/pdfoverlay/pdfoverlay.pdf and b/Master/texmf-dist/doc/latex/pdfoverlay/pdfoverlay.pdf differ diff --git a/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.dtx b/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.dtx index 82fb0e35e31..1ae9d9ded00 100644 --- a/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.dtx +++ b/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.dtx @@ -22,10 +22,11 @@ % \changes{v1.1}{2019/11/03}{Fix deprecated macros} % \changes{v1.2}{2020/10/29}{Update to use \pkg{l3hooks}} % \changes{v1.2a}{2021/02/25}{Ensure backend loaded before counting pages} +% \changes{v1.2b}{2021/11/01}{Protect unexpandable macros} % % \title{The \pkg{pdfoverlay} package} % \author{David Purton\thanks{Email: \url{dcpurton@marshwiggle.net}}} -% \date{2021/02/25 v1.2a} +% \date{2021/11/01 v1.2b} % % \maketitle % @@ -164,7 +165,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[2020-10-01] -\ProvidesExplPackage{pdfoverlay}{2021/02/25}{1.2a} +\ProvidesExplPackage{pdfoverlay}{2021/11/01}{1.2b} {Overlay text on an existing PDF document (DCP)} % \end{macrocode} % @@ -322,7 +323,7 @@ % Main function to output the current page of the PDF file. This is called % before every page is shipped using the \texttt{shipout/background} hook. % \begin{macrocode} -\cs_new:Nn \@@_output_pdf_page: +\cs_new_protected:Nn \@@_output_pdf_page: { % \end{macrocode} % Check if we are currently outputting pages, a PDF file has been set, and @@ -361,7 +362,7 @@ % Format the PDF page with options from \cs{g_@@_graphics_options_clist} and % place it in \cs{g_@@_pdf_page_coffin}. % \begin{macrocode} -\cs_new:Nn \@@_format_pdf_page: +\cs_new_protected:Nn \@@_format_pdf_page: { \hcoffin_gset:Nn \g_@@_pdf_page_coffin { @@ -409,7 +410,7 @@ % with \cs{pdfoverlay_set_pdf} then \cs{g_@@_pdf_page_count_int} is set to % zero. % \begin{macrocode} -\cs_new:Nn \@@_count_pdf_pages: +\cs_new_protected:Nn \@@_count_pdf_pages: { \int_gzero:N \g_@@_page_count_int \str_if_empty:NTF \g_@@_pdf_file_name_str @@ -467,7 +468,7 @@ % Check if a PDF file has been set and the requested page is valid. If not, % generate suitable error messages. % \begin{macrocode} -\prg_new_conditional:Npnn \@@_if_page_exists:n #1 { p, T, F, TF } +\prg_new_conditional:Nnn \@@_if_page_exists:n { p, T, F, TF } { \str_if_empty:NTF \g_@@_pdf_file_name_str { @@ -500,7 +501,7 @@ % \begin{macro}{\pdfoverlay_set_pdf:n} % Specify a PDF file to overlay text on to. % \begin{macrocode} -\cs_new:Npn \pdfoverlay_set_pdf:n #1 +\cs_new_protected:Nn \pdfoverlay_set_pdf:n { % \end{macrocode} % Test if the file exists and generate a suitable error if it doesn't. @@ -532,7 +533,7 @@ % \texttt{page} option is appended automatically in the % correct format. % \begin{macrocode} -\cs_new:Nn \pdfoverlay_set_graphics_options:n +\cs_new_protected:Nn \pdfoverlay_set_graphics_options:n { \clist_gset:Nn \g_@@_graphics_options_clist { #1 } \clist_gput_right:Nn \g_@@_graphics_options_clist @@ -549,7 +550,7 @@ % \texttt{shipout/background} hook, we just insert the required number of % blank pages into the document. % \begin{macrocode} -\cs_new:Npn \pdfoverlay_include_to_page:n #1 +\cs_new_protected:Nn \pdfoverlay_include_to_page:n { % \end{macrocode} % Check if a PDF file is set and the requested page exists. @@ -606,7 +607,7 @@ % \begin{macro}{\pdfoverlay_include_to_last_page:} % Output all remaining pages in the PDF file. % \begin{macrocode} -\cs_new:Nn \pdfoverlay_include_to_last_page: +\cs_new_protected:Nn \pdfoverlay_include_to_last_page: { \pdfoverlay_include_to_page:n { \g_@@_page_count_int } } @@ -616,8 +617,8 @@ % \begin{macro}{\pdfoverlay_skip_to_page:n} % Skip to the specified page number in the PDF file. % \begin{macrocode} -\cs_new:Npn \pdfoverlay_skip_to_page:n #1 - { +\cs_new_protected:Nn \pdfoverlay_skip_to_page:n + { \@@_if_page_exists:nT { #1 } { % \end{macrocode} @@ -645,7 +646,7 @@ % \begin{macro}{\pdfoverlay_pause_output:} % Pause outputting pages from the PDF file. % \begin{macrocode} -\cs_new:Nn \pdfoverlay_pause_output: +\cs_new_protected:Nn \pdfoverlay_pause_output: { \bool_gset_false:N \g_@@_output_active_bool } @@ -655,7 +656,7 @@ % \begin{macro}{\pdfoverlay_resume_output:} % Resume outputting pages from the PDF file. % \begin{macrocode} -\cs_new:Nn \pdfoverlay_resume_output: +\cs_new_protected:Nn \pdfoverlay_resume_output: { \bool_gset_true:N \g_@@_output_active_bool } diff --git a/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.ins b/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.ins index bca23246841..9ed5fedbb4e 100644 --- a/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.ins +++ b/Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.ins @@ -19,7 +19,7 @@ version 2005/12/01 or later. This is a generated file. -Copyright (c) 2018-2020 David Purton +Copyright (c) 2018-2021 David Purton This work may be distributed and/or modified under the conditions of the LaTeX Project2 Public License, either version 1.3c of this license diff --git a/Master/texmf-dist/tex/latex/pdfoverlay/pdfoverlay.sty b/Master/texmf-dist/tex/latex/pdfoverlay/pdfoverlay.sty index 93750543a9a..afc108a3a50 100644 --- a/Master/texmf-dist/tex/latex/pdfoverlay/pdfoverlay.sty +++ b/Master/texmf-dist/tex/latex/pdfoverlay/pdfoverlay.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (c) 2018-2020 David Purton +%% Copyright (c) 2018-2021 David Purton %% %% This work may be distributed and/or modified under the conditions of %% the LaTeX Project2 Public License, either version 1.3c of this license @@ -25,7 +25,7 @@ %% and the derived files pdfoverlay.sty and pdfoverlay.pdf %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] -\ProvidesExplPackage{pdfoverlay}{2021/02/25}{1.2a} +\ProvidesExplPackage{pdfoverlay}{2021/11/01}{1.2b} {Overlay text on an existing PDF document (DCP)} \RequirePackage{graphicx} \AddToHook { shipout/background } { \__pdfoverlay_output_pdf_page: } @@ -74,7 +74,7 @@ page = \int_use:N \g__pdfoverlay_page_int } \coffin_new:N \g__pdfoverlay_pdf_page_coffin -\cs_new:Nn \__pdfoverlay_output_pdf_page: +\cs_new_protected:Nn \__pdfoverlay_output_pdf_page: { \bool_lazy_all:nT { @@ -92,7 +92,7 @@ \bool_gset_false:N \g__pdfoverlay_action_pending_bool } } -\cs_new:Nn \__pdfoverlay_format_pdf_page: +\cs_new_protected:Nn \__pdfoverlay_format_pdf_page: { \hcoffin_gset:Nn \g__pdfoverlay_pdf_page_coffin { @@ -112,7 +112,7 @@ { hc } { vc } { 0pt } { 0pt } } } -\cs_new:Nn \__pdfoverlay_count_pdf_pages: +\cs_new_protected:Nn \__pdfoverlay_count_pdf_pages: { \int_gzero:N \g__pdfoverlay_page_count_int \str_if_empty:NTF \g__pdfoverlay_pdf_file_name_str @@ -163,7 +163,7 @@ } } } -\prg_new_conditional:Npnn \__pdfoverlay_if_page_exists:n #1 { p, T, F, TF } +\prg_new_conditional:Nnn \__pdfoverlay_if_page_exists:n { p, T, F, TF } { \str_if_empty:NTF \g__pdfoverlay_pdf_file_name_str { @@ -187,7 +187,7 @@ } } } -\cs_new:Npn \pdfoverlay_set_pdf:n #1 +\cs_new_protected:Nn \pdfoverlay_set_pdf:n { \file_if_exist:nTF { #1 } { @@ -201,7 +201,7 @@ \msg_error:nnn { pdfoverlay } { file-not-found } { #1 } } } -\cs_new:Nn \pdfoverlay_set_graphics_options:n +\cs_new_protected:Nn \pdfoverlay_set_graphics_options:n { \clist_gset:Nn \g__pdfoverlay_graphics_options_clist { #1 } \clist_gput_right:Nn \g__pdfoverlay_graphics_options_clist @@ -209,7 +209,7 @@ page = \int_use:N \g__pdfoverlay_page_int } } -\cs_new:Npn \pdfoverlay_include_to_page:n #1 +\cs_new_protected:Nn \pdfoverlay_include_to_page:n { \__pdfoverlay_if_page_exists:nT { #1 } { @@ -244,11 +244,11 @@ } } } -\cs_new:Nn \pdfoverlay_include_to_last_page: +\cs_new_protected:Nn \pdfoverlay_include_to_last_page: { \pdfoverlay_include_to_page:n { \g__pdfoverlay_page_count_int } } -\cs_new:Npn \pdfoverlay_skip_to_page:n #1 +\cs_new_protected:Nn \pdfoverlay_skip_to_page:n { \__pdfoverlay_if_page_exists:nT { #1 } { @@ -261,11 +261,11 @@ \bool_gset_true:N \g__pdfoverlay_action_pending_bool } } -\cs_new:Nn \pdfoverlay_pause_output: +\cs_new_protected:Nn \pdfoverlay_pause_output: { \bool_gset_false:N \g__pdfoverlay_output_active_bool } -\cs_new:Nn \pdfoverlay_resume_output: +\cs_new_protected:Nn \pdfoverlay_resume_output: { \bool_gset_true:N \g__pdfoverlay_output_active_bool } -- cgit v1.2.3