File: latex2html.init

package info (click to toggle)
wip 2p3-4
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 3,196 kB
  • ctags: 893
  • sloc: ansic: 13,319; csh: 962; makefile: 123; sed: 92; sh: 17
file content (162 lines) | stat: -rw-r--r-- 4,089 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#
#  This removes the machine dependent nature of the return address.
#
$ADDRESS = "<I>morgan\@astro.umd.edu<BR>\n$address_data[2]</I>";

#
#  This keeps wip.sty from being included (it has some TeX stuff in it).
#
$DONT_INCLUDE .= ":wip";

#
# The call to prefigs is done to increase the split depth so
# sections are added to the appendix listing.
#
# Because verbatim entries are also written to the TMP file, I
# need the call to postfigs to flush out the associated array %verbatim.
#
sub do_cmd_prefigs {
    ++$MAX_SPLIT_DEPTH;
    ''; # So the value of MAX_SPLIT_DEPTH are ignored....
}

sub do_cmd_postfigs {
    &read_mydb(*verbatim, "verbatim");
    ''; # So the contents of read_mydb are ignored....
}

# Uses $texfilepath defined in sub driver
sub get_real_filename {
    local($infile) = @_;
    local($fullfile);
    local($path, $file) = &get_full_path($infile);

    if (-f "$path/$file") {
       $fullfile = "$path/$file";
    } elsif (-f "$texfilepath/$infile") {
       $fullfile = "$texfilepath/$infile";
    } else {
       $fullfile = "$infile";
    }
    $fullfile;
}

#  Calls sub pre_process and slurp_input.
#  Uses $next_pair_pr_rx.
sub do_cmd_fileverbatim {
    local($_) = @_;
    local($rest) = $_;
    local($fullfile, $string);

    $rest =~ s/$next_pair_pr_rx//o;
    $fullfile = &get_real_filename($2);

    if (-e $fullfile) {
       print "\nReading Verbatim file $fullfile ...";

       $string = "\\begin{rawhtml}\n<PRE>\n";
       $string .= &slurp_input($fullfile);
       $string .= "</PRE>\n\\end{rawhtml}\n";
       $_ = $string;
       &pre_process;
       join('',$_,$rest);
    } else {
       $rest;
    }
}

#  Uses $next_pair_pr_rx.
sub do_cmd_esc {
    local($_) = @_;
    local($rest) = $_;
    $rest =~ s/$next_pair_pr_rx//o;
    join('',"\\",$&,$rest);
}

#  Calls sub do_cmd_label.
sub do_cmd_mylabel {
    &do_cmd_label(@_);
}

#  Uses $next_pair_pr_rx.
#  Calls sub mark_string.
sub do_cmd_wipplot {
    local($_) = @_;
    local($rest) = $_;
    local($arg, $fullfile);

    $rest =~ s/$next_pair_pr_rx//o;
    $arg = $2;
    $fullfile = &get_real_filename("Examples/$arg.ps");

    if (-e $fullfile) {
      $_ = "\\epsfbox{$fullfile}";
    } else {
      $_ = <<'EOS';
\begin{center}
To generate this plot, move to the examples directory \\
({\tt {\em \wip main}/doc/Examples}) and use the command: \\
\% {\tt \wip .csh FILEARG}
\end{center}
EOS
      s/FILEARG/$arg/o;
    }

    &mark_string;
    join('',$_,$rest);
}
#
#  This is just like &do_env_description() except it provides a default
#  label and forces COMPACT.
#
sub do_env_wiplist {
    local($_) = @_;
    $* = 1;               # Multiline matching ON
    s/$item_description_rx/<DT>$1\n<DD>/g;
    # and just in case the description is empty ...
    s/\\item$delimiter_rx/<DT>WIP;SPM_gt;<DD>$1/g;
    $* = 0;               # Multiline matching OFF
    "<DL COMPACT>$_ \n </DL>";
}

#
#  The following makes latex2html ignore these spacing commands.
#
&ignore_commands(<<_IG_CMDS_);
nonstopmode
cleardoublepage
clearevenpage
wip # \$_ = join('','WIP',\$_)
wipp # \$_ = join('','WIP&gt; ',\$_)
wipd # \$_ = join('','DEFINE&gt; ',\$_)
wipi # \$_ = join('','INSERT&gt; ',\$_)
wipinit # \$_ = join('',"<CODE>\.wipinit <\/CODE>",\$_)
eg # \$_ = join('',"<EM>e\.g\. <\/EM>",\$_)
ie # \$_ = join('',"<EM>i\.e\. <\/EM>",\$_)
myfile # {}
newif
ifdebug
debugfalse
debugtrue
ifdoplot
doplottrue
doplotfalse
hfill # \$_ = join('','&nbsp;&nbsp;&nbsp;&nbsp;',\$_)
samepage # \$_ = join('',' ',\$_)
_IG_CMDS_

#
#  This next item limits the main tree to parts and chapters.
#  It is increased just before figures are included in the appendix.
#  The scale factors keep the inserted items from being too different
#  from the surrounding text.  The last item includes part and section
#  numbers.  This keeps the hypertext closely related to the printed
#  stuff (especially since some references use section numbers as refs).
#
$MAX_SPLIT_DEPTH = 2;
$MATH_SCALE_FACTOR = 1.0;
$FIGURE_SCALE_FACTOR = 1.0;
$SHOW_SECTION_NUMBERS = 1;

#  This next line must be the last command!
1;