Debian Codegraph @

texmf-dist/tex/generic/tex4ht/ProTex.4ht

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % ProTex.4ht 2009-05-21-09:32 %
3 % Copyright (C) 2003--2009 Eitan M. Gurari %
4 % %
5 % This work may be distributed and/or modified under the %
6 % conditions of the LaTeX Project Public License, either %
7 % version 1.3c of this license or (at your option) any %
8 % later version. The latest version of this license is %
9 % in %
10 % http://www.latex-project.org/lppl.txt %
11 % and version 1.3c or later is part of all distributions %
12 % of LaTeX version 2005/12/01 or later. %
13 % %
14 % This work has the LPPL maintenance status "maintained".%
15 % %
16 % This Current Maintainer of this work %
17 % is Eitan M. Gurari. %
18 % %
19 % If you modify this program your changing its signature %
20 % with a directive of the following form will be %
21 % appreciated. %
22 % \message{signature} %
23 % %
24 % [email protected] %
25 % http://www.cse.ohio-state.edu/~gurari %
26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
27 \immediate\write-1{version 2009-05-21-09:32}
28
29 \let\c:ProTex:=\:UnDef
30 \let\protex:sv\:RestoreCatcodes
31 \let\protex:sav\:CheckOption
32 \catcode`\:=12
33 \input ProTex.sty
34 \expandafter\expandafter\expandafter\AlProTex
35 \expandafter\expandafter\expandafter{\csname a:ProTex\endcsname}
36 \catcode`\:=11
37 \let\:RestoreCatcodes\protex:sv
38 \let\:CheckOption\protex:sav
39 \def\:CheckProtexOption#1{
40 \let\protex:sv=\Preamble
41 \let\Preamble=\a:ProTex
42 \:CheckOption{#1}
43 \let\Preamble=\protex:sv
44 }
45
46 \:CheckProtexOption{[[]]}\if:Option
47 \NewConfigure{FrameCode}[2]{%
48 \def\a:FrameCode{#1}\def\b:FrameCode{#2}%
49 \def\:FrameCode##1{\ifvmode\vfill\break\fi
50 \vtop{\a:FrameCode ##1\b:FrameCode}}}
51 \fi
52 \let\tivt:ModifyAppendCode=\ModifyAppendCode
53 \def\ModifyAppendCode#1{%
54 \tivt:ModifyAppendCode{#1}\a:ModifyAppendCode}
55 \NewConfigure{ModifyAppendCode}[1]{%
56 \concat:config\a:ModifyAppendCode{#1}}
57 \Configure{ModifyAppendCode}{}
58 \let\tivt:ModifyOutputCode=\ModifyOutputCode
59 \def\ModifyOutputCode#1{\tivt:ModifyOutputCode{#1}%
60 \pend:def\ProTexMssg{\Configure{Needs}{File: \:FileName}\Needs{}}%
61 \a:ModifyOutputCode
62 }
63 \NewConfigure{ModifyOutputCode}[1]{%
64 \concat:config\a:ModifyOutputCode{#1}}
65 \Configure{ModifyOutputCode}{}
66 \let\tivt:ModifyShowCode=\ModifyShowCode
67 \def\ModifyShowCode#1{\tivt:ModifyShowCode{#1}\a:ModifyShowCode}
68 \NewConfigure{ModifyShowCode}[1]{%
69 \concat:config\a:ModifyShowCode{#1}}
70 \Configure{ModifyShowCode}{}
71 \def\frnt:ttl#1{{\parindent=0pt \htmlprotex:par
72 {\expandafter\ifx \csname ListCounter\endcsname\relax
73 \else \:removeindentfalse \fi \leavevmode}%
74 \PortTitle{#1}\:AppendSign}\a:protex
75 }
76
77 \if:latex \AtBeginDocument{\let\la:ref=\ref}
78 \Configure{ModifyAppendCode}
79 {\let\ref\relax}
80 \Configure{ModifyShowCode}
81 {\let\ref\prtx:ref}
82 \catcode`\(=1
83 \catcode`\)=2
84 \catcode`\{=12
85 \catcode`\}=12
86 \def\prtx:ref#1{#2}(\la:ref(#2))
87 \catcode`\(=12
88 \catcode`\)=12
89 \catcode`\{=1
90 \catcode`\}=2
91 \fi
92 \:CheckOption{prog-ref}\if:Option
93 \let\oc:frag:href\frag:href
94 \def\frag:href#1#2{%
95 \expandafter \ifx \csname cw:ofile-#1\endcsname \relax
96 \oc:frag:href{#1}{#2}%
97 \else
98 \HCode {<\tag:A \:newlnch \HREF:
99 "\csname cw:ofile-#1\endcsname "#2>}%
100 \fi }
101 \let\oc:OutputCodE=\OutputCodE
102 \def\OutputCodE\<#1\>{{%
103 \Tag{ofile-)0Z:#1}{#1}%
104 \let\OutputCode=\oc:OutputCode
105 \oc:OutputCodE\<#1\>}}
106 \let\oc:OutputCode=\OutputCode
107 \def\OutputCode#1\<#2\>{%
108 \def\foo##1[##2]##3//{##1.##2}%
109 \Tag{ofile-)0Z:#2}{\foo#2#1[java]//}%
110 \oc:OutputCode#1\<#2\>}
111 \else
112 \Log:Note{for pointers to code files from root fragments
113 use the command line option 'prog-ref'}
114 \fi
115
116 \Hinput{ProTex}
117 \endinput
118