Skip to content

Commit

Permalink
Merge pull request #14 from duetosymmetry/hotfix/everypage-1x
Browse files Browse the repository at this point in the history
Hotfix: old installs don't have everypage-1x, use everypage
  • Loading branch information
mcnees authored Mar 20, 2021
2 parents fbf86e1 + cdd7b2e commit 68762a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions gridpapers.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
%</driver>
% \fi
%
% \CheckSum{430}
% \CheckSum{432}
%
% \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
Expand All @@ -70,6 +70,8 @@
%
%
% \changes{v1.0.0}{2021/03/13}{Converted to DTX file}
% \changes{v1.0.1}{2021/03/19}{Hotfix: old installs don't have
% everypage-1x, use everypage}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
Expand Down Expand Up @@ -242,7 +244,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{gridpapers}
[2021/03/14 v1.0.0 Graph paper backgrounds]
[2021/03/19 v1.0.1 Graph paper backgrounds]

\RequirePackage{xkeyval}
\RequirePackage{kvoptions}
Expand All @@ -254,7 +256,10 @@
%% approach, but fall back to everypage-1x if needed
%% This code is roughly taken from the new everypage code
\@ifundefined{AddToHook}{%
\RequirePackage{everypage-1x}
\IfFileExists{everypage-1x.sty}{%
%% If everypage is new enough to complain, avoid the complaints
\RequirePackage{everypage-1x}
}{\RequirePackage{everypage}}
}{%
\newcommand*{\AddEverypageHook}[1]{%
\AddToHook{shipout/background}{\put(1in,-1in){#1}}}
Expand Down
7 changes: 5 additions & 2 deletions gridpapers.sty
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{gridpapers}
[2021/03/14 v1.0.0 Graph paper backgrounds]
[2021/03/19 v1.0.1 Graph paper backgrounds]

\RequirePackage{xkeyval}
\RequirePackage{kvoptions}
Expand All @@ -33,7 +33,10 @@
%% approach, but fall back to everypage-1x if needed
%% This code is roughly taken from the new everypage code
\@ifundefined{AddToHook}{%
\RequirePackage{everypage-1x}
\IfFileExists{everypage-1x.sty}{%
%% If everypage is new enough to complain, avoid the complaints
\RequirePackage{everypage-1x}
}{\RequirePackage{everypage}}
}{%
\newcommand*{\AddEverypageHook}[1]{%
\AddToHook{shipout/background}{\put(1in,-1in){#1}}}
Expand Down

0 comments on commit 68762a7

Please sign in to comment.