Debian Codegraph @

texmf-dist/doc/latex/shipunov/scripts/biokey2html1.pl

raw
1 #!/usr/bin/perl -w
2
3 $/="";
4
5 print STDERR "Making relative LaTeX key... \n";
6
7 &ochki();
8
9 print "\n";
10 while(<>){
11 s/\\Z(\d+)\./\\TEZA{$ochki[$1-1]}/g;
12 s/\\T+?\s*(\d+)\./\\SSYLKA{$ochki[$1-1]}/sg;
13 s/\\ZZ(\d+)\((\d+)\)\./\\STEZA{$ochki[$1-1]}{$ochki[$2-1]}/g;
14 print;
15 }
16
17 # fill array to links
18 sub ochki {
19 $B0 = $B1 = $nom = "";
20 @ochki = ();
21 for ($x = 0; $x < 26; $x++) {
22 for ($y = 0; $y < 26; $y++) {
23 $B0 = chr($y + 65);
24 $B1 = chr($x + 65);
25 $nom = "$B1$B0";
26 @ochki = (@ochki, $nom)
27 }
28 }
29 }
30 #