[texhax] HyperTeX tags

Oleg Katsitadze olegkat at gmail.com
Thu Feb 23 20:34:38 CET 2006


Dear TeX hackers,

I have a couple of questions about hyperTeX tags.  For the
guide I used hyperTeX FAQ

  http://arxiv.org/hypertex/

and hyperTeX mailing list archives:

  http://math.albany.edu:8800/hm/ht/

The first question is about inter-document links.  I've
created two files, from.tex and to.tex, like this:

--------------------from.tex--------------------
{\catcode`\#=11
\gdef\hash{#}}

\noindent
\special{html:<a href="file:to.pdf\hash page.2">}%
  Link to to.pdf%
\special{html:</a>}

\bye
--------------------from.tex--------------------

---------------------to.tex---------------------
\null\vfill\eject % Empty first page.

\noindent
\special{html:<a name="page.2">}%
  Destination in to.pdf%
\special{html:</a>}

\bye
---------------------to.tex---------------------

I compile the files with the commands

  $ tex from.tex
  $ dvips -z from.dvi -o
  $ ps2pdf from.ps

  $ tex to.tex
  $ dvips -z to.dvi -o
  $ ps2pdf to.ps

Now the problem:  when I open from.pdf (either in Xpdf or
Acrobat Reader) and click on the link, I am presented with
the _first_ page of to.pdf, even though the target is on the
second page.  What am I doing wrong?

Versions of the programs I use:

 - TeX (Web2C 7.4.5) 3.14159
 - dvips(k) 5.92b
 - xpdf 3.01
 - Acrobat Reader 7.0


Another related question:  what is the reason for creating a
target spanning some text, instead of marking just a spot on
a page?  In other words, what is the difference
(functionally) between these two pieces of code:

  \special{html:<a name="DEST">}%
    Destination%
  \special{html:</a>}

and

  \special{html:<a name="DEST">}%
  \special{html:</a>}%
  Destination

Thanks in advance for any help,
Oleg Katsitadze



More information about the texhax mailing list