%% %% 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 2023 Phelype Oleinik /phelype.oleinik@latex-project.org/ %% Paulo Cereda /cereda.paulo@gmail.com/ %% samcarter /sam.carter8@aol.com/ %% Ulrike Fischer /fischer@troubleshooting-tex.de/ %% %% 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{2024-07-23} \def\sillypageVersion{1.7} \ProvidesExplPackage {sillypage} {\sillypageDate} {\sillypageVersion} {The silly walk as page numbering style} \RequirePackage{graphicx} \newcommand*\silly@steps{12} \newcommand*\silly@height{.8cm} \newcommand*\silly@picture{sillywalk-map.pdf} \NewDocumentCommand \silly { m } { \exp_args:Nv \__silly_step:n { c@#1 } } \NewDocumentCommand \sillystep { m } { \__silly_step:n {#1} } \newcommand*\@silly { \__silly_step:n } \cs_new:Npn \__silly_step:n #1 { \UseTaggingSocket{__silly/begin}{#1} \SuspendTagging{__silly} \__silly_step_aux:eN { \int_eval:n { \int_mod:nn { #1-1 } { \silly@steps } +1 } } \c_false_bool \ResumeTagging{__silly} \UseTaggingSocket{__silly/end} } \NewDocumentCommand \sillynumeral { m } { \__silly_numeral:n {#1} } \newcommand*\@sillynumeral { \__silly_numeral:n } \cs_new:Npn \__silly_numeral:n #1 { \UseTaggingSocket{__silly/begin}{#1} \SuspendTagging{__silly} \exp_args:Ne \str_map_function:nN { \int_to_base:nn {#1} { 12 } } \__silly_numeral_aux:n \ResumeTagging{__silly} \UseTaggingSocket{__silly/end} } \cs_new:Npn \__silly_numeral_aux:n #1 { \__silly_step_aux:eN { "\char_uppercase:N #1+1 } \c_true_bool } \NewSocket{tagsupport/__silly/begin}{1} \NewSocket{tagsupport/__silly/end}{0} \NewSocketPlug{tagsupport/__silly/begin}{tagged} { \mode_leave_vertical: \tag_mc_end_push: \tag_struct_begin:n {tag=Span} \tag_mc_begin:n {actualtext=#1} } \NewSocketPlug{tagsupport/__silly/end}{tagged} { \tag_mc_end: \tag_struct_end: \tag_mc_begin_pop:n{} } \AssignSocketPlug{tagsupport/__silly/begin}{tagged} \AssignSocketPlug{tagsupport/__silly/end}{tagged} \cs_new:Npn \__silly_step_aux:nN #1 #2 { \cs_if_exist_use:cF { texorpdfstring } { \use_i:nn } { \__silly_trim_step:nN {#1} #2 } {#1} } \cs_generate_variant:Nn \__silly_step_aux:nN { e } \cs_new:Npn \__silly_trim_step:nN #1 #2 { \exp_args:Nee \@@silly@place@picture@@nn { \bool_if:NT #2 { trim = \int_case:nn {#1} { { 1 } { 57 ~ 0 ~ 42 ~ 0 } { 2 } { 59 ~ 0 ~ 29 ~ 0 } { 3 } { 53 ~ 0 ~ 21 ~ 0 } { 4 } { 62 ~ 0 ~ 11 ~ 0 } { 5 } { 50 ~ 0 ~ 8 ~ 0 } { 6 } { 33 ~ 0 ~ 27 ~ 0 } { 7 } { 45 ~ 0 ~ 13 ~ 0 } { 8 } { 56 ~ 0 ~ 27 ~ 0 } { 9 } { 38 ~ 0 ~ 12 ~ 0 } { 10 } { 7 ~ 0 ~ 43 ~ 0 } { 11 } { 33 ~ 0 ~ 33 ~ 0 } { 12 } { 57 ~ 0 ~ 7 ~ 0 } } , clip } } { \int_eval:n {#1} } } \DeclareRobustCommand \@@silly@place@picture@@nn [2] { \includegraphics [ #1, page=#2, height=\silly@height ] { \silly@picture } } \AtBeginDocument { \cs_if_exist_use:NF \pdfstringdefDisableCommands { \use_none:n } { \cs_set:Npn \@@silly@place@picture@@nn #1 #2 {#2} } } \DeclareHookRule { begindocument } { sillypage } { after } { hyperref } %% %% This work is "maintained" (as per the LPPL maintenance status) %% by Phelype Oleinik, Paulo Cereda, samcarter and Ulrike Fischer. %% %% 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'.