summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sillypage/sillypage.sty
blob: 5bfb15ddb1c55e78759e5cf852d587456b25a6c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%%
%% This is file `sillypage.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sillypage.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright 2022 Phelype Oleinik /phelype.oleinik@latex-project.org/
%%                Paulo Cereda /cereda.paulo@gmail.com/
%%                samcarter /sam.carter8@aol.com/
%% 
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
%% your option) any later version. The latest version of this license is in
%% 
%%     http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%% 
\def\sillypageDate{2022-01-20}
\def\sillypageVersion{1.3}
\ProvidesPackage{sillypage}[\sillypageDate\space\sillypageVersion\space
  The silly walk as page numbering style]
\RequirePackage{graphicx}
\newcommand*\silly[1]{\expandafter\@silly\csname c@#1\endcsname}
\newcommand*\sillystep[1]{\@silly{#1}}
\newcommand*\@silly[1]{\expandafter\@silly@walk
  \expandafter{\number\numexpr#1\relax}}
\newcommand*\silly@steps{12}%
\newcommand*\silly@height{.8cm}%
\newcommand*\silly@picture{sillywalk-map.pdf}%
\def\@silly@walk#1{%
  \@ifundefined{texorpdfstring}{\@firstoftwo}{\texorpdfstring}%
    {\@silly@walk@{#1}}% TeX
    {#1}}% pdf string
\def\@silly@walk@#1{%
  \ifnum#1>\silly@steps\space
    \expandafter\@silly@walk@\expandafter
      {\number\numexpr#1-\silly@steps\expandafter}%
  \else
    \includegraphics[height=\silly@height,page=#1]{\silly@picture}%
  \fi}
%% 
%% This work is "maintained" (as per the LPPL maintenance status)
%% by Phelype Oleinik, Paulo Cereda and samcarter.
%% 
%% This work consists of the files sillypage.dtx, and
%%                                 sillypage.ins,
%% and the derived files           sillypage.sty,
%%                                 sillypage.pdf,
%%                                 sillywalk-map.pdf, and
%%                                 README.md.
%%
%% End of file `sillypage.sty'.