summaryrefslogtreecommitdiff
path: root/support/hypertex/hypertex/index.html
blob: b2ba8909ce9cf0b5bae4e2e710190bc58af39f01 (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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<html><head><title>HyperTeX</title></head><body>
<h1><img src="hypertex.gif"> HyperTeX</h1>

<ul>
<li><a href="#dvi">dvi Previewers</a> and 
<a href="#hyperps">hyperPS</a> (11/94)
<li><a href="#pdf">Acrobat (.pdf)</a>
<li><a href="#more">Modified Macropackages</a>
<li><a href="#examples">Example .dvi files</a>
<li><a href="#external">External and relative URL's</a>
<li><a href="#added">Additional clarifying comments</a>
<li><a href="#questions">contacts for questions</a>
<li>hypertex
    <a href="ftp://snorri.chem.washington.edu/hypertex/hypertex-faq">FAQ</a>
<li><a href="/faq/tarfaq.html">Instructions</a> for downloading .tar.gz files
</ul>
<form action="/form/hep-th"><ul>
<li> back to <a href="/">xxx</a> <input type="submit" value="form interface">
</ul>
</form>
<hr>
It is easier to add hypertext capability to TeX than to simulate
the TeX typesetting environment within www browsers. (And for scientific
text, total author control over formatting and fonts is frequently preferred.)
The standard promoted here is to insert \special commands that add the
necessary structure to the .dvi file. For <a name="burble">example</a>,
<blockquote>
\def\href#1#2{\special{html:&lt;a href="#1"&gt;}{#2}\special{html:&lt;/a&gt;}}
</blockquote>
allows one to surround text with the necessary specials, so that
<blockquote>
Here is a link to \href{http://xxx.lanl.gov/}{xxx}.
</blockquote>
will insert the desired anchored text. The link can be to an arbitrary
network URL (including e.g. photos, movies, sound files, mathematica files,
etc.) Downward compatibility is ensured, since dvi drivers that
do not recognize the \specials will ignore them (although some, such as dvips,
will currently issue warnings at each occurrence).
<p>
The object is not only 
to provide hyperlink functionality to external (network) resources, but also
to provide a means of transmitting much of the
important structural and contextual information (sections, subsections,
equations, references, ...) <a href="#more">already</a> contained in the
underlying .tex for suitable gui postprocessing, whether directly
by .dvi previewer or after higher level translation 
(e.g. to .<a href="#pdf">pdf</a>).

<h2><a name="dvi">dvi Previewers</a></h2>
Two dvi previewers are currently under development to implement this
functionality:
<ul>
<li>The source code for xhdvi, the modified X windows dvi previewer, is
available via anonymous ftp at <A HREF="ftp://snorri.chem.washington.edu/pub/hypertex/">snorri.chem.washington.edu:/pub/hypertex</A>,
courtesy of Arthur Smith (asmith@bigsky.chem.washington.edu).
The latest version at the time of this (18 Jun 95) was
<a href="ftp://snorri.chem.washington.edu/pub/hypertex" name="xhdvisource">xhdvi_0.8a</a>, and it
was tested on sun, hp, and sgi -- by popular request, here are some precompiled
<a href="ftp://snorri.chem.washington.edu/hypertex/xhdvi_binaries">xhdvi binaries</a> and
<a href="ftp://snorri.chem.washington.edu/pub/hypertex/Install_Notes">
Install_Notes</a>.
<li>A compiled version of TeXview.app, the nExtstep dvi previewer
augmented for hypertex, was originally provided by
Dmitri Linde (dmitri@physics.stanford.edu [also the author of
InstantTeX.app]). 
<!--This version (dating from the summer of 1994) is <a
href="HyperTeXview.tar.gz">HyperTeXview 1.0beta3</a>
(also available via anonymous ftp from xxx.lanl.gov as
<a href="ftp://xxx.lanl.gov/pub/hypertex/HyperTeXview.tar.gz">/pub/hypertex/HyperTeXview.tar.gz</a>).-->
<a href="http://nqcd.lanl.gov/people/doyle/doyle.html">Mark 
Doyle</a> has significantly extended Dmitri's original version with the
addition of multiple views and multiple documents. The <a
href="http://nqcd.lanl.gov/people/doyle/HyperTeXview/README_HTA.txt">README</a>
gives a more complete overview of the current features and known bugs.
The latest binary (as of 29 March 1995) is available at 
<a href="http://nqcd.lanl.gov/people/doyle/HyperTeXview/HyperTeXview.tar.gz">
HyperTeXview0.1beta1</a> or via ftp at 
<a href="ftp://gita.lanl.gov/people/doyle/HyperTeXview/HyperTeXview.tar.gz">
this URL</a>. NeXT TeX users might also be interested in <a href=
"http://www.nmr.embl-heidelberg.de/eduStep/Subjects/Publishing/Projects/Projects.html">NeXTTeX 2000</a>.

</ul>
(There are still some known minor <a href="bugs.html">bugs</a> and desired
enhancements for the above two.)

<h3><a name="pdf">pdf</a></h3>
Adobe has implemented a modification of Postscript called Acrobat
(with file extension .pdf = portable document format). It is essentially
a version of uuencoded compressed postscript with a full hyperlink overlay.
(There are now .pdf viewers for Unix, pc Windows, and Macintosh; though
some still in beta, available via anonymous ftp from
<a href="ftp://ftp.adobe.com/pub/adobe/Applications/Acrobat/">ftp.adobe.com</a>) 
In addition, pdf files are <i>searchable and indexable</i>. The 
<a href="http://nqcd.lanl.gov/people/doyle/README_HPS.txt">dvihps driver</a>
(generalizing dvips in the obvious way)
allows passing the hypertext information from the .dvi to the .ps file
in the form of pdf marks that are picked up by the Acrobat distiller,
giving a most powerful method for producing automatically hyperlinked .pdf.
(Then the relation of hyper .dvi to hyper .ps or .pdf is the same as is
currently the relation between .dvi and .ps; with ultimate translation to
hyper .ps or .pdf giving a more portable final hyperlinked format.)  Indeed
this was the original motivation for hypertex -- when I saw Acrobat Exchange
demo'ed in fall '93, it seemed auspicious to have all of the hyperlink
capability but horrifying to contemplate armies of people adding hyperlink
overlays "by hand" after the fact, especially when much of the contextual
structure is already present in the .tex source, only to be lost in the
conversion to .dvi then e.g. to postscript. 
We decided then that \special's were the natural means to pass this
structure out from the .tex source to be picked up from the .dvi level
by subsequent drivers. (For some updated comments on pdf [10/94], see
this <a href="pdfcomments.txt">mail message</a>.)

<h2><a name="hyperps">hyperPS</a> and hyperhacked Ghostview</h2>

For information on the above mentioned modified dvips driver (written by
Mark Doyle) that picks up the embedded hyperlink info from the .dvi file,
see this
<a href="http://nqcd.lanl.gov/people/doyle/README_HPS.txt">README_HPS</a>.
<p>
For information on a modified version of ghostview (written by Tanmoy
Bhattacharya) that interprets the embedded hyperPS commands (i.e. without
necessity of passing to Adobe's ps -> pdf distiller), see this
<a
href="http://nqcd.lanl.gov/people/tanmoy/hypertex/README-ghostview-mods.html">README-ghosthview</a>.
Note that the next version of ghostscript (now undergoing beta testing
[6/95]) will incorporate this functionality.

<h2>But wait, there's <a name="more">more...</a></h2>
Since latex and other standard macropackages are already highly structured,
by simple modification of the underlying macros it is possible to add
extensive hypertext capabilities to <i>pre-existing</i> .tex source
(i.e., for equations, figures, references, pagenumbers, etc.).
Moreover these macro redefinitions insert standardized &lt;a name=""&gt;
anchors that allow reference to <i>third party</i> papers in standard form
(if compiled using the same macropackages), e.g. by appending
#equation.2.3, #page.7, #figure.4, #table.2, etc., to the associated URL.
<p>
<a
href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperbasics.tex">hyperbasics.tex</a>
are simple low level hypertext macros (as in the example at the top of this
page), written by Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) that implement
the standard format for external reference.
They can be used directly or can be called by straightforward modifications
of existing macropackages. Tested macropackages include:
<ul>
<li><a href="lanlmac.tex">lanlmac.tex</a>:
My modified version of harvmac.tex (last updated 7/26/94),
works seamlessly to convert pre-existing harvmac-based source to hypertex
(see examples <a href="#harvsamp">below</a>).
<li>
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperlatex.tex">hyperlatex.tex</a>:
(Somewhat outdated and for LaTeX 2.09 only)
For latex-based source, 
automatically upgrades latex macros to hyperlatex (install in tex/inputs
directory).
This file is input before the \documentstyle
when using LaTeX, and  will automatically cause the relevant .hty files 
(if present) to be included after the associated .sty file.
Some .hty files to install in tex/inputs (each containing modifications
to the corresponding .sty file) are:
<ul>
<li>
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/aps.hty">aps.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/prabib.hty">prabib.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/revtex.hty">revtex.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/espcrc2.hty">espcrc2.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/article.hty">article.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/book.hty">book.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/report.hty">report.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/fleqn.hty">fleqn.hty</a>,
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/vanilla.hty">vanilla.hty</a>
<li>
To define a convenient hlatex format using a format (.fmt) file, use
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hlatex.tex">hlatex.tex</a>
to generate hlatex.fmt
(e.g. on unix systems, use: <code>initex \&latex hlatex.tex</code>)
and install in tex/formats directory.
This format will automatically \input hyperlatex at the
beginning of all documents. Command line use of hlatex.fmt 
is system dependent: on unix systems, 
create a link (e.g. <code>ln -s latex hlatex</code>), then the command
<code>hlatex file</code> replaces <code>latex file</code>
to produce automatic hyperlatex.
       </ul>
<li>
<a href="ftp://ftp.shsu.edu/tex-archive/macros/latex/contrib/supported/hyperref">hyperref</a>: A well-maintained LaTeX2e hyper package by Sebastian Rahtz.
Available from your friendly CTAN sites in 
/tex-archive/macros/latex/contrib/supported/hyperref.
<li> Your preferred macropackage (Just do it.)
</ul>
<h2><a name="examples">Example .dvi files</a></h2>
It has been an impressive exercise to grab files from the e-print archives
and hypertex them using the above modified macros. 
All examples have essentially "just worked". Here are a few example files:
<ul>
<li><a href="hharvsamp.dvi" name="harvsamp">harvsamp.dvi</a> : 
A sample file illustrating the modified harvmac macros,
with source <a href="hharvsamp.tex">harvsamp.tex</a>.
<li>
<a href="hyperlh88.tar.gz">hyperlh88.tar.gz</a>: by popular demand,
dvi file plus figures for my 1988 Les Houches lectures
"Applied Conformal Field Theory" (266kb .gz file gunzips to 911kb).
Good example of pre-existing source that painlessly retexs with new macros
(harvmac/lanlmac) into much more functional form with large numbers of
internal links to sections, subsections, eqns, refs, figs, etc.
<li>
<a href="hypertasi92.tar.gz">hypertasi92.tar.gz</a>: dvi file plus figures
from hep-th/9304011 [<a href="/abs/hep-th/9304011">abs</a>], 200 page
set of lecture notes using harvmac/lanlmac. (note that 392kb .gz
file gunzips to 1.6Mb -- but worthwhile as another impressive example of
pre-existing source that automatically recompiles with <i>thousands</i> of
internal linkages [couldn't be faked...].)
<li>
<a href="emdual.tar.gz">emdual.tar.gz</a> dvi plus two figures from
hep-th/9407087 [<a href="/abs/hep-th/9407087">abs</a>], a random
paper (just received, by Seiberg and Witten) that also uses harvmac.
<li>
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/examples/ambjorn.dvi">ambjorn.dvi</a>:
The dvi file from hep-lat/9405022 [<a href="/abs/hep-lat/9405022">abs</a>],
an example file from the e-print archives using latex (article style).
<li><a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/examples/Anomalkap.dvi">anomalkap.dvi</a>: The dvi file from hep-lat/9309014
[<a href="/abs/hep-lat/9309014">abs</a>], an example file from
the e-print archives using revtex.
</ul>

Some more examples of hyperdvi files can be found in
tanmoy's  <A HREF="http://nqcd.lanl.gov/people/tanmoy/hyperdvi/">hyperdvi</A>
directory. These files are mainly documentation about TeX, automatically
generated from the web files. He has also made available
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperwebmac.tex">hyperwebmac.tex</a> 
(modified version of webmac.tex that is used to process .tex generated from
.web by weave),
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hypercwebmac.tex">hypercwebmac.tex</a> 
(modified version of cwebmac.tex [version 2.1] that is used to process .tex
generated from .w by cweave), and
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/hyperncwebmac.tex">hyperncwebmac.tex</a> 
(same as above for cwebmac.tex version 3.0).
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/LaTeX2e.conf">LaTeX2e.conf</a>
is (untested) contributed software or latex2e users.

<h2><a name="external">External and relative URL's</a></h2>

The above macros are set up to generate automatically only 
linkages internal to files.  
External URL's can easily be added by hand (as in the 
<a href="#burble">example</a> at the top of this page), others
could be added automatically (e.g. references to arch-ive/papernum
could easily be parsed to 
&lt;a href="http://xxx.lanl.gov/e-print/arch-ive/papernum"&gt; ).
Eventually various conventions used in writing will change (e.g. 
figures will typically be small thumbnail images linked to external
viewers, and similarly for other resources; and the text itself will
be restructured to take advantage of branched exposition).
<p>
Currently the nExtstep HyperTeXview.app is set up to message external
URL's to OmniWeb.app (soon will support 
<a href="http://sente.epfl.ch/~swoman/">SpiderWoman</a>, the first browser
to support base/relative URL pairs), and
works well for absolute URL's under NS3.2 (uses the "open URL" service exported
by OmniWeb, some examples inserted in <a href="#harvsamp">harvsamp</a>).
On X, messaging from xhdvi to e.g. Mosaic can be implemented using the
primitive Mosaic
"<a href="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/remote-control.html">remote
control</a>"  (xhdvi calls the executable specified by the 
environment variable $WWWBROWSER on any URL it does not understand).
An implementation for opening e.g. external dvi files from within dvi
files exists (see 
<a href="http://nqcd.lanl.gov/people/tanmoy/hypertex/X/">xhdvi/mosaic</a> on nqcd),
but needs simplification pending improved www client capabilities.
<p>
It is clearly silly to reproduce html transport capabilities within .dvi
(or .pdf) viewers, but the current generation of www clients does not
allow very sophisticated in/out messaging. Ideally, 
when a www client opens a .dvi (or .pdf) viewer on a file, it should
pass a "base URL" to the viewer. When the viewer encounters a relative
URL, it should be able to message its base URL together with the relative
URL back to the www client which will parse and retrieve.
Currently, however, www clients such as Mosaic for X allow neither passing
a URL to an external browser nor sophisticated messaging back. It is hoped
that the next generation of www clients will separate the html transport
from the html viewing and allow more generalized messaging to/from the
transport object. (Perhaps this is a job for the 
"<a href="http://info.cern.ch/hypertext/WWW/Organization/Consortium/W3OSignature.html">WWW
consortium</a>".)
<p>
For the time being, however, use of absolute URL's still provides
impressive hypertex functionality.
<h2><a name="added">Additional clarifying comments</a></h2>
In answer to some early questions raised, the following
comments are paraphrased
From: asmith@bigsky.chem.washington.edu (Arthur Smith),
Date: Wed, 27 Jul 94 00:14:07 -0700 :
<p>
Note that hypertex is not intended as a replacement to HTML,
nor are the viewers intended as a replacement to Mosaic or 
other www browser ---
it is intended more to represent an early generation of 
alternative document viewer with closer ties to the Web
(somewhat along the lines of the ghostscript or xv viewers currently used,
but with the added benefit of hypertext within the TeX/dvi/pdf
documents themselves).
<p>
The advantages are: no need for complex conversions of pre-existing
TeX files into HTML, and no need to wait for a future version of html
with support for equations. In addition, the macro capabilities of TeX
allow hypertext to be created with little or no effort on the part
of the author. It is anticipated that this will be ideal for
scientists and mathematicians who already use TeX. 
We hope that the tools will be sufficiently popular to motivate
improvements that may allow TeX documents (whether in dvi format or pdf) to
be tied even more closely to the Web than is possible with our first
generation set of tools. They are now at least sufficiently
usable to allow a single line change of a TeX file to create
the hyperdvi files on the server side, a single
button click on a Web browser to bring up a hyperdvi document, and
with a little more initial effort on the author's side, a single button
click in the dvi viewer on the reader's side to bring up related documents.
<hr>
This directory is also available via anonymous ftp at
<a href="ftp://xxx.lanl.gov/pub/hypertex/">xxx.lanl.gov:/pub/hypertex/</a> .<br>
Tanmoy's files are instead available via anonymous ftp at
<a href="ftp://gita.lanl.gov/people/tanmoy/">gita.lanl.gov:/people/tanmoy/</a> .
<br>
Mark's files are also available via anonymous ftp at
<a href="ftp://gita.lanl.gov/people/doyle/">gita.lanl.gov:/people/doyle/</a> .
<br>
Hypertex announcements are also archived in hypermail format at
<a href="http://math.albany.edu:8800/hm/ht/a/">http://math.albany.edu:8800/hm/ht/a/</a>.
<p>
<ul>
<li><a name="questions">questions</a> on xhdvi 
    To: <a href="mailto:asmith@bigsky.chem.washington.edu">Arthur Smith</a>
    (who also maintains the hypertex mailing list, and the hypertex
    <a href="ftp://snorri.chem.washington.edu/hypertex/hypertex-faq">FAQ</a>)
<li>questions on HyperTeXview and HyperPS To: 
<a href="mailto:doyle@mmm.lanl.gov">Mark Doyle</a>
<li>questions on macros and hyperhacked ghostview To: 
<a href="mailto:tanmoy@qcd.lanl.gov">Tanmoy Bhattacharya</a>
<li>uninformed complaints To: <a href="mailto:nobody@xxx.lanl.gov">nobody</a>
</ul>

<address>
<a href="/pg.html">pg</a>@<a href="/">xxx</a>.<a href="http://www.lanl.gov">lanl</a>.<a href="/legal/disclaimer.html">gov</a>
</address>
</BODY>