summaryrefslogtreecommitdiff
path: root/help/wp-conv/html2latex.html
blob: f40d6c35bdc8cf109477a0b371d04ebc0037c916 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>html2latex(1)</title>
</head>

<body>

<p>Up to the <a href="http://tug.org">TUG homepage (external link)</a><br>

Up to <a href="textopc.html">Converters from LaTeX to PC
Textprocessors - Overview</a></p>

<h1>NAME</h1>

<p>html2latex -- convert HTML markup to LaTeX markup </p>

<p>The original author, Nathan Torrington, wrote:<br>

"The source is available
<a href="http://www.vuw.ac.nz/non-local/software/html2latex-0.9c.tar.Z">here (external link)</a>",
<br>
but this is obviously no longer the case. <br>
Instead, I (W.Hennings) put it <a href="bin/html2ltx.zip">here</a>.
This zip-file includes an msdos executable. <br>
There is another compiled version on CTAN which I also put
<a href="bin/html2LaTeX.zip">here</a> (see <a href="html2LaTeX.txt">description</a>), but both
result from the same source. </p>

<p></p>

<h1>SYNOPSIS</h1>

<p><tt>html2latex <i>[opt ...] [file ...]</i></tt>
</p>

<h1>DESCRIPTION</h1>

<p>For each file argument, <i>html2latex</i>
converts the text as HTML markup to LaTeX markup. If no files are 
specified, a usage message is given.
Input will be taken from standard input for files named <em>-</em>.
Output will to a similarly named file with a <b>.tex</b> 
extension (<i>html2latex</i> recognises
<b>.html</b> extensions). </p>

<p>Options modify the action of <i>html2latex</i>.
The options are: </p>

<dl>

  <dt>-n</dt>

  <dd>Number sections. </dd>

  <dt>-p</dt>

  <dd>Place page breaks after the title page (if present) and the
table of
contents (if present). </dd>

  <dt>-c</dt>

  <dd>Generate a table of contents. </dd>

  <dt>-s</dt>

  <dd>Create no files -- LaTeX is output to stdout. </dd>

  <dt>-t Title</dt>

  <dd>Generate a title page, with the title 'Title'. </dd>

  <dt>-a Author</dt>

  <dd>Generate a title page, with the author 'Author'. </dd>

</dl>

<h1>EXAMPLES</h1>

<p>An example of use is html2latex -n - &lt; file.html | less
This converts <b>file.html</b> to LaTeX and pages through the output. 
The sections (corresponding to heading tags in the HTML source) will 
be numbered. </p>

<p>Another example is html2latex -t 'Introduction to HTML' -a
gnat -p -c html-intro This takes input from the file <b>html-intro</b>,
writing to <b>html-intro.tex</b>, and adds a title page 
(with title <i>Introduction to HTML</i> and 
author <i>gnat</i>) and table of contents with page-breaks after
both. The sections of the document are not numbered. </p>

<h1>BUGS</h1>

<p>Current the only HTML tags supported are: <b>TITLE, H1,
H2, H3, H4, H5, H6,
UL, OL, DL, DT, DD, LI, B, I, U, EM, STRONG, CODE, SAMP, KBD, VAR, DFN,
CITE, LISTING</b>. The only recognised SGML escapes are <b>&amp;amp,
&amp;lt,
&amp;gt</b>. <b>ADDRESS</b> tags are handled
badly. </p>

<p>The <b>COMPACT</b> attribute to a <b>DL</b>
tag is not recognised.
<b>MENU</b> and <b>DIR</b> styles are not handled well. 
<b>TITLE</b> text are ignored. </p>

<p>Currently <b>PRE</b> tags are not handled at all.
</p>

<p>The entire file is read into memory. For long HTML documents
on machines with little memory, this may cause problems. </p>

<h1>CREDITS</h1>

<p>Nathan Torkington adapted the HTML parser from NCSA's Xmosaic
package
(<b>file://ncsa.uiuc.edu/Web/xmosaic</b>) and wrote the
conversion code. The HTML parser code is subject to the NCSA 
restrictions. The conversion code is subject to the VUW restrictions. 
Enquiries should be sent via e-mail to
<tt>Nathan.Torkington "at" vuw.ac.nz</tt>. </p>

<p></p>

<hr>
<p>This HTML page is part of the texconv pages.<br>
Copyright © 1998, 1999, 2000, 2001, 2007, 2008 Wilfried Hennings<br>
You may copy and redistribute it under the following conditions:</p>

<ul>

  <li>it must remain intact and the contents unchanged; if you'd
like to have something changed, contact me (texconvfaq "at" gmx.de). 
Reformatting (e.g. from HTML to some other presentation format) 
is granted as long as the contents are unchanged. </li>

  <li>you may NOT ask money for it except a reasonable cost for
media and distribution</li>

</ul>

<p>Please also note the <a href="index.html#disclaimer">disclaimer</a>.</p>

</body>
</html>