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

« back to all changes in this revision

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