HyperText Documents with L^{A}TEX 2ε V2.5b

Michael Mehlich

1995/05/29

Contents

1 Introduction 1

2 Usage 1

3 Macros Provided 2

4 How to View HyperL^{A}TEX 2ε–documents? 3

5 Bugs 3

6 Related Work, Acknowledgement 4

1 Introduction

Traditional texts only have a linear structure given by its series of characters. But this is not sufficient for any kind of documents one may think of. Thus, recently the number of documents using a more complex graphical structure (called “hyper text” documents) have increased.

This package provides the generation of such documents based on the already given structure of L^{A}TEX 2ε-documents without the document writer having to consider new commands.

2 Usage

Just insert \usepackage{hyper} in the preamble of your L^{A}TEX2e–document as the last package to be loaded.

If you want to get an index or a glossary you have to use the macros \makeindex resp. \makeglossary before loading this package.

If you use the theorem package define the theorems via \newtheorem after inserting the hyper package.

You may also give some options for the package, i.e. instead of the command

above you may use \usepackage[<option list>]{hyper} in your preamble.

Currently the following options are known:

• yes, no determine whether the hypertext marks are inserted or not (default

is yes)

• black, gray, color determine the colors anchors and references are printed in (default is black)

• indexcmds has to be given explicitely whenever an index or glossary file has been created using this package if the file is not regenerated using the commands \makeindex and \makeglossary, respectively.

• backcitepages, backcitesections introduce back references from the bibliography to the pages and sections, respectively, they have been cited in

• amsart, amsbook, amsdtx, amsldoc, amsproc, article, book, letter,
ltxdoc, ltxguide, ltnews, proc, report, slides determine the document

class for which the modifications are loaded (default is the document class given via \documentclass if it can be derived)

• leqno adds modifications for the document class option leqno (will be used automagically for known document classes)

• amsmath, amstex, amsthm, doc, ftnright, longtable, theorem, upref add

modifications for the corresponding package (will be used automagically)

• xr adds modifications for the package xr and redefines it’s internal macro \externaldocument addint a new parameter determining the URL–address of the document for the cross references used (will be used automagically)

• harvard add modifications for the respectively packages that are part of the distribution but provided by other authors

• <other> adds a modification file <other>.hyp that has to be provided by yourself

3 Macros Provided

The following macros are defined by the package and may be used:

• \hyperanchor#1#2 lets #1 being the hypertext anchor for #2 (#1 may neither be a natural number nor beginning with page. or fn.)

• \blindhyperanchor#1 lets #1 being a hypertext anchor (#1 may neither be a natural number nor beginning with page. or fn.)

• \hyperreference#1#2 lets #2 being a reference to the anchor #1, (#1 may not start with a [)

• \hyperURL#1#2#3#4 lets #4 be a reference to an external URL with type #1, domain #2, and document #3, i.e. to the URL #1://#2/#3

• \labeltext#1#2 lets #1 being the reference to the text #2 and prints #2

• \noref[#1]#2 lets #1 being a hypertext reference to the anchor #2 without printing the reference (#1 is not optional!)

• \ref[#1]#2 is the same as L^{A}TEX 2ε’s original #1~\ref{#2} except that the hypertext reference is provided from the complete #1~\ref{#2} instead of

\ref{#2} only

• \pageref[#1]#2 is the same as \ref execpt that we get a reference to the page number

• \refcurrent#1 lets #1 being a hypertext reference to the actual anchor

• \refnext#1 lets #1 being a hypertext reference to the next anchor that will be generated

The following macros are redefined when using the corresponding packages:

• for xr:

  – \externaldocument(#1)[#2]#3, \externaldocument[#1](#2)#3 are

equivalent to the original \externaldocument of the xr–package except for the additional parameter surrounded by () determining the URL–address of the external document (the URL–type file: is added automagically) (default is #3.dvi)

4 How to View HyperL^{A}TEX 2ε–documents?

There are several methods that can be used to view the dvi–documents with html– marks resulting from using this package.

• For UNIX^{TM}–systems with the graphical user interface X there is a modific-

ation of xdvi called xhdvi available via anonymous ftp at

    ftp://xxx.lanl.gov/pub/hypertex/xhdvi 06.tar.gz.

• For systems running under NeXTSTEP^{TM} a modification of TeXview has

been developed available at

    ftp://xxx.lanl.gov/pub/hypertex/HyperTeXview.tar.gz.

• There exists a variant of dvips translating hyperdvi–files to hyperps–files

containing the html–marks available at

    ftp://nqcd.lanl.gov/people/doyle/dvihps.tar.gz.

Such ps–files can be viewed using a hacked version of ghostscript available at

    ftp://nqcd.lanl.gov/people/tanmoy/hypertex/ghostview-1.5-hacked.tar.gz.

• Another way is to use dvihps

    ftp://nqcd.lanl.gov/people/doyle/dvihps.tar.gz.

to get a hyperps–file ready to be handled by the Acrobat^{TM}–distiller available from Adobe which can translate hyperps–files to pdf–files that can be viewed using an Acrobat^{TM}–reader.

5 Bugs

Currently there is only one known bug. Unfortunately it is one that cannot be avoided. You have to care about this:

• In indexing commands you may not use ] without surrounding braces. If you do, TEX will parse the command in a wrong way. To get the sorting of the index right you therefore should use \index{A[zzzzB@A{]}B} instead of

\index{A]B}.

• Similarly, a protected |, i.e. "| is not handled correctly. Use a similar method as above to circumnavigate this problem.

• If you include an index or glossary file into the current document you may get

a message from L^{A}TEX like Undefined control sequence. . . . \hyperpage.

This is due to you not using \makeindex or \makeglossary in the preamble. In this case just add the package option indexcmds when loading the hyper– package.

Other bugs are not known by now. But surely there are some. Thus, if you detect one please report it with the package version and a small example to

    Michael Mehlich
    mehlich@informatik.uni-muenchen.de

6 Related Work, Acknowledgement

Sebastian Rahtz has written another package for adding HyperText–capabilities to L^{A}TEX. His package hyperref has been developed in parallel with this one and uses a slightly different realization for getting similar results. Some of the ideas found there have been added to this package, too. Thus, I have to give a special thank to him.

Thanks also to Ulrich Fuchs for bug reports and further suggestions.