~ubuntu-branches/debian/sid/tex4ht/sid

« back to all changes in this revision

Viewing changes to share/all4ht/article.4ht

  • Committer: Bazaar Package Importer
  • Author(s): Kapil Hari Paranjape
  • Date: 2005-04-05 14:14:41 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050405141441-x4dojdgz3frkfyet
Tags: 20050402.1817-1
* New upstream release (2005-04-02-18:17). Closes: #299934.
* See README.src, README.validate, README.Debian and copyright
  for information on minor changes.
* This upload fixes a some .htf files. Closes: #295109.
* Updated the description to reflect recent changes.
* Fixed some typos in src/tex4ht-mkht.tex and consequently
  in the mk4ht script.
* Updated the man page to include mk4ht. 
* Updated the description of options for the scripts in the man page.
  Put more information in the man page about the way the system works.
  Closes: #219348, #219347.
* Added debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
 
% article.4ht                          2001-12-14-17:07 %
3
 
% Copyright (C) 1997--2001      Eitan M. Gurari         %
4
 
%                                                       %
5
 
% This program can redistributed and/or modified under  %
6
 
% the terms of the LaTeX Project Public License         %
7
 
% Distributed from CTAN archives in directory           %
8
 
% macros/latex/base/lppl.txt; either version 1 of the   %
9
 
% License, or (at your option) any later version.       %
10
 
%                                                       %
11
 
% However, you are allowed to modify this program       %
12
 
% without changing its name, if you modify its          %
13
 
% signature. Changes to the signature can be introduced %
14
 
% with a directive of the form                          %
15
 
%            \message{signature}                        %
16
 
%                                                       %
17
 
%                             gurari@cis.ohio-state.edu %
18
 
%                 http://www.cis.ohio-state.edu/~gurari %
19
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20
 
\immediate\write-1{version 2001-12-14-17:07}
21
 
 
22
 
 
23
 
\Configure{UndefinedSec}{likepart}
24
 
\Configure{UndefinedSec}{likechapter}
25
 
\Configure{UndefinedSec}{likesection}
26
 
\Configure{UndefinedSec}{likesubsection}
27
 
 
28
 
 
29
 
