Debian Codegraph @

texmf-dist/doc/latex/foilhtml/foilhtml-96.perl

raw
1 ######################################################
2 #
3 # This is file `foilhtml.perl',
4 # generated with the docstrip utility.
5 #
6 # Copyright Boris Veytsman 1998
7 #
8 # You are *not* allowed to modify this file.
9 #
10 # You are *not* allowed to distribute this file.
11 # For distribution of the original source see
12 # the terms for copying and modification in the file
13 # foilhtml.dtx
14 #
15 $FOILHEADLEVEL = 4 unless defined($FOILHEADLEVEL);
16 %section_commands=('foilhead',$FOILHEADLEVEL,
17 'rotatefoilhead',$FOILHEADLEVEL,%section_commands);
18
19 %new_section_headings = ('foilhead', 'H1','rotatefoilhead','H1');
20 &generate_new_sectioning_subs;
21
22 sub generate_new_sectioning_subs{
23 local($key, $val);
24 while ( ($key, $val) = each %new_section_headings) {
25 eval "sub do_cmd_$key {"
26 . 'local($after) = @_;'
27 . '&do_cmd_section_helper(' . $val . ');}';
28 %section_commands=($key,$val,%section_commands);
29 }
30 };
31 $FOILCLASS = 'article' unless defined $FOILCLASS;
32 $FOILOPTIONS = '10pt' unless defined $FOILOPTIONS;
33 sub make_latex{
34 # This is the environment in which to process constructs that cannot be
35 # translated to HTML.
36 # The environment tex2html_wrap will be wrapped around any shorthand
37 # environments (e.g. $, \(, \[).
38 # The tex2html_wrap environment will be treated as an unrecognised
39 # evironment by the translator and its contents (i.e. the 'shorthand'
40 # environment) will be passed to latex for processing as usual.
41 local($contents) = @_;
42 local($preamble) = $preamble;
43 # Make the @ character a normal letter ...
44 $preamble =~
45 s/\\documentclass.*/
46 \\documentclass\[$FOILOPTIONS\]{$FOILCLASS}\\makeatletter/;
47 # ... and make it special again after the preamble
48 ($DEBUG ? "\\nonstopmode" : "\\batchmode") .
49 "\n$preamble\n\\makeatother\n" .
50 "\\newenvironment{tex2html_wrap}{}{}\n" .
51 "\\newwrite\\lthtmlwrite\n" .
52 "\\def\\lthtmltypeout#1%\n" .
53 "{{\\let\\protect\\string\\immediate\\write\\lthtmlwrite{#1}}}%\n" .
54 "\\newbox\\sizebox\n" .
55 # "\\textheight 250cm\n" .
56 "\\begin{document}\n" .
57 "\\pagestyle{empty}\n" .
58 "$contents\n".
59 "\\end{document}";
60 }
61 &ignore_commands( <<_IGNORED_CMDS_);
62 portraitfoils
63 lanscapefoils
64 MyLogo # {}
65 Restriction # {}
66 LogoOff
67 LogoOn
68 rightfooter # {}
69 rightheader # {}
70 leftheader # {}
71 newnonfloat #{} #{}
72 foilheadskip # &ignore_numeric_argument
73 abovefloatskip # &ignore_numeric_argument
74 captionwidth # &ignore_numeric_argument
75 titleauthorskip # &ignore_numeric_argument
76 authorauthorskip # &ignore_numeric_argument
77 authordateskip # &ignore_numeric_argument
78 dateabstractskip # &ignore_numeric_argument
79 zerolistvertdimens
80 _IGNORED_CMDS_
81 1; # This should be the last line