Debian Codegraph @

texmf-dist/doc/latex/morehype/ref_alts.tex

raw
1 \ProvidesFile{ref_alts.tex}[2012/12/19 texlinks implementations]
2 %% a study of alternatives to implement texlinks,
3 %% counting tokens, not meant to work.
4
5 \def\baseref{\httpbaseref{<base>}} % 5 + b
6 \def\repsubbaseref{\httpbaseref{<base>/<ppath>}} % 6 + b + p → 11 + 2b + p
7 % 2S
8 \def\baseurl{<base>} % 2 + b
9 \def\urlbaseref{\httpbaseref\baseurl} % 4
10 \def\urlsubbaseref{\httpbaseref{\baseurl/<ppath>}} % 7 + p → 13 + b + p
11 % 3S
12 \def\subbaseref#1{\baseref{<ppath>/#1}} % 8 + p → 13 + b + p
13 % 2S
14
15 \def\html{.html}
16 \def\bytopicreppathref#1{%
17 \mirrorctanref{<cat-path>/bytopic\html\##1} % 9 + c + t
18
19 \def\catpath{<cat-path>/} % 3 + c
20 \def\bytopiccatpathref#1{%
21 \mirrorctanref{\catpath bytopic\html\##1} % 9 + t
22 \def\CatPkgCatPathRef#1{%
23 \mirrorctanref{\catpath entries/#1\html}} % 9 + e
24 \def\catalogueref#1{\mirrorctanref{<cat-path>/#1}} % 8 + c
25 \def\bytopiccatref#1{%
26 \catalogueref{bytopic\html\##1}} % 9 + t
27 \def\CatPkgRef#1{\catalogueref{entries/#1\html}} % 9 + e
28 %% + #2 ... {\pkgnamefmt{#2}} → 7
29
30 \def\ctanorg{ctan.org/} % 3 + o
31 \def\mirrcorg{mirror\ctanorg} % 3 + m
32 \def\httpancref#1#2{\httpref{#1\##2}} % 10
33 \def\bytopicancref{%
34 \httpancref{\mirrcorg\catpath bytopic\html}} % 8 + t
35 \def\bytopicurlref#1{%
36 \httpref{\mirrcorg\catpath bytopic\html\##1}} % 11 + t
37 \def\CatPkgUrlRef#1{%
38 \httpref{\mirrcorg\catpath entries/#1\html}} % 11 + e
39 %% + #2 ... {\pkgnamefmt{#2}} → 7
40
41 \def\Ct@nPkgRef#1#2#3{#1{pkg/#2}{\pkgnamefmt{#3}}}% 16 + k
42 \def\CtanPkgRef{\Ct@nPkgRef\ctanorgbaseref} % 4
43 \def\TugCtanPkgRef{\Ct@nPkgRef\tugctanorgbaseref} % 4
44 \def\WwwCtanPkgRef{\Ct@nPkgRef\wwwctanorgbaseref} % 4
45 \def\CatPkgRef#1#2{\catalogueref{entries/#1\html}%
46 {\pkgnamefmt{#2}}}% 16 + e
47
48 \def\oCtanPkgRef#1#2{%
49 \ctanorgbaseref{pkg/#1}{\pkgnamefmt{#2}}} % 15 + k
50 \def\oTugCtanPkgRef#1#2{%
51 \tugctanorgbaseref{pkg/#1}{\pkgnamefmt{#2}}} % 15 + k
52 \def\oWwwCtanPkgRef#1#2{%
53 \wwwctanorgbaseref{pkg/#1}{\pkgnamefmt{#2}}} % 15 + k
54 \def\CatPkgRef...{...} % 16 + e
55
56 \def\mk@pkg@ref#1#2#3{#1{#2}{\pkgnamefmt{#3}}} % 15
57 \def\CatPkgRef#1{%
58 \mk@pkg@ref\catalogueref{entries/#1\html}} % 10 + e
59 \def\CtanPkgRef#1{%
60 \mk@pkg@ref\ctanorgbaseref{pkg/#1}} % 9 + k
61 \def\TugCtanPkgRef#1{%
62 \mk@pkg@ref\tugctanorgbaseref{pkg/#1}} % 9 + k
63 \def\WwwCtanPkgRef#1{%
64 \mk@pkg@ref\wwwctanorgbaseref{pkg/#1}} % 9 + k
65
66 \def\Ct@nPkgRef#1#2{\mk@pkg@ref#1{pkg/#2}} % 10 + k
67 \def\CtanPkgRef {\Ct@nPkgRef \ctanorgbaseref} % 4
68 \def\TugCtanPkgRef{\Ct@nPkgRef\tugctanorgbaseref} % 4
69 \def\WwwCtanPkgRef{\Ct@nPkgRef\wwwctanorgbaseref} % 4
70 \def\CatPkgRef...{...} % 10 + e
71
72 \def\@double@first@arg#1#2{#1{#2}{#2}} % 11
73 \def\ctanpkgref#1{\CtanPkgRef{#1}{#1}} % 10 (4x?? 2x?)
74 \def\ctanpkgref{\@double@first@arg\CtanPkgRef} % 4 (4x?? 2x?)