Debian Codegraph @

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

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % manmac.4ht 2009-05-21-09:32 %
3 % Copyright (C) 2004--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 \proofmodefalse
30
31 \let\setcornerrules\empty
32
33 \let\o:exercise:=\exercise
34 \let\exercise\:UnDef
35
36 \def\exercise{\a:exercise \csname o:exercise:\endcsname\b:exercise}
37 \NewConfigure{exercise}{2}
38 \pend:def\copytoblankline{\begingroup\aftergroup\par\:gobble}
39
40 \def\checkequals#1#2{}
41
42 \append:def\beginlines{\everypar{\strut\HtmlPar}}
43
44 \outer\def\begindisplay{\o:obeylines:\startdisplay}
45 {\catcode`\#=13
46 \catcode`\@=6
47 \catcode`\^=7
48 \o:obeylines:\gdef\startdisplay@1
49 {\catcode`\^^M=5@1\bgroup %
50 \Configure{MkHalign}%
51 {\csname a:manmac-display\endcsname}%
52 {\csname b:manmac-display\endcsname}%
53 {\csname c:manmac-display\endcsname}%
54 {\csname d:manmac-display\endcsname}%
55 {\csname e:manmac-display\endcsname}%
56 {\csname f:manmac-display\endcsname}%
57 \let\par\endgraf %
58 \MkHalign#{\indent#\hfil&&\qquad#\hfil}}}
59 \outer\def\enddisplay{\crcr\EndMkHalign\egroup}
60 \NewConfigure{manmac-display}{6}
61
62 \outer\def\begintt{\a:ttenv
63 \bgroup\let\par=\endgraf \ttverbatim \parskip=\z@
64 \catcode`\|=0 \rightskip-5pc \ttfinish}
65 {\catcode`\^=7
66 \catcode`\|=0 |catcode`|\=\other %
67 |o:obeylines: % end of line is active
68 |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup|egroup |b:ttenv}}
69
70 \NewConfigure{ttenv}{2}
71 \pend:def\d@nger{\medbreak\a:danger\:gobble}
72 \append:def\d@nger{\aftergroup\b:danger}
73 \pend:def\dd@nger{\medbreak\a:ddanger\:gobble}
74 \append:def\dd@nger{\aftergroup\b:ddanger}
75 \NewConfigure{danger}{2}
76 \NewConfigure{ddanger}{2}
77 \catcode`\!6
78 \catcode`\#13
79 \def\:tempc!1!2{% !1=width, !2=text
80 \vtop{%
81 \Configure{MkHalign}\a:sampleglue\b:sampleglue\c:sampleglue %
82 \d:sampleglue\e:sampleglue\f:sampleglue
83 \MkHalign#{\hfil#}!2\cr\EndMkHalign}}
84 \HLet\sampleglue\:tempc
85 \catcode`\!12
86 \catcode`\#6
87 \NewConfigure{sampleglue}{6}
88
89 \def\:tempc#1 #2#3. #4\par{\vfill\break
90 \ifodd\pageno \advancepageno\fi
91 \let\SV:halign\halign
92 \let\halign\TeXhalign
93 \let\title:page\def
94 \bb:chapter \global\let\bb:chapter=\b:chapter \a:chapter \c:chapter
95 \o:beginchapter:{#1} {#2}{#3}. {#4}\par
96 \d:chapter
97 \let\halign\SV:halign
98 }
99 \HLet\beginchapter\:tempc
100 \expandafter\let\expandafter\:endchapter\csname endchapter\endcsname
101 \expandafter\def\csname endchapter\endcsname{%
102 \let\title:page\:UnDef
103 \bb:chapter \global\let\bb:chapter=\empty \csname :endchapter\endcsname
104 \everypar{\sl\HtmlPar}}
105 \pend:def\at:docend{\bb:chapter}
106 \let\bb:chapter=\empty
107 \NewConfigure{chapter}{4}
108 \pend:def\titlepage{%
109 \ifx \title:page\def \else
110 \let\title:page\:UnDef
111 \bb:chapter \a:titlepage
112 \global\let\bb:chapter=\b:titlepage
113 \fi
114 }
115 \NewConfigure{titlepage}{2}
116
117 \catcode`\#=13
118 \expandafter\def\csname beginmathdemo\endcsname{\par\bgroup
119 \Configure{MkHalign}\a:mathdemo\b:mathdemo\c:mathdemo
120 \d:mathdemo\e:mathdemo\f:mathdemo
121 \MkHalign#{#\hfil&$#$\hfil}}
122 \NewConfigure{mathdemo}{6}
123 \outer\def\begindisplaymathdemo {\par\bgroup
124 \Configure{MkHalign}\a:displaymathdemo
125 \b:displaymathdemo
126 \c:displaymathdemo
127 \d:displaymathdemo
128 \e:displaymathdemo
129 \f:displaymathdemo
130 \MkHalign#{\indent\hbox to 160pt{#\hfil}&$\displaystyle{#}$\hfil}}
131 \NewConfigure{displaymathdemo}{6}
132 \outer\def\beginlongmathdemo{\par\bgroup
133 \Configure{MkHalign}\a:longmathdemo
134 \b:longmathdemo
135 \c:longmathdemo
136 \d:longmathdemo
137 \e:longmathdemo
138 \f:longmathdemo
139 \MkHalign#{\indent\hbox to 210pt{#\hfil}&$#$\hfil}}
140 \NewConfigure{longmathdemo}{6}
141 \outer\def\beginlongdisplaymathdemo {\par\bgroup
142 \Configure{MkHalign}\a:longdisplaymathdemo
143 \b:longdisplaymathdemo
144 \c:longdisplaymathdemo
145 \d:longdisplaymathdemo
146 \e:longdisplaymathdemo
147 \f:longdisplaymathdemo
148 \MkHalign#{\indent\hbox to 210pt{#\hfil}&$\displaystyle{#}$\hfil}}
149 \NewConfigure{longdisplaymathdemo}{6}
150
151 \catcode`\#=6
152 \expandafter\def\csname endmathdemo\endcsname{\EndMkHalign\egroup}
153
154 \def\specialhat{\ifmmode\def\next{\sp}\else\let\next=\beginxref\fi\next}
155 {\catcode`\^=\active \global\let ^=\specialhat }
156
157 \Hinput{manmac}
158 \endinput
159