1 |
227 |
jeremybenn |
#! /usr/bin/perl
|
2 |
|
|
'di ';
|
3 |
|
|
'ig 00 ';
|
4 |
|
|
#+##############################################################################
|
5 |
|
|
#
|
6 |
|
|
# texi2html: Program to transform Texinfo documents to HTML
|
7 |
|
|
#
|
8 |
|
|
# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
9 |
|
|
#
|
10 |
|
|
# This program is free software; you can redistribute it and/or modify
|
11 |
|
|
# it under the terms of the GNU General Public License as published by
|
12 |
|
|
# the Free Software Foundation; either version 2 of the License, or
|
13 |
|
|
# (at your option) any later version.
|
14 |
|
|
#
|
15 |
|
|
# This program is distributed in the hope that it will be useful,
|
16 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
|
|
# GNU General Public License for more details.
|
19 |
|
|
#
|
20 |
|
|
# You should have received a copy of the GNU General Public License
|
21 |
|
|
# along with this program; if not, write to the Free Software
|
22 |
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
23 |
|
|
#
|
24 |
|
|
#-##############################################################################
|
25 |
|
|
|
26 |
|
|
# This requires perl version 5 or higher
|
27 |
|
|
require 5.0;
|
28 |
|
|
|
29 |
|
|
#++##############################################################################
|
30 |
|
|
#
|
31 |
|
|
# NOTE FOR DEBUGGING THIS SCRIPT:
|
32 |
|
|
# You can run 'perl texi2html.pl' directly, provided you have
|
33 |
|
|
# the environment variable T2H_HOME set to the directory containing
|
34 |
|
|
# the texi2html.init file
|
35 |
|
|
#
|
36 |
|
|
#--##############################################################################
|
37 |
|
|
|
38 |
|
|
# CVS version:
|
39 |
|
|
# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $
|
40 |
|
|
|
41 |
|
|
# Homepage:
|
42 |
|
|
$T2H_HOMEPAGE = <
|
43 |
|
|
http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
44 |
|
|
EOT
|
45 |
|
|
|
46 |
|
|
# Authors:
|
47 |
|
|
$T2H_AUTHORS = <
|
48 |
|
|
Written by: Lionel Cons (original author)
|
49 |
|
|
Karl Berry
|
50 |
|
|
Olaf Bachmann
|
51 |
|
|
and many others.
|
52 |
|
|
Maintained by: Olaf Bachmann
|
53 |
|
|
Send bugs and suggestions to
|
54 |
|
|
EOT
|
55 |
|
|
|
56 |
|
|
# Version: set in configure.in
|
57 |
|
|
$THISVERSION = '1.64';
|
58 |
|
|
$THISPROG = "texi2html $THISVERSION"; # program name and version
|
59 |
|
|
|
60 |
|
|
# The man page for this program is included at the end of this file and can be
|
61 |
|
|
# viewed using the command 'nroff -man texi2html'.
|
62 |
|
|
|
63 |
|
|
# Identity:
|
64 |
|
|
|
65 |
|
|
$T2H_TODAY = &pretty_date; # like "20 September 1993"
|
66 |
|
|
# the eval prevents this from breaking on system which do not have
|
67 |
|
|
# a proper getpwuid implemented
|
68 |
|
|
eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i
|
69 |
|
|
|
70 |
|
|
#+++############################################################################
|
71 |
|
|
# #
|
72 |
|
|
# Initialization #
|
73 |
|
|
# Pasted content of File $(srcdir)/texi2html.init: Default initializations #
|
74 |
|
|
# #
|
75 |
|
|
#---############################################################################
|
76 |
|
|
|
77 |
|
|
# leave this within comments, and keep the require statement
|
78 |
|
|
# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init
|
79 |
|
|
# exists.
|
80 |
|
|
|
81 |
|
|
#
|
82 |
|
|
# -*-perl-*-
|
83 |
|
|
######################################################################
|
84 |
|
|
# File: texi2html.init
|
85 |
|
|
#
|
86 |
|
|
# Sets default values for command-line arguments and for various customizable
|
87 |
|
|
# procedures
|
88 |
|
|
#
|
89 |
|
|
# A copy of this file is pasted into the beginning of texi2html by
|
90 |
|
|
# 'make texi2html'
|
91 |
|
|
#
|
92 |
|
|
# Copy this file and make changes to it, if you like.
|
93 |
|
|
# Afterwards, either, load it with command-line option -init_file
|
94 |
|
|
#
|
95 |
|
|
# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $
|
96 |
|
|
|
97 |
|
|
######################################################################
|
98 |
|
|
# stuff which can also be set by command-line options
|
99 |
|
|
#
|
100 |
|
|
#
|
101 |
|
|
# Note: values set here, overwrite values set by the command-line
|
102 |
|
|
# options before -init_file and might still be overwritten by
|
103 |
|
|
# command-line arguments following the -init_file option
|
104 |
|
|
#
|
105 |
|
|
|
106 |
|
|
# T2H_OPTIONS is a hash whose keys are the (long) names of valid
|
107 |
|
|
# command-line options and whose values are a hash with the following keys:
|
108 |
|
|
# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info)
|
109 |
|
|
# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info)
|
110 |
|
|
# verbose ==> short description of option (displayed by -h)
|
111 |
|
|
# noHelp ==> if 1 -> for "not so important options": only print description on -h 1
|
112 |
|
|
# 2 -> for obsolete options: only print description on -h 2
|
113 |
|
|
|
114 |
|
|
$T2H_DEBUG = 0;
|
115 |
|
|
$T2H_OPTIONS -> {debug} =
|
116 |
|
|
{
|
117 |
|
|
type => '=i',
|
118 |
|
|
linkage => \$main::T2H_DEBUG,
|
119 |
|
|
verbose => 'output HTML with debuging information',
|
120 |
|
|
};
|
121 |
|
|
|
122 |
|
|
$T2H_DOCTYPE = '';
|
123 |
|
|
$T2H_OPTIONS -> {doctype} =
|
124 |
|
|
{
|
125 |
|
|
type => '=s',
|
126 |
|
|
linkage => \$main::T2H_DOCTYPE,
|
127 |
|
|
verbose => 'document type which is output in header of HTML files',
|
128 |
|
|
noHelp => 1
|
129 |
|
|
};
|
130 |
|
|
|
131 |
|
|
$T2H_CHECK = 0;
|
132 |
|
|
$T2H_OPTIONS -> {check} =
|
133 |
|
|
{
|
134 |
|
|
type => '!',
|
135 |
|
|
linkage => \$main::T2H_CHECK,
|
136 |
|
|
verbose => 'if set, only check files and output all things that may be Texinfo commands',
|
137 |
|
|
noHelp => 1
|
138 |
|
|
};
|
139 |
|
|
|
140 |
|
|
# -expand
|
141 |
|
|
# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections
|
142 |
|
|
# else, neither expand @iftex, @tex, nor @ifinfo sections
|
143 |
|
|
$T2H_EXPAND = "info";
|
144 |
|
|
$T2H_OPTIONS -> {expand} =
|
145 |
|
|
{
|
146 |
|
|
type => '=s',
|
147 |
|
|
linkage => \$T2H_EXPAND,
|
148 |
|
|
verbose => 'Expand info|tex|none section of texinfo source',
|
149 |
|
|
};
|
150 |
|
|
|
151 |
|
|
# - glossary
|
152 |
|
|
#if set, uses section named `Footnotes' for glossary
|
153 |
|
|
$T2H_USE_GLOSSARY = 0;
|
154 |
|
|
T2H_OPTIONS -> {glossary} =
|
155 |
|
|
{
|
156 |
|
|
type => '!',
|
157 |
|
|
linkage => \$T2H_USE_GLOSSARY,
|
158 |
|
|
verbose => "if set, uses section named `Footnotes' for glossary",
|
159 |
|
|
noHelp => 1,
|
160 |
|
|
};
|
161 |
|
|
|
162 |
|
|
|
163 |
|
|
# -invisible
|
164 |
|
|
# $T2H_INVISIBLE_MARK is the text used to create invisible destination
|
165 |
|
|
# anchors for index links (you can for instance use the invisible.xbm
|
166 |
|
|
# file shipped with this program). This is a workaround for a known
|
167 |
|
|
# bug of many WWW browsers, including netscape.
|
168 |
|
|
# For me, it works fine without it -- on the contrary: if there, it
|
169 |
|
|
# inserts space between headers and start of text (obachman 3/99)
|
170 |
|
|
$T2H_INVISIBLE_MARK = '';
|
171 |
|
|
# $T2H_INVISIBLE_MARK = ' ';
|
172 |
|
|
$T2H_OPTIONS -> {invisible} =
|
173 |
|
|
{
|
174 |
|
|
type => '=s',
|
175 |
|
|
linkage => \$T2H_INVISIBLE_MARK,
|
176 |
|
|
verbose => 'use text in invisble anchot',
|
177 |
|
|
noHelp => 1,
|
178 |
|
|
};
|
179 |
|
|
|
180 |
|
|
# -iso
|
181 |
|
|
# if set, ISO8879 characters are used for special symbols (like copyright, etc)
|
182 |
|
|
$T2H_USE_ISO = 0;
|
183 |
|
|
$T2H_OPTIONS -> {iso} =
|
184 |
|
|
{
|
185 |
|
|
type => 'iso',
|
186 |
|
|
linkage => \$T2H_USE_ISO,
|
187 |
|
|
verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)',
|
188 |
|
|
noHelp => 1,
|
189 |
|
|
};
|
190 |
|
|
|
191 |
|
|
# -I
|
192 |
|
|
# list directories where @include files are searched for (besides the
|
193 |
|
|
# directory of the doc file) additional '-I' args add to this list
|
194 |
|
|
@T2H_INCLUDE_DIRS = (".");
|
195 |
|
|
$T2H_OPTIONS -> {I} =
|
196 |
|
|
{
|
197 |
|
|
type => '=s',
|
198 |
|
|
linkage => \@T2H_INCLUDE_DIRS,
|
199 |
|
|
verbose => 'append $s to the @include search path',
|
200 |
|
|
};
|
201 |
|
|
|
202 |
|
|
# -top_file
|
203 |
|
|
# uses file of this name for top-level file
|
204 |
|
|
# extension is manipulated appropriately, if necessary.
|
205 |
|
|
# If empty, .html is used
|
206 |
|
|
# Typically, you would set this to "index.html".
|
207 |
|
|
$T2H_TOP_FILE = '';
|
208 |
|
|
$T2H_OPTIONS -> {top_file} =
|
209 |
|
|
{
|
210 |
|
|
type => '=s',
|
211 |
|
|
linkage => \$T2H_TOP_FILE,
|
212 |
|
|
verbose => 'use $s as top file, instead of .html',
|
213 |
|
|
};
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
# -toc_file
|
217 |
|
|
# uses file of this name for table of contents file
|
218 |
|
|
# extension is manipulated appropriately, if necessary.
|
219 |
|
|
# If empty, _toc.html is used
|
220 |
|
|
$T2H_TOC_FILE = '';
|
221 |
|
|
$T2H_OPTIONS -> {toc_file} =
|
222 |
|
|
{
|
223 |
|
|
type => '=s',
|
224 |
|
|
linkage => \$T2H_TOC_FILE,
|
225 |
|
|
verbose => 'use $s as ToC file, instead of _toc.html',
|
226 |
|
|
};
|
227 |
|
|
|
228 |
|
|
# -frames
|
229 |
|
|
# if set, output two additional files which use HTML 4.0 "frames".
|
230 |
|
|
$T2H_FRAMES = 0;
|
231 |
|
|
$T2H_OPTIONS -> {frames} =
|
232 |
|
|
{
|
233 |
|
|
type => '!',
|
234 |
|
|
linkage => \$T2H_FRAMES,
|
235 |
|
|
verbose => 'output files which use HTML 4.0 frames (experimental)',
|
236 |
|
|
noHelp => 1,
|
237 |
|
|
};
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
# -menu | -nomenu
|
241 |
|
|
# if set, show the Texinfo menus
|
242 |
|
|
$T2H_SHOW_MENU = 1;
|
243 |
|
|
$T2H_OPTIONS -> {menu} =
|
244 |
|
|
{
|
245 |
|
|
type => '!',
|
246 |
|
|
linkage => \$T2H_SHOW_MENU,
|
247 |
|
|
verbose => 'ouput Texinfo menus',
|
248 |
|
|
};
|
249 |
|
|
|
250 |
|
|
# -number | -nonumber
|
251 |
|
|
# if set, number sections and show section names and numbers in references
|
252 |
|
|
# and menus
|
253 |
|
|
$T2H_NUMBER_SECTIONS = 1;
|
254 |
|
|
$T2H_OPTIONS -> {number} =
|
255 |
|
|
{
|
256 |
|
|
type => '!',
|
257 |
|
|
linkage => \$T2H_NUMBER_SECTIONS,
|
258 |
|
|
verbose => 'use numbered sections'
|
259 |
|
|
};
|
260 |
|
|
|
261 |
|
|
# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu
|
262 |
|
|
# entries, instead of section names
|
263 |
|
|
$T2H_NODE_NAME_IN_MENU = 0;
|
264 |
|
|
|
265 |
|
|
# if set and menu entry equals menu descr, then do not print menu descr.
|
266 |
|
|
# Likewise, if node name equals entry name, do not print entry name.
|
267 |
|
|
$T2H_AVOID_MENU_REDUNDANCY = 1;
|
268 |
|
|
|
269 |
|
|
# -split section|chapter|none
|
270 |
|
|
# if set to 'section' (resp. 'chapter') create one html file per (sub)section
|
271 |
|
|
# (resp. chapter) and separate pages for Top, ToC, Overview, Index,
|
272 |
|
|
# Glossary, About.
|
273 |
|
|
# otherwise, create monolithic html file which contains whole document
|
274 |
|
|
#$T2H_SPLIT = 'section';
|
275 |
|
|
$T2H_SPLIT = '';
|
276 |
|
|
$T2H_OPTIONS -> {split} =
|
277 |
|
|
{
|
278 |
|
|
type => '=s',
|
279 |
|
|
linkage => \$T2H_SPLIT,
|
280 |
|
|
verbose => 'split document on section|chapter else no splitting',
|
281 |
|
|
};
|
282 |
|
|
|
283 |
|
|
# -section_navigation|-no-section_navigation
|
284 |
|
|
# if set, then navigation panels are printed at the beginning of each section
|
285 |
|
|
# and, possibly at the end (depending on whether or not there were more than
|
286 |
|
|
# $T2H_WORDS_IN_PAGE words on page
|
287 |
|
|
# This is most useful if you do not want to have section navigation
|
288 |
|
|
# on -split chapter
|
289 |
|
|
$T2H_SECTION_NAVIGATION = 1;
|
290 |
|
|
$T2H_OPTIONS -> {sec_nav} =
|
291 |
|
|
{
|
292 |
|
|
type => '!',
|
293 |
|
|
linkage => \$T2H_SECTION_NAVIGATION,
|
294 |
|
|
verbose => 'output navigation panels for each section',
|
295 |
|
|
};
|
296 |
|
|
|
297 |
|
|
# -subdir
|
298 |
|
|
# if set put result files in this directory
|
299 |
|
|
# if not set result files are put into current directory
|
300 |
|
|
#$T2H_SUBDIR = 'html';
|
301 |
|
|
$T2H_SUBDIR = '';
|
302 |
|
|
$T2H_OPTIONS -> {subdir} =
|
303 |
|
|
{
|
304 |
|
|
type => '=s',
|
305 |
|
|
linkage => \$T2H_SUBDIR,
|
306 |
|
|
verbose => 'put HTML files in directory $s, instead of $cwd',
|
307 |
|
|
};
|
308 |
|
|
|
309 |
|
|
# -short_extn
|
310 |
|
|
# If this is set all HTML file will have extension ".htm" instead of
|
311 |
|
|
# ".html". This is helpful when shipping the document to PC systems.
|
312 |
|
|
$T2H_SHORTEXTN = 0;
|
313 |
|
|
$T2H_OPTIONS -> {short_ext} =
|
314 |
|
|
{
|
315 |
|
|
type => '!',
|
316 |
|
|
linkage => \$T2H_SHORTEXTN,
|
317 |
|
|
verbose => 'use "htm" extension for output HTML files',
|
318 |
|
|
};
|
319 |
|
|
|
320 |
|
|
|
321 |
|
|
# -prefix
|
322 |
|
|
# Set the output file prefix, prepended to all .html, .gif and .pl files.
|
323 |
|
|
# By default, this is the basename of the document
|
324 |
|
|
$T2H_PREFIX = '';
|
325 |
|
|
$T2H_OPTIONS -> {prefix} =
|
326 |
|
|
{
|
327 |
|
|
type => '=s',
|
328 |
|
|
linkage => \$T2H_PREFIX,
|
329 |
|
|
verbose => 'use as prefix for output files, instead of ',
|
330 |
|
|
};
|
331 |
|
|
|
332 |
|
|
# -o filename
|
333 |
|
|
# If set, generate monolithic document output html into $filename
|
334 |
|
|
$T2H_OUT = '';
|
335 |
|
|
$T2H_OPTIONS -> {out_file} =
|
336 |
|
|
{
|
337 |
|
|
type => '=s',
|
338 |
|
|
linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';},
|
339 |
|
|
verbose => 'if set, all HTML output goes into file $s',
|
340 |
|
|
};
|
341 |
|
|
|
342 |
|
|
# -short_ref
|
343 |
|
|
#if set cross-references are given without section numbers
|
344 |
|
|
$T2H_SHORT_REF = '';
|
345 |
|
|
$T2H_OPTIONS -> {short_ref} =
|
346 |
|
|
{
|
347 |
|
|
type => '!',
|
348 |
|
|
linkage => \$T2H_SHORT_REF,
|
349 |
|
|
verbose => 'if set, references are without section numbers',
|
350 |
|
|
};
|
351 |
|
|
|
352 |
|
|
# -idx_sum
|
353 |
|
|
# if value is set, then for each @prinindex $what
|
354 |
|
|
# $docu_name_$what.idx is created which contains lines of the form
|
355 |
|
|
# $key\t$ref sorted alphabetically (case matters)
|
356 |
|
|
$T2H_IDX_SUMMARY = 0;
|
357 |
|
|
$T2H_OPTIONS -> {idx_sum} =
|
358 |
|
|
{
|
359 |
|
|
type => '!',
|
360 |
|
|
linkage => \$T2H_IDX_SUMMARY,
|
361 |
|
|
verbose => 'if set, also output index summary',
|
362 |
|
|
noHelp => 1,
|
363 |
|
|
};
|
364 |
|
|
|
365 |
|
|
# -verbose
|
366 |
|
|
# if set, chatter about what we are doing
|
367 |
|
|
$T2H_VERBOSE = '';
|
368 |
|
|
$T2H_OPTIONS -> {Verbose} =
|
369 |
|
|
{
|
370 |
|
|
type => '!',
|
371 |
|
|
linkage => \$T2H_VERBOSE,
|
372 |
|
|
verbose => 'print progress info to stdout',
|
373 |
|
|
};
|
374 |
|
|
|
375 |
|
|
# -lang
|
376 |
|
|
# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title.
|
377 |
|
|
# To add a new language, supply list of titles (see $T2H_WORDS below).
|
378 |
|
|
# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02
|
379 |
|
|
# for definitions)
|
380 |
|
|
# Default's to 'en' if not set or no @documentlanguage is specified
|
381 |
|
|
$T2H_LANG = '';
|
382 |
|
|
$T2H_OPTIONS -> {lang} =
|
383 |
|
|
{
|
384 |
|
|
type => '=s',
|
385 |
|
|
linkage => sub {SetDocumentLanguage($_[1])},
|
386 |
|
|
verbose => 'use $s as document language (ISO 639 encoding)',
|
387 |
|
|
};
|
388 |
|
|
|
389 |
|
|
# -l2h
|
390 |
|
|
# if set, uses latex2html for generation of math content
|
391 |
|
|
$T2H_L2H = '';
|
392 |
|
|
$T2H_OPTIONS -> {l2h} =
|
393 |
|
|
{
|
394 |
|
|
type => '!',
|
395 |
|
|
linkage => \$T2H_L2H,
|
396 |
|
|
verbose => 'if set, uses latex2html for @math and @tex',
|
397 |
|
|
};
|
398 |
|
|
|
399 |
|
|
######################
|
400 |
|
|
# The following options are only relevant if $T2H_L2H is set
|
401 |
|
|
#
|
402 |
|
|
# -l2h_l2h
|
403 |
|
|
# name/location of latex2html progam
|
404 |
|
|
$T2H_L2H_L2H = "latex2html";
|
405 |
|
|
$T2H_OPTIONS -> {l2h_l2h} =
|
406 |
|
|
{
|
407 |
|
|
type => '=s',
|
408 |
|
|
linkage => \$T2H_L2H_L2H,
|
409 |
|
|
verbose => 'program to use for latex2html translation',
|
410 |
|
|
noHelp => 1,
|
411 |
|
|
};
|
412 |
|
|
|
413 |
|
|
# -l2h_skip
|
414 |
|
|
# if set, skips actual call to latex2html tries to reuse previously generated
|
415 |
|
|
# content, instead
|
416 |
|
|
$T2H_L2H_SKIP = '';
|
417 |
|
|
$T2H_OPTIONS -> {l2h_skip} =
|
418 |
|
|
{
|
419 |
|
|
type => '!',
|
420 |
|
|
linkage => \$T2H_L2H_SKIP,
|
421 |
|
|
verbose => 'if set, tries to reuse previously latex2html output',
|
422 |
|
|
noHelp => 1,
|
423 |
|
|
};
|
424 |
|
|
|
425 |
|
|
# -l2h_tmp
|
426 |
|
|
# if set, l2h uses this directory for temporarary files. The path
|
427 |
|
|
# leading to this directory may not contain a dot (i.e., a "."),
|
428 |
|
|
# otherwise, l2h will fail
|
429 |
|
|
$T2H_L2H_TMP = '';
|
430 |
|
|
$T2H_OPTIONS -> {l2h_tmp} =
|
431 |
|
|
{
|
432 |
|
|
type => '=s',
|
433 |
|
|
linkage => \$T2H_L2H_TMP,
|
434 |
|
|
verbose => 'if set, uses $s as temporary latex2html directory',
|
435 |
|
|
noHelp => 1,
|
436 |
|
|
};
|
437 |
|
|
|
438 |
|
|
# if set, cleans intermediate files (they all have the prefix $doc_l2h_)
|
439 |
|
|
# of l2h
|
440 |
|
|
$T2H_L2H_CLEAN = 1;
|
441 |
|
|
$T2H_OPTIONS -> {l2h_clean} =
|
442 |
|
|
{
|
443 |
|
|
type => '!',
|
444 |
|
|
linkage => \$T2H_L2H_CLEAN,
|
445 |
|
|
verbose => 'if set, do not keep intermediate latex2html files for later reuse',
|
446 |
|
|
noHelp => 1,
|
447 |
|
|
};
|
448 |
|
|
|
449 |
|
|
$T2H_OPTIONS -> {D} =
|
450 |
|
|
{
|
451 |
|
|
type => '=s',
|
452 |
|
|
linkage => sub {$main::value{@_[1]} = 1;},
|
453 |
|
|
verbose => 'equivalent to Texinfo "@set $s 1"',
|
454 |
|
|
noHelp => 1,
|
455 |
|
|
};
|
456 |
|
|
|
457 |
|
|
$T2H_OPTIONS -> {init_file} =
|
458 |
|
|
{
|
459 |
|
|
type => '=s',
|
460 |
|
|
linkage => \&LoadInitFile,
|
461 |
|
|
verbose => 'load init file $s'
|
462 |
|
|
};
|
463 |
|
|
|
464 |
|
|
|
465 |
|
|
##############################################################################
|
466 |
|
|
#
|
467 |
|
|
# The following can only be set in the init file
|
468 |
|
|
#
|
469 |
|
|
##############################################################################
|
470 |
|
|
|
471 |
|
|
# if set, center @image by default
|
472 |
|
|
# otherwise, do not center by default
|
473 |
|
|
$T2H_CENTER_IMAGE = 1;
|
474 |
|
|
|
475 |
|
|
# used as identation for block enclosing command @example, etc
|
476 |
|
|
# If not empty, must be enclosed in |
|
477 |
|
|
$T2H_EXAMPLE_INDENT_CELL = ' | ';
|
478 |
|
|
# same as above, only for @small
|
479 |
|
|
$T2H_SMALL_EXAMPLE_INDENT_CELL = ' | ';
|
480 |
|
|
# font size for @small
|
481 |
|
|
$T2H_SMALL_FONT_SIZE = '-1';
|
482 |
|
|
|
483 |
|
|
# if non-empty, and no @..heading appeared in Top node, then
|
484 |
|
|
# use this as header for top node/section, otherwise use value of
|
485 |
|
|
# @settitle or @shorttitle (in that order)
|
486 |
|
|
$T2H_TOP_HEADING = '';
|
487 |
|
|
|
488 |
|
|
# if set, use this chapter for 'Index' button, else
|
489 |
|
|
# use first chapter whose name matches 'index' (case insensitive)
|
490 |
|
|
$T2H_INDEX_CHAPTER = '';
|
491 |
|
|
|
492 |
|
|
# if set and $T2H_SPLIT is set, then split index pages at the next letter
|
493 |
|
|
# after they have more than that many entries
|
494 |
|
|
$T2H_SPLIT_INDEX = 100;
|
495 |
|
|
|
496 |
|
|
# if set (e.g., to index.html) replace hrefs to this file
|
497 |
|
|
# (i.e., to index.html) by ./
|
498 |
|
|
$T2H_HREF_DIR_INSTEAD_FILE = '';
|
499 |
|
|
|
500 |
|
|
########################################################################
|
501 |
|
|
# Language dependencies:
|
502 |
|
|
# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash
|
503 |
|
|
# To redefine one word, simply do:
|
504 |
|
|
# $T2H_WORDS->{}->{} = 'whatever' in your personal init file.
|
505 |
|
|
#
|
506 |
|
|
$T2H_WORDS_EN =
|
507 |
|
|
{
|
508 |
|
|
# titles of pages
|
509 |
|
|
'ToC_Title' => 'Table of Contents',
|
510 |
|
|
'Overview_Title' => 'Short Table of Contents',
|
511 |
|
|
'Index_Title' => 'Index',
|
512 |
|
|
'About_Title' => 'About this document',
|
513 |
|
|
'Footnotes_Title' => 'Footnotes',
|
514 |
|
|
'See' => 'See',
|
515 |
|
|
'see' => 'see',
|
516 |
|
|
'section' => 'section',
|
517 |
|
|
# If necessary, we could extend this as follows:
|
518 |
|
|
# # text for buttons
|
519 |
|
|
# 'Top_Button' => 'Top',
|
520 |
|
|
# 'ToC_Button' => 'Contents',
|
521 |
|
|
# 'Overview_Button' => 'Overview',
|
522 |
|
|
# 'Index_button' => 'Index',
|
523 |
|
|
# 'Back_Button' => 'Back',
|
524 |
|
|
# 'FastBack_Button' => 'FastBack',
|
525 |
|
|
# 'Prev_Button' => 'Prev',
|
526 |
|
|
# 'Up_Button' => 'Up',
|
527 |
|
|
# 'Next_Button' => 'Next',
|
528 |
|
|
# 'Forward_Button' =>'Forward',
|
529 |
|
|
# 'FastWorward_Button' => 'FastForward',
|
530 |
|
|
# 'First_Button' => 'First',
|
531 |
|
|
# 'Last_Button' => 'Last',
|
532 |
|
|
# 'About_Button' => 'About'
|
533 |
|
|
};
|
534 |
|
|
|
535 |
|
|
$T2H_WORD_DE =
|
536 |
|
|
{
|
537 |
|
|
'ToC_Title' => 'Inhaltsverzeichniss',
|
538 |
|
|
'Overview_Title' => 'Kurzes Inhaltsverzeichniss',
|
539 |
|
|
'Index_Title' => 'Index',
|
540 |
|
|
'About_Title' => 'Über dieses Dokument',
|
541 |
|
|
'Footnotes_Title' => 'Fußnoten',
|
542 |
|
|
'See' => 'Siehe',
|
543 |
|
|
'see' => 'siehe',
|
544 |
|
|
'section' => 'Abschnitt',
|
545 |
|
|
};
|
546 |
|
|
|
547 |
|
|
$T2H_WORD_NL =
|
548 |
|
|
{
|
549 |
|
|
'ToC_Title' => 'Inhoudsopgave',
|
550 |
|
|
'Overview_Title' => 'Korte inhoudsopgave',
|
551 |
|
|
'Index_Title' => 'Index', #Not sure ;-)
|
552 |
|
|
'About_Title' => 'No translation available!', #No translation available!
|
553 |
|
|
'Footnotes_Title' => 'No translation available!', #No translation available!
|
554 |
|
|
'See' => 'Zie',
|
555 |
|
|
'see' => 'zie',
|
556 |
|
|
'section' => 'sectie',
|
557 |
|
|
};
|
558 |
|
|
|
559 |
|
|
$T2H_WORD_ES =
|
560 |
|
|
{
|
561 |
|
|
'ToC_Title' => 'índice General',
|
562 |
|
|
'Overview_Title' => 'Resumen del Contenido',
|
563 |
|
|
'Index_Title' => 'Index', #Not sure ;-)
|
564 |
|
|
'About_Title' => 'No translation available!', #No translation available!
|
565 |
|
|
'Footnotes_Title' => 'Fußnoten',
|
566 |
|
|
'See' => 'Véase',
|
567 |
|
|
'see' => 'véase',
|
568 |
|
|
'section' => 'sección',
|
569 |
|
|
};
|
570 |
|
|
|
571 |
|
|
$T2H_WORD_NO =
|
572 |
|
|
{
|
573 |
|
|
'ToC_Title' => 'Innholdsfortegnelse',
|
574 |
|
|
'Overview_Title' => 'Kort innholdsfortegnelse',
|
575 |
|
|
'Index_Title' => 'Indeks', #Not sure ;-)
|
576 |
|
|
'About_Title' => 'No translation available!', #No translation available!
|
577 |
|
|
'Footnotes_Title' => 'No translation available!',
|
578 |
|
|
'See' => 'Se',
|
579 |
|
|
'see' => 'se',
|
580 |
|
|
'section' => 'avsnitt',
|
581 |
|
|
};
|
582 |
|
|
|
583 |
|
|
$T2H_WORD_PT =
|
584 |
|
|
{
|
585 |
|
|
'ToC_Title' => 'Sumário',
|
586 |
|
|
'Overview_Title' => 'Breve Sumário',
|
587 |
|
|
'Index_Title' => 'Índice', #Not sure ;-)
|
588 |
|
|
'About_Title' => 'No translation available!', #No translation available!
|
589 |
|
|
'Footnotes_Title' => 'No translation available!',
|
590 |
|
|
'See' => 'Veja',
|
591 |
|
|
'see' => 'veja',
|
592 |
|
|
'section' => 'Seção',
|
593 |
|
|
};
|
594 |
|
|
|
595 |
|
|
$T2H_WORDS =
|
596 |
|
|
{
|
597 |
|
|
'en' => $T2H_WORDS_EN,
|
598 |
|
|
'de' => $T2H_WORDS_DE,
|
599 |
|
|
'nl' => $T2H_WORDS_NL,
|
600 |
|
|
'es' => $T2H_WORDS_ES,
|
601 |
|
|
'no' => $T2H_WORDS_NO,
|
602 |
|
|
'pt' => $T2H_WORDS_PT
|
603 |
|
|
};
|
604 |
|
|
|
605 |
|
|
@MONTH_NAMES_EN =
|
606 |
|
|
(
|
607 |
|
|
'January', 'February', 'March', 'April', 'May',
|
608 |
|
|
'June', 'July', 'August', 'September', 'October',
|
609 |
|
|
'November', 'December'
|
610 |
|
|
);
|
611 |
|
|
|
612 |
|
|
@MONTH_NAMES_DE =
|
613 |
|
|
(
|
614 |
|
|
'Januar', 'Februar', 'März', 'April', 'Mai',
|
615 |
|
|
'Juni', 'Juli', 'August', 'September', 'Oktober',
|
616 |
|
|
'November', 'Dezember'
|
617 |
|
|
);
|
618 |
|
|
|
619 |
|
|
@MONTH_NAMES_NL =
|
620 |
|
|
(
|
621 |
|
|
'Januari', 'Februari', 'Maart', 'April', 'Mei',
|
622 |
|
|
'Juni', 'Juli', 'Augustus', 'September', 'Oktober',
|
623 |
|
|
'November', 'December'
|
624 |
|
|
);
|
625 |
|
|
|
626 |
|
|
@MONTH_NAMES_ES =
|
627 |
|
|
(
|
628 |
|
|
'enero', 'febrero', 'marzo', 'abril', 'mayo',
|
629 |
|
|
'junio', 'julio', 'agosto', 'septiembre', 'octubre',
|
630 |
|
|
'noviembre', 'diciembre'
|
631 |
|
|
);
|
632 |
|
|
|
633 |
|
|
@MONTH_NAMES_NO =
|
634 |
|
|
(
|
635 |
|
|
|
636 |
|
|
'januar', 'februar', 'mars', 'april', 'mai',
|
637 |
|
|
'juni', 'juli', 'august', 'september', 'oktober',
|
638 |
|
|
'november', 'desember'
|
639 |
|
|
);
|
640 |
|
|
|
641 |
|
|
@MONTH_NAMES_PT =
|
642 |
|
|
(
|
643 |
|
|
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio',
|
644 |
|
|
'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro',
|
645 |
|
|
'Novembro', 'Dezembro'
|
646 |
|
|
);
|
647 |
|
|
|
648 |
|
|
|
649 |
|
|
$MONTH_NAMES =
|
650 |
|
|
{
|
651 |
|
|
'en' => \@MONTH_NAMES_EN,
|
652 |
|
|
'de' => \@MONTH_NAMES_DE,
|
653 |
|
|
'es' => \@MONTH_NAMES_ES,
|
654 |
|
|
'nl' => \@MONTH_NAMES_NL,
|
655 |
|
|
'no' => \@MONTH_NAMES_NO,
|
656 |
|
|
'pt' => \@MONTH_NAMES_PT
|
657 |
|
|
};
|
658 |
|
|
########################################################################
|
659 |
|
|
# Control of Page layout:
|
660 |
|
|
# You can make changes of the Page layout at two levels:
|
661 |
|
|
# 1.) For small changes, it is often enough to change the value of
|
662 |
|
|
# some global string/hash/array variables
|
663 |
|
|
# 2.) For larger changes, reimplement one of the T2H_DEFAULT_* routines,
|
664 |
|
|
# give them another name, and assign them to the respective
|
665 |
|
|
# $T2H_ variable.
|
666 |
|
|
|
667 |
|
|
# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold
|
668 |
|
|
# href, html-name, node-name of
|
669 |
|
|
# This -- current section (resp. html page)
|
670 |
|
|
# Top -- top page ($T2H_TOP_FILE)
|
671 |
|
|
# Contents -- Table of contents
|
672 |
|
|
# Overview -- Short table of contents
|
673 |
|
|
# Index -- Index page
|
674 |
|
|
# About -- page which explain "navigation buttons"
|
675 |
|
|
# First -- first node
|
676 |
|
|
# Last -- last node
|
677 |
|
|
#
|
678 |
|
|
# Whether or not the following hash values are set, depends on the context
|
679 |
|
|
# (all values are w.r.t. 'This' section)
|
680 |
|
|
# Next -- next node of texinfo
|
681 |
|
|
# Prev -- previous node of texinfo
|
682 |
|
|
# Up -- up node of texinfo
|
683 |
|
|
# Forward -- next node in reading order
|
684 |
|
|
# Back -- previous node in reading order
|
685 |
|
|
# FastForward -- if leave node, up and next, else next node
|
686 |
|
|
# FastBackward-- if leave node, up and prev, else prev node
|
687 |
|
|
#
|
688 |
|
|
# Furthermore, the following global variabels are set:
|
689 |
|
|
# $T2H_THISDOC{title} -- title as set by @setttile
|
690 |
|
|
# $T2H_THISDOC{fulltitle} -- full title as set by @title...
|
691 |
|
|
# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle
|
692 |
|
|
# $T2H_THISDOC{author} -- author as set by @author
|
693 |
|
|
#
|
694 |
|
|
# and pointer to arrays of lines which need to be printed by t2h_print_lines
|
695 |
|
|
# $T2H_OVERVIEW -- lines of short table of contents
|
696 |
|
|
# $T2H_TOC -- lines of table of contents
|
697 |
|
|
# $T2H_TOP -- lines of Top texinfo node
|
698 |
|
|
# $T2H_THIS_SECTION -- lines of 'This' section
|
699 |
|
|
|
700 |
|
|
#
|
701 |
|
|
# There are the following subs which control the layout:
|
702 |
|
|
#
|
703 |
|
|
$T2H_print_section = \&T2H_DEFAULT_print_section;
|
704 |
|
|
$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header;
|
705 |
|
|
$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer;
|
706 |
|
|
$T2H_print_Top = \&T2H_DEFAULT_print_Top;
|
707 |
|
|
$T2H_print_Toc = \&T2H_DEFAULT_print_Toc;
|
708 |
|
|
$T2H_print_Overview = \&T2H_DEFAULT_print_Overview;
|
709 |
|
|
$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes;
|
710 |
|
|
$T2H_print_About = \&T2H_DEFAULT_print_About;
|
711 |
|
|
$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header;
|
712 |
|
|
$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer;
|
713 |
|
|
$T2H_print_misc = \&T2H_DEFAULT_print_misc;
|
714 |
|
|
$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header;
|
715 |
|
|
$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer;
|
716 |
|
|
$T2H_print_page_head = \&T2H_DEFAULT_print_page_head;
|
717 |
|
|
$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot;
|
718 |
|
|
$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation;
|
719 |
|
|
$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation;
|
720 |
|
|
$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img;
|
721 |
|
|
$T2H_print_navigation = \&T2H_DEFAULT_print_navigation;
|
722 |
|
|
$T2H_about_body = \&T2H_DEFAULT_about_body;
|
723 |
|
|
$T2H_print_frame = \&T2H_DEFAULT_print_frame;
|
724 |
|
|
$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame;
|
725 |
|
|
|
726 |
|
|
########################################################################
|
727 |
|
|
# Layout for html for every sections
|
728 |
|
|
#
|
729 |
|
|
sub T2H_DEFAULT_print_section
|
730 |
|
|
{
|
731 |
|
|
my $fh = shift;
|
732 |
|
|
local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS;
|
733 |
|
|
&$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION;
|
734 |
|
|
my $nw = t2h_print_lines($fh);
|
735 |
|
|
if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION)
|
736 |
|
|
{
|
737 |
|
|
&$T2H_print_foot_navigation($fh, $nw);
|
738 |
|
|
}
|
739 |
|
|
else
|
740 |
|
|
{
|
741 |
|
|
print $fh ' ' . "\n";
|
742 |
|
|
}
|
743 |
|
|
}
|
744 |
|
|
|
745 |
|
|
###################################################################
|
746 |
|
|
# Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
|
747 |
|
|
# @html within the Top texinfo node to specify content of top-level
|
748 |
|
|
# page.
|
749 |
|
|
#
|
750 |
|
|
# If you enclose everything in @ifnothtml, then title, subtitle,
|
751 |
|
|
# author and overview is printed
|
752 |
|
|
# T2H_HREF of Next, Prev, Up, Forward, Back are not defined
|
753 |
|
|
# if $T2H_SPLIT then Top page is in its own html file
|
754 |
|
|
sub T2H_DEFAULT_print_Top_header
|
755 |
|
|
{
|
756 |
|
|
&$T2H_print_page_head(@_) if $T2H_SPLIT;
|
757 |
|
|
t2h_print_label(@_); # this needs to be called, otherwise no label set
|
758 |
|
|
&$T2H_print_head_navigation(@_);
|
759 |
|
|
}
|
760 |
|
|
sub T2H_DEFAULT_print_Top_footer
|
761 |
|
|
{
|
762 |
|
|
&$T2H_print_foot_navigation(@_);
|
763 |
|
|
&$T2H_print_page_foot(@_) if $T2H_SPLIT;
|
764 |
|
|
}
|
765 |
|
|
sub T2H_DEFAULT_print_Top
|
766 |
|
|
{
|
767 |
|
|
my $fh = shift;
|
768 |
|
|
|
769 |
|
|
# for redefining navigation buttons use:
|
770 |
|
|
# local $T2H_BUTTONS = [...];
|
771 |
|
|
# as it is, 'Top', 'Contents', 'Index', 'About' are printed
|
772 |
|
|
local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
|
773 |
|
|
&$T2H_print_Top_header($fh);
|
774 |
|
|
if ($T2H_THIS_SECTION)
|
775 |
|
|
{
|
776 |
|
|
# if top-level node has content, then print it with extra header
|
777 |
|
|
print $fh "$T2H_NAME{Top}"
|
778 |
|
|
unless ($T2H_HAS_TOP_HEADING);
|
779 |
|
|
t2h_print_lines($fh, $T2H_THIS_SECTION)
|
780 |
|
|
}
|
781 |
|
|
else
|
782 |
|
|
{
|
783 |
|
|
# top-level node is fully enclosed in @ifnothtml
|
784 |
|
|
# print fulltitle, subtitle, author, Overview
|
785 |
|
|
print $fh
|
786 |
|
|
"\n" .
|
787 |
|
|
join("\n", split(/\n/, $T2H_THISDOC{fulltitle})) .
|
788 |
|
|
"\n";
|
789 |
|
|
print $fh "$T2H_THISDOC{subtitle}\n" if $T2H_THISDOC{subtitle};
|
790 |
|
|
print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author};
|
791 |
|
|
print $fh <
|
792 |
|
|
|
793 |
|
|
|
794 |
|
|
|
795 |
|
|
Overview:
|
796 |
|
|
|
797 |
|
|
EOT
|
798 |
|
|
t2h_print_lines($fh, $T2H_OVERVIEW);
|
799 |
|
|
print $fh "\n";
|
800 |
|
|
}
|
801 |
|
|
&$T2H_print_Top_footer($fh);
|
802 |
|
|
}
|
803 |
|
|
|
804 |
|
|
###################################################################
|
805 |
|
|
# Layout of Toc, Overview, and Footnotes pages
|
806 |
|
|
# By default, we use "normal" layout
|
807 |
|
|
# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined
|
808 |
|
|
# use: local $T2H_BUTTONS = [...] to redefine navigation buttons
|
809 |
|
|
sub T2H_DEFAULT_print_Toc
|
810 |
|
|
{
|
811 |
|
|
return &$T2H_print_misc(@_);
|
812 |
|
|
}
|
813 |
|
|
sub T2H_DEFAULT_print_Overview
|
814 |
|
|
{
|
815 |
|
|
return &$T2H_print_misc(@_);
|
816 |
|
|
}
|
817 |
|
|
sub T2H_DEFAULT_print_Footnotes
|
818 |
|
|
{
|
819 |
|
|
return &$T2H_print_misc(@_);
|
820 |
|
|
}
|
821 |
|
|
sub T2H_DEFAULT_print_About
|
822 |
|
|
{
|
823 |
|
|
return &$T2H_print_misc(@_);
|
824 |
|
|
}
|
825 |
|
|
|
826 |
|
|
sub T2H_DEFAULT_print_misc_header
|
827 |
|
|
{
|
828 |
|
|
&$T2H_print_page_head(@_) if $T2H_SPLIT;
|
829 |
|
|
# this needs to be called, otherwise, no labels are set
|
830 |
|
|
t2h_print_label(@_);
|
831 |
|
|
&$T2H_print_head_navigation(@_);
|
832 |
|
|
}
|
833 |
|
|
sub T2H_DEFAULT_print_misc_footer
|
834 |
|
|
{
|
835 |
|
|
&$T2H_print_foot_navigation(@_);
|
836 |
|
|
&$T2H_print_page_foot(@_) if $T2H_SPLIT;
|
837 |
|
|
}
|
838 |
|
|
sub T2H_DEFAULT_print_misc
|
839 |
|
|
{
|
840 |
|
|
my $fh = shift;
|
841 |
|
|
local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
|
842 |
|
|
&$T2H_print_misc_header($fh);
|
843 |
|
|
print $fh "$T2H_NAME{This}\n";
|
844 |
|
|
t2h_print_lines($fh);
|
845 |
|
|
&$T2H_print_misc_footer($fh);
|
846 |
|
|
}
|
847 |
|
|
|
848 |
|
|
###################################################################
|
849 |
|
|
# chapter_header and chapter_footer are only called if
|
850 |
|
|
# T2H_SPLIT eq 'chapter'
|
851 |
|
|
# chapter_header: after print_page_header, before print_section
|
852 |
|
|
# chapter_footer: after print_section of last section, before print_page_footer
|
853 |
|
|
#
|
854 |
|
|
# If you want to get rid of navigation stuff after each section,
|
855 |
|
|
# redefine print_section such that it does not call print_navigation,
|
856 |
|
|
# and put print_navigation into print_chapter_header
|
857 |
|
|
@T2H_CHAPTER_BUTTONS =
|
858 |
|
|
(
|
859 |
|
|
'FastBack', 'FastForward', ' ',
|
860 |
|
|
' ', ' ', ' ', ' ',
|
861 |
|
|
'Top', 'Contents', 'Index', 'About',
|
862 |
|
|
);
|
863 |
|
|
|
864 |
|
|
sub T2H_DEFAULT_print_chapter_header
|
865 |
|
|
{
|
866 |
|
|
# nothing to do there, by default
|
867 |
|
|
if (! $T2H_SECTION_NAVIGATION)
|
868 |
|
|
{
|
869 |
|
|
my $fh = shift;
|
870 |
|
|
local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
|
871 |
|
|
&$T2H_print_navigation($fh);
|
872 |
|
|
print $fh "\n \n";
|
873 |
|
|
}
|
874 |
|
|
}
|
875 |
|
|
|
876 |
|
|
sub T2H_DEFAULT_print_chapter_footer
|
877 |
|
|
{
|
878 |
|
|
local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
|
879 |
|
|
&$T2H_print_navigation(@_);
|
880 |
|
|
}
|
881 |
|
|
###################################################################
|
882 |
|
|
$T2H_TODAY = &pretty_date; # like "20 September 1993"
|
883 |
|
|
|
884 |
|
|
sub pretty_date {
|
885 |
|
|
local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
|
886 |
|
|
|
887 |
|
|
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
|
888 |
|
|
$year += ($year < 70) ? 2000 : 1900;
|
889 |
|
|
# obachman: Let's do it as the Americans do
|
890 |
|
|
return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year);
|
891 |
|
|
}
|
892 |
|
|
|
893 |
|
|
|
894 |
|
|
###################################################################
|
895 |
|
|
# Layout of standard header and footer
|
896 |
|
|
#
|
897 |
|
|
|
898 |
|
|
# Set the default body text, inserted between
|
899 |
|
|
###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
|
900 |
|
|
$T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
|
901 |
|
|
# text inserted after
|
902 |
|
|
$T2H_AFTER_BODY_OPEN = '';
|
903 |
|
|
#text inserted before
|
904 |
|
|
$T2H_PRE_BODY_CLOSE = '';
|
905 |
|
|
# this is used in footer
|
906 |
|
|
$T2H_ADDRESS = "by $T2H_USER " if $T2H_USER;
|
907 |
|
|
$T2H_ADDRESS .= "on $T2H_TODAY";
|
908 |
|
|
# this is added inside after and some META NAME stuff
|
909 |
|
|
# can be used for
|