[tex-eplain] Cross-reference hyperlinks between different files

Rodolfo Medina rodolfo.medina at gmail.com
Fri Jun 3 13:26:46 CEST 2016


Karl Berry <karl at freefriends.org> writes:

> I don't know that I'd call anything about Eplain "professional" :).

But certainly "expert" ;-)



> If I recall correctly, this is basically a matter of what string ends up
> in the link destination.  If so, that shouldn't be terribly difficult.

Difficult certainly not if I myself did it.


> Can you send me your macros, and an example using them?  It would help.

I'm attaching it.  Create a work directory and put in it: file1.tex, file2.tex,
auxinput.sh, cross-reference-1 and cross-reference-2.  Then do:

 $ tex file1
 $ tex file2
 $ ./auxinput.sh
 $ tex file2
 $ xdvi file2

.  Or:

 $ pdftex file1
 $ pdftex file2
 $ ./auxinput.sh
 $ pdftex file2
 $ xpdf file2.pdf





> Thanks,
> Karl

Thanks to you for your kind attention.  I don't need to say that all those
macros certainly contain naiveties, I apologize in advance.


> P.S. I'm just curious, what are the circumstances where you are often
> linking between different files?  It's something I basically never have
> occasion to do.  Urls on the web, for sure.

Yes, now it comes the most interesting part: the philosophy for wanting to link
different files.


> But a link to another file means the person reading has to have the same
> files installed in the same places.

Of course.  Documents can obviously be made of several chapters: chapter 1,
chapter 2, ecc., and that's why I also needed and created macros in (e)plain
TeX for sectioning and subsectioning a text.  But I want chapters to have two
possibilities of life: as part of a whole but also as single individuals,
linked together by cross-reference hyperlinks.  This because the master file is
big and takes long to be processed every time; but also because each of those
chapters can have effectively both characters and both of them need and want to
be put in practise.  So in my documents I put `\if' conditions in order to have
the two possibilities when processing them.  If you are interested, of course I
can send you those other macros and definitions.

I don't know if this feature is considered to be important by most people,
maybe not, but for me it definitely is and I couldn't do without it.

If there should be problems when processing the example files, please let me
know.

Thanks indeed,

Best

Rodolfo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: file1.tex
Type: text/x-tex
Size: 556 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-eplain/attachments/20160603/33f304e0/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file2.tex
Type: text/x-tex
Size: 480 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-eplain/attachments/20160603/33f304e0/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auxinput.sh
Type: text/x-sh
Size: 78 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-eplain/attachments/20160603/33f304e0/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross-reference-hyperlinks-1.tex
Type: text/x-tex
Size: 14624 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-eplain/attachments/20160603/33f304e0/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross-reference-hyperlinks-2.tex
Type: text/x-tex
Size: 5803 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-eplain/attachments/20160603/33f304e0/attachment-0009.bin>


More information about the tex-eplain mailing list