| 1 |
%% |
| 2 |
%% This is file `rotchiffre.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% rotchiffre.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: rotchiffre |
| 12 |
%% Version: 2016/05/16 v1.1 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2010 Heiko Oberdiek |
| 16 |
%% 2016-2019 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/oberdiek/issues |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% The Base Interpreter refers to any `TeX-Format', |
| 36 |
%% because some files are installed in TDS:tex/generic//. |
| 37 |
%% |
| 38 |
%% This work consists of the main source file rotchiffre.dtx |
| 39 |
%% and the derived files |
| 40 |
%% rotchiffre.sty, rotchiffre.pdf, rotchiffre.ins, rotchiffre.drv, |
| 41 |
%% rotchiffre-test1.tex, rotchiffre-test2.tex. |
| 42 |
%% |
| 43 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 44 |
\catcode13=5 % ^^M |
| 45 |
\endlinechar=13 % |
| 46 |
\catcode35=6 % # |
| 47 |
\catcode39=12 % ' |
| 48 |
\catcode44=12 % , |
| 49 |
\catcode45=12 % - |
| 50 |
\catcode46=12 % . |
| 51 |
\catcode58=12 % : |
| 52 |
\catcode64=11 % @ |
| 53 |
\catcode123=1 % { |
| 54 |
\catcode125=2 % } |
| 55 |
\expandafter\let\expandafter\x\csname [email protected]\endcsname |
| 56 |
\ifx\x\relax % plain-TeX, first loading |
| 57 |
\else |
| 58 |
\def\empty{}% |
| 59 |
\ifx\x\empty % LaTeX, first loading, |
| 60 |
% variable is initialized, but \ProvidesPackage not yet seen |
| 61 |
\else |
| 62 |
\expandafter\ifx\csname PackageInfo\endcsname\relax |
| 63 |
\def\x#1#2{% |
| 64 |
\immediate\write-1{Package #1 Info: #2.}% |
| 65 |
}% |
| 66 |
\else |
| 67 |
\def\x#1#2{\PackageInfo{#1}{#2, stopped}}% |
| 68 |
\fi |
| 69 |
\x{rotchiffre}{The package is already loaded}% |
| 70 |
\aftergroup\endinput |
| 71 |
\fi |
| 72 |
\fi |
| 73 |
\endgroup% |
| 74 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 75 |
\catcode13=5 % ^^M |
| 76 |
\endlinechar=13 % |
| 77 |
\catcode35=6 % # |
| 78 |
\catcode39=12 % ' |
| 79 |
\catcode40=12 % ( |
| 80 |
\catcode41=12 % ) |
| 81 |
\catcode44=12 % , |
| 82 |
\catcode45=12 % - |
| 83 |
\catcode46=12 % . |
| 84 |
\catcode47=12 % / |
| 85 |
\catcode58=12 % : |
| 86 |
\catcode64=11 % @ |
| 87 |
\catcode91=12 % [ |
| 88 |
\catcode93=12 % ] |
| 89 |
\catcode123=1 % { |
| 90 |
\catcode125=2 % } |
| 91 |
\expandafter\ifx\csname ProvidesPackage\endcsname\relax |
| 92 |
\def\x#1#2#3[#4]{\endgroup |
| 93 |
\immediate\write-1{Package: #3 #4}% |
| 94 |
\xdef#1{#4}% |
| 95 |
}% |
| 96 |
\else |
| 97 |
\def\x#1#2[#3]{\endgroup |
| 98 |
#2[{#3}]% |
| 99 |
\ifx#1\@undefined |
| 100 |
\xdef#1{#3}% |
| 101 |
\fi |
| 102 |
\ifx#1\relax |
| 103 |
\xdef#1{#3}% |
| 104 |
\fi |
| 105 |
}% |
| 106 |
\fi |
| 107 |
\expandafter\x\csname [email protected]\endcsname |
| 108 |
\ProvidesPackage{rotchiffre}% |
| 109 |
[2016/05/16 v1.1 Perform simple rotation ciphers (HO)]% |
| 110 |
\begingroup\catcode61\catcode48\catcode32=10\relax% |
| 111 |
\catcode13=5 % ^^M |
| 112 |
\endlinechar=13 % |
| 113 |
\catcode123=1 % { |
| 114 |
\catcode125=2 % } |
| 115 |
\catcode64=11 % @ |
| 116 |
\def\x{\endgroup |
| 117 |
\expandafter\edef\csname RotCh@AtEnd\endcsname{% |
| 118 |
\endlinechar=\the\endlinechar\relax |
| 119 |
\catcode13=\the\catcode13\relax |
| 120 |
\catcode32=\the\catcode32\relax |
| 121 |
\catcode35=\the\catcode35\relax |
| 122 |
\catcode61=\the\catcode61\relax |
| 123 |
\catcode64=\the\catcode64\relax |
| 124 |
\catcode123=\the\catcode123\relax |
| 125 |
\catcode125=\the\catcode125\relax |
| 126 |
}% |
| 127 |
}% |
| 128 |
\x\catcode61\catcode48\catcode32=10\relax% |
| 129 |
\catcode13=5 % ^^M |
| 130 |
\endlinechar=13 % |
| 131 |
\catcode35=6 % # |
| 132 |
\catcode64=11 % @ |
| 133 |
\catcode123=1 % { |
| 134 |
\catcode125=2 % } |
| 135 |
\def\TMP@EnsureCode#1#2{% |
| 136 |
\edef\RotCh@AtEnd{% |
| 137 |
\RotCh@AtEnd |
| 138 |
\catcode#1=\the\catcode#1\relax |
| 139 |
}% |
| 140 |
\catcode#1=#2\relax |
| 141 |
} |
| 142 |
\TMP@EnsureCode{42}{12}% * |
| 143 |
\TMP@EnsureCode{43}{12}% + |
| 144 |
\TMP@EnsureCode{45}{12}% - |
| 145 |
\TMP@EnsureCode{46}{12}% . |
| 146 |
\TMP@EnsureCode{47}{12}% / |
| 147 |
\TMP@EnsureCode{60}{12}% < |
| 148 |
\TMP@EnsureCode{62}{12}% > |
| 149 |
\TMP@EnsureCode{91}{12}% [ |
| 150 |
\TMP@EnsureCode{93}{12}% ] |
| 151 |
\TMP@EnsureCode{96}{12}% ` |
| 152 |
\edef\RotCh@AtEnd{\RotCh@AtEnd\noexpand\endinput} |
| 153 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 154 |
\expandafter\ifx\csname RequirePackage\endcsname\relax |
| 155 |
\input infwarerr.sty\relax |
| 156 |
\input ltxcmds.sty\relax |
| 157 |
\input pdfescape.sty\relax |
| 158 |
\else |
| 159 |
\RequirePackage{infwarerr}[2010/04/08]% |
| 160 |
\RequirePackage{ltxcmds}[2010/03/01]% |
| 161 |
\RequirePackage{pdfescape}[2010/03/01]% |
| 162 |
\fi |
| 163 |
\ltx@IfUndefined{protected}{% |
| 164 |
\ltx@IfUndefined{DeclareRobustCommand}{% |
| 165 |
\def\RotCh@temp{\def\EdefRot##1}% |
| 166 |
}{% |
| 167 |
\def\RotCh@temp{\DeclareRobustCommand*\EdefRot[1]}% |
| 168 |
}% |
| 169 |
}{% |
| 170 |
\def\RotCh@temp{\protected\def\EdefRot##1}% |
| 171 |
} |
| 172 |
\RotCh@temp{% |
| 173 |
\RotCh@GetNumber{#1}% |
| 174 |
\ltx@IfUndefined{RotCh@rot@\romannumeral\RotCh@number}{% |
| 175 |
\@PackageError{rotchiffre}{% |
| 176 |
Unknown chiffre ROT\RotCh@number |
| 177 |
}\@ehc |
| 178 |
\EdefSanitize |
| 179 |
}{% |
| 180 |
\RotCh@rot |
| 181 |
}% |
| 182 |
} |
| 183 |
\ltx@IfUndefined{numexpr}{% |
| 184 |
\def\RotCh@GetNumber#1{% |
| 185 |
\edef\RotCh@number{\number#1}% |
| 186 |
}% |
| 187 |
}{% |
| 188 |
\def\RotCh@GetNumber#1{% |
| 189 |
\edef\RotCh@number{\the\numexpr#1\relax}% |
| 190 |
}% |
| 191 |
} |
| 192 |
\countdef\RotCh@count=255 % |
| 193 |
\countdef\RotCh@count@end=2 % |
| 194 |
\def\RotCh@RangeIgnore{% |
| 195 |
\RotCh@loop{% |
| 196 |
\lccode\RotCh@count=\ltx@zero |
| 197 |
}% |
| 198 |
} |
| 199 |
\ltx@IfUndefined{numexpr}{% |
| 200 |
\countdef\RotCh@count@temp=4 % |
| 201 |
\def\RotCh@RangeSet#1{% |
| 202 |
\RotCh@loop{% |
| 203 |
\RotCh@count@temp=\RotCh@count |
| 204 |
\advance\RotCh@count@temp #1 % |
| 205 |
\lccode\RotCh@count=\RotCh@count@temp |
| 206 |
}% |
| 207 |
}% |
| 208 |
}{% |
| 209 |
\def\RotCh@RangeSet#1{% |
| 210 |
\RotCh@loop{% |
| 211 |
\lccode\RotCh@count=\numexpr\RotCh@count#1\relax |
| 212 |
}% |
| 213 |
}% |
| 214 |
} |
| 215 |
\def\RotCh@loop#1#2#3{% |
| 216 |
\RotCh@count=#2 % |
| 217 |
\RotCh@count@end=#3 % |
| 218 |
\def\RotCh@action{#1}% |
| 219 |
\RotCh@@loop |
| 220 |
}% |
| 221 |
\def\RotCh@@loop{% |
| 222 |
\RotCh@action |
| 223 |
\ifnum\RotCh@count<\RotCh@count@end |
| 224 |
\advance\RotCh@count\ltx@one |
| 225 |
\expandafter\RotCh@@loop |
| 226 |
\fi |
| 227 |
} |
| 228 |
\def\RotCh@rot@xiii{% |
| 229 |
\RotCh@RangeIgnore{0}{64}% |
| 230 |
\RotCh@RangeSet{+13}{65}{77}% |
| 231 |
\RotCh@RangeSet{-13}{78}{90}% |
| 232 |
\RotCh@RangeIgnore{91}{96}% |
| 233 |
\RotCh@RangeSet{+13}{97}{109}% |
| 234 |
\RotCh@RangeSet{-13}{110}{122}% |
| 235 |
\RotCh@RangeIgnore{123}{255}% |
| 236 |
} |
| 237 |
\def\RotCh@rot@v{% |
| 238 |
\RotCh@RangeIgnore{0}{47}% |
| 239 |
\RotCh@RangeSet{+5}{48}{52}% |
| 240 |
\RotCh@RangeSet{-5}{53}{57}% |
| 241 |
\RotCh@RangeIgnore{58}{255}% |
| 242 |
} |
| 243 |
\def\RotCh@rot@xviii{% |
| 244 |
\RotCh@RangeIgnore{0}{47}% |
| 245 |
\RotCh@RangeSet{+25}{48}{57}% |
| 246 |
\RotCh@RangeIgnore{58}{64}% |
| 247 |
\RotCh@RangeSet{+18}{65}{72}% |
| 248 |
\RotCh@RangeSet{-25}{73}{82}% |
| 249 |
\RotCh@RangeSet{-18}{83}{90}% |
| 250 |
\RotCh@RangeIgnore{91}{96}% |
| 251 |
\RotCh@RangeSet{+13}{97}{109}% |
| 252 |
\RotCh@RangeSet{-13}{110}{122}% |
| 253 |
\RotCh@RangeIgnore{123}{255}% |
| 254 |
} |
| 255 |
\def\RotCh@rot@xlvii{% |
| 256 |
\RotCh@RangeIgnore{0}{32}% |
| 257 |
\RotCh@RangeSet{+47}{33}{79}% |
| 258 |
\RotCh@RangeSet{-47}{80}{126}% |
| 259 |
\RotCh@RangeIgnore{127}{255}% |
| 260 |
} |
| 261 |
\begingroup |
| 262 |
\catcode0=9 % |
| 263 |
\catcode`\^=7 % |
| 264 |
\catcode`\^^^=12 % |
| 265 |
\def\x{^^^^0000}% |
| 266 |
\expandafter\endgroup |
| 267 |
\ifx\x\ltx@empty |
| 268 |
\toksdef\RotCh@toks=0 % |
| 269 |
\long\def\RotCh@rot#1#2{% |
| 270 |
\EdefSanitize#1{#2}% |
| 271 |
\begingroup |
| 272 |
\csname RotCh@rot@\romannumeral\RotCh@number\endcsname |
| 273 |
\RotCh@toks={}% |
| 274 |
\expandafter\RotCh@SplitSpace#1 \@nil |
| 275 |
\expandafter\endgroup |
| 276 |
\expandafter\def\expandafter#1\expandafter{% |
| 277 |
\the\RotCh@toks |
| 278 |
}% |
| 279 |
}% |
| 280 |
\def\RotCh@temp#1{% |
| 281 |
\def\RotCh@SplitSpace##1 ##2\@nil{% |
| 282 |
\RotCh@Add##1\relax |
| 283 |
\ifx\relax##2\relax |
| 284 |
\expandafter\ltx@gobble |
| 285 |
\else |
| 286 |
\RotCh@toks\expandafter{\the\RotCh@toks#1}% |
| 287 |
\expandafter\ltx@firstofone |
| 288 |
\fi |
| 289 |
{% |
| 290 |
\RotCh@SplitSpace##2\@nil |
| 291 |
}% |
| 292 |
}% |
| 293 |
}% |
| 294 |
\RotCh@temp{ }% |
| 295 |
\def\RotCh@Add#1{% |
| 296 |
\ifx#1\relax |
| 297 |
\else |
| 298 |
\ifnum`#1>126 % |
| 299 |
\RotCh@toks\expandafter{\the\RotCh@toks#1}% |
| 300 |
\else |
| 301 |
\lowercase{% |
| 302 |
\RotCh@toks\expandafter{\the\RotCh@toks#1}% |
| 303 |
}% |
| 304 |
\fi |
| 305 |
\expandafter\RotCh@Add |
| 306 |
\fi |
| 307 |
}% |
| 308 |
\else |
| 309 |
\long\def\RotCh@rot#1#2{% |
| 310 |
\EdefSanitize#1{#2}% |
| 311 |
\begingroup |
| 312 |
\csname RotCh@rot@\romannumeral\RotCh@number\endcsname |
| 313 |
\lowercase\expandafter{\expandafter\endgroup |
| 314 |
\expandafter\def\expandafter#1\expandafter{#1}% |
| 315 |
}% |
| 316 |
}% |
| 317 |
\fi |
| 318 |
\RotCh@AtEnd% |
| 319 |
%% \section{Installation} |
| 320 |
\endinput |
| 321 |
%% |
| 322 |
%% End of file `rotchiffre.sty'. |