\NewConfigure{caption}[4]{\c:def\cptA:{#1}\c:def\cptB:{#2}%
30
 
   \c:def\cptC:{#3}\c:def\cptD:{#4}}
31
 
\long\def\@makecaption#1#2{%   
32
 
   {\cptA: \cap:ref{#1}%
33
 
\cptB:}{\cptC:{#2}\cptD:}}
34
 
 
35
 
 
36
 
\pend:def\caption{\SkipRefstepAnchor}
37
 
\append:def\quote{\par\@totalleftmargin\z@}
38
 
\long\def\c:theindex:#1#2#3#4#5#6#7#8#9{%
39
 
   \def\theindex{%
40
 
      \ifx \idx:item\:UnDef \ifx \LNK\:UnDef  \ifx \LNKno\:UnDef
41
 
  \:warning{Process with
42
 
   ^^J\space\space tex '\string\def\string\filename
43
 
      {{\jobname}{ind}{idx}{in}{out}} \noexpand\input\space idxmake.4ht'
44
 
   ^^J\space\space  makeindex -o \jobname .out \jobname .in
45
 
   ^^Jinstead of
46
 
   ^^J\space\space  makeindex -o \jobname .ind \jobname .idx
47
 
   ^^JOn some platforms, the quotation marks ' should be
48
 
   ^^J      replaced by double quotation marks " or eliminated
49
 
}\fi\fi
50
 
\fi
51
 
      \def\idx:item{\SaveEverypar\ht:everypar{}#1}%
52
 
      \def\endtheindex{\idx:item#2\RecallEverypar}%
53
 
      \def\item{\idx:item\let\index\@gobble #3\def\idx:item{#4}}%
54
 
      \def\subitem{\idx:item\let\index\@gobble #5\def\idx:item{#6}}%
55
 
      \def\subsubitem{\idx:item\let\index\@gobble #7\def\idx:item{#8}}}%
56
 
      \def\indexspace{\idx:item#9\let\idx:item\empty}}
57
 
\let\o:maketitle:\maketitle
58
 
\def\maketitle{\bgroup
59
 
   \ifx \EndPicture\:UnDef
60
 
      \def\sec:typ{title}%
61
 
      \Configure{HtmlPar}{}{}{}{}%
62
 
      \ConfigureEnv{center}{\empty}{}{\empty}{\empty}
63
 
      \Configure{tabular}{}{}{}{\e:mktl}{}{}%
64
 
      \ConfigureEnv{tabular}{\empty}{}{}{}%
65
 
      %
66
 
      \pend:def\@title{\a:ttl}\append:def\@title{\b:ttl}%
67
 
      \pend:def\@date{\a:dat}\append:def\@date{\b:dat}%
68
 
      \pend:def\@author{\a:aut}\append:def\@author{\b:aut}%
69
 
      \def\and{\a:and}
70
 
%
71
 
   \fi
72
 
   \pic:gobble\a:mktl  \o:maketitle:  \pic:gobble\b:mktl
73
 
   \egroup \let\maketitle\empty}
74
 
\NewConfigure{maketitle}[4]{\c:def\a:mktl{#1}\c:def\b:mktl{#2}%
75
 
   \c:def\a:ttl{#3}\c:def\b:ttl{#4}}
76
 
\NewConfigure{thanks author date and}[8]{%
77
 
   \c:def\a:thanks{#1}\c:def\b:thanks{#2}\c:def\a:aut{#3}\c:def\b:aut{#4}%
78
 
   \c:def\a:dat{#5}\c:def\b:dat{#6}\c:def\a:and{#7}\c:def\e:mktl{#8}}
79
 
 
80
 
 
81
 
\append:def\quotation{\a:quotation\par\@totalleftmargin\z@}
82
 
\NewConfigure{quotation}{1}
83
 
\NewConfigure{listof}{6}
84
 
 
85
 
 
86
 
 
87
 
\edef\:TOC{%
88
 
   \noexpand\ifx [\noexpand\:temp
89
 
      \noexpand\expandafter\noexpand\:TableOfContents
90
 
   \noexpand\else
91
 
      \noexpand\Auto:ent{\ifnum \c@tocdepth >-2 part,\fi
92
 
\expandafter\ifx \csname @chapter\endcsname\relax
93
 
   \ifnum \c@tocdepth >\z@  section,\fi
94
 
\else
95
 
   \ifnum \c@tocdepth >\m@ne chapter,appendix,\fi
96
 
   \ifnum \z@>\c@tocdepth\else section,\fi
97
 
   \ifnum 1>\c@tocdepth \else subsection,\fi
98
 
\fi
99
 
\ifnum 2>\c@tocdepth \else subsection,\fi
100
 
\ifnum 3>\c@tocdepth \else subsubsection,\fi
101
 
\ifnum 4>\c@tocdepth \else paragraph,\fi
102
 
\ifnum 5>\c@tocdepth \else subparagraph,\fi
103
 
UnDFexyz}%
104
 
   \noexpand\fi}
105
 
\def\:tableofcontents{\futurelet\:temp\:TOC}
106
 
\def\Auto:ent#1{%
107
 
   \edef\auto:toc{\noexpand\:TableOfContents[\ifx \auto:toc\:UnDef
108
 
      #1\else \auto:toc \fi]}  \auto:toc
109
 
   \global\let\auto:toc\:UnDef }
110
 
 
111
 
\def\:tocs{\noexpand\:tableofcontents}
112
 
\pend:defIII\addcontentsline{%
113
 
   \def\:temp{##1}\def\:tempa{toc}\ifx \:temp\:tempa
114
 
   \gHAdvance\TitleCount  1 \fi }
115
 
\def\@dottedtocline#1#2#3#4#5{\hbox{\def\numberline##1{\e:listof
116
 
                ##1\f:listof}\c:listof#4\d:listof}\ignorespaces}
117
 
\def\@starttoc#1{%
118
 
  \begingroup
119
 
    \makeatletter   \Configure{cite}{}{}{}{}%
120
 
    \def\:temp{#1}\def\:tempa{toc}%
121
 
    \a:listof\par
122
 
    \@input{\jobname.\ifx \:temp\:tempa 4ct\else #1\fi}%
123
 
    \b:listof
124
 
    \if@filesw
125
 
      \expandafter\expandafter\csname
126
 
          newwrite\endcsname\csname tf@#1\endcsname
127
 
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
128
 
    \fi
129
 
    \global\@nobreakfalse
130
 
  \endgroup}
131
 
 
132
 
 
133
 
 
134
 
\NewConfigure{tableofcontents*}[1]{%
135
 
   \def\:tempa{#1}\ifx\empty\:tempa
136
 
      \ifx \au:StartSec\:UnDef \else \gdef\:StartSec{\au:StartSec}\fi
137
 
   \else
138
 
      \edef\auto:toc{#1}%
139
 
         \ifx \au:StartSec\:UnDef
140
 
            \let\au:StartSec\:StartSec
141
 
            \def\:StartSec{\:tableofcontents
142
 
               \global\let\auto:toc\:UnDef \:StartSec}%
143
 
            \pend:def\:tableofcontents{\gdef\:StartSec{\au:StartSec}}%
144
 
   \fi  \fi
145
 
}
146
 
     
147
 
\ifx \@openbib@code\:UnDef \else
148
 
 \pend:def\@openbib@code{\labelsep\z@}
149
 
\fi
150
 
\def\:temp#1#2!*?: {\def\:temp{#1}}
151
 
\expandafter\:temp\usepackage!*?: 
152
 
\def\:tempa{\@latex@e@error}
153
 
\ifx \:temp\:tempa \else
154
 
   \def\:tempa#1#2#3#4{\tmp:toks{#1{#2}}%
155
 
   \long\expandafter\edef\csname #4 \endcsname{\the\tmp:toks
156
 
        {\expandafter\noexpand
157
 
   \csname o:\expandafter\:gobble\string #3:\endcsname}}}
158
 
\def\:temp#1{%
159
 
  \expandafter\expandafter\expandafter\:tempa\csname #1 \endcsname{#1}}
160
 
\:temp{rm}
161
 
\:temp{sf}
162
 
\:temp{tt}
163
 
\:temp{bf}
164
 
\:temp{it}
165
 
 
166
 
\fi
167
 
 
168
 
  \let\:tempc\listoffigures
169
 
\pend:def\:tempc{\begingroup \a:listoffigures
170
 
   \def\@starttoc{\:tableofcontents[lof]\:gobble}}
171
 
\append:def\:tempc{\b:listoffigures \endgroup}
172
 
\HLet\listoffigures\:tempc
173
 
\let\:tempc\listoftables
174
 
\pend:def\:tempc{\begingroup \a:listoftables
175
 
   \def\@starttoc{\:tableofcontents[lot]\:gobble}}
176
 
\append:def\:tempc{\b:listoftables \endgroup}
177
 
\HLet\listoftables\:tempc
178
 
 
179
 
  \NewConfigure{listoffigures}{2}
180
 
\NewConfigure{listoftables}{2}
181
 
 
182
 
\ifx \part\:UnDef\else
183
 
   \def\@part[#1]#2{%
184
 
    \ifnum \c@secnumdepth >-2\relax
185
 
      \SkipRefstepAnchor \refstepcounter{part}%
186
 
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
187
 
    \else
188
 
      \addcontentsline{toc}{part}{#1}%
189
 
    \fi
190
 
    \csname @endpart\endcsname}
191
 
\let\:tempb\part
192
 
\Def:Section\part{\thepart}{#1}
193
 
\let\:part\part
194
 
\let\part\:tempb
195
 
\let\no@part\@part
196
 
\def\@part[#1]#2{%
197
 
   {\let\addcontentsline\:gobbleIII\no@part[#1]{}}%
198
 
   \HtmlEnv   \Toc:Title{#1}\:part{#2}}
199
 
\Def:Section\likepart{}{#1}
200
 
\let\:likepart\likepart
201
 
\let\likepart\:UnDef
202
 
\let\no@spart\@spart
203
 
\def\@spart#1{%
204
 
   {\let\addcontentsline\:gobbleIII\no@spart{}}%
205
 
   \HtmlEnv   \:likepart{#1}}
206
 
 
207
 
\fi
208
 
\ifx \section\:UnDef\else
209
 
   \let\no@section\section
210
 
\Def:Section\section{\ifnum \c:secnumdepth>\c@secnumdepth   \else
211
 
   \thesection \fi}{#1}
212
 
\let\no:section\section
213
 
\def\section{\rdef:sec{section}}
214
 
\Def:Section\likesection{}{#1}
215
 
\let\:likesection\likesection
216
 
\let\likesection\:UnDef
217
 
 
218
 
\fi
219
 
\let\no@subsection\subsection
220
 
\Def:Section\subsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
221
 
   \thesubsection \fi}{#1}
222
 
\let\no:subsection\subsection
223
 
\def\subsection{\rdef:sec{subsection}}
224
 
\Def:Section\likesubsection{}{#1}
225
 
\let\:likesubsection\likesubsection
226
 
\let\likesubsection\:UnDef
227
 
 
228
 
\let\no@subsubsection\subsubsection
229
 
\Def:Section\subsubsection{\ifnum \c:secnumdepth>\c@secnumdepth   \else
230
 
   \thesubsubsection \fi}{#1}
231
 
\let\no:subsubsection\subsubsection
232
 
\def\subsubsection{\rdef:sec{subsubsection}}
233
 
\Def:Section\likesubsubsection{}{#1}
234
 
\let\:likesubsubsection\likesubsubsection
235
 
\let\likesubsubsection\:UnDef
236
 
 
237
 
\let\no@paragraph\paragraph
238
 
\Def:Section\paragraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
239
 
   \theparagraph \fi}{#1}
240
 
\let\no:paragraph\paragraph
241
 
\def\paragraph{\rdef:sec{paragraph}}
242
 
\Def:Section\likeparagraph{}{#1}
243
 
\let\:likeparagraph\likeparagraph
244
 
\let\likeparagraph\:UnDef
245
 
\let\no@subparagraph\subparagraph
246
 
\Def:Section\subparagraph{\ifnum \c:secnumdepth>\c@secnumdepth   \else
247
 
   \thesubparagraph \fi}{#1}
248
 
\let\no:subparagraph\subparagraph
249
 
\def\subparagraph{\rdef:sec{subparagraph}}
250
 
\Def:Section\likesubparagraph{}{#1}
251
 
\let\:likesubparagraph\likesubparagraph
252
 
\let\likesubparagraph\:UnDef
253
 
 
254
 
 
255
 
 
256
 
 
257
 
 
258
 
\def\tableofcontents{%
259
 
   \ifx\contentsname\empty \else
260
 
      \ifx\contentsname\:UnDef \else
261
 
         %
262
 
\section*{\contentsname}%
263
 
         %
264
 
%
265
 
   \fi\fi
266
 
   \:tableofcontents}
267
 
 
268
 
 
269
 
\ConfigureToc{likeparagraph} {}{\empty}{}{\newline}
270
 
\ConfigureToc{likepart} {}{\empty}{}{\newline}
271
 
\ConfigureToc{likesection} {}{\empty}{}{\newline}
272
 
\ConfigureToc{likesubparagraph} {}{\empty}{}{\newline}
273
 
\ConfigureToc{likesubsection} {}{\empty}{}{\newline}
274
 
\ConfigureToc{likesubsubsection} {}{\empty}{}{\newline}
275
 
\ConfigureToc{paragraph} {\empty}{\ }{}{\newline}
276
 
\ConfigureToc{part} {\empty}{\ }{}{\newline}
277
 
\ConfigureToc{section} {\empty}{\ }{}{\newline}
278
 
\ConfigureToc{subparagraph} {\empty}{\ }{}{\newline}
279
 
\ConfigureToc{subsection} {\empty}{\ }{}{\newline}
280
 
\ConfigureToc{subsubsection} {\empty}{\ }{}{\newline}
281
 
 
282
 
\Hinput{article}
283
 
\endinput
284