diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-01 20:34:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-01 20:34:25 +0000 |
commit | 79e8ce24cb29fe2305051970182871069e3bf24f (patch) | |
tree | 8a4e9ab87be041783f550494d1b6d5c093788f47 /Master/texmf-dist/source | |
parent | 57474fddbf7f54e5c8464724564f3d5e160d11f5 (diff) |
pdfoverlay (1nov21)
git-svn-id: svn://tug.org/texlive/trunk@60923 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.dtx | 29 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pdfoverlay/pdfoverlay.ins | 2 |
2 files changed, 16 insertions, 15 deletions
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 <dcpurton@marshwiggle.net> +Copyright (c) 2018-2021 David Purton <dcpurton@marshwiggle.net> This work may be distributed and/or modified under the conditions of the LaTeX Project2 Public License, either version 1.3c of this license |