[OS X TeX] hyperref

Ross Moore ross.moore at mq.edu.au
Mon Jun 1 00:26:11 CEST 2020

Hi Zbigniew,

On 1 Jun 2020, at 7:28 am, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>> wrote:

That’s my problem.  I tried a small example, and everything worked fine.  But I have no idea where to look in the structure of my larger document
to catch the problem.  I don’t expect anyone else to look atmy whole document (in progress, but so far 18 pages of pdf when pictures are commented out, but also uses a lot of privately defined macros), but I was hoping for some suggestions as to what kind of error to look for.
Most of my private macros simply define frequently used sets of symbols or phrases, for consistency.
I have one macro I have that uses the reference utilities (\ref, \pageref, \eqref) to format references;  I checked it in my small example and it seems to present no problems.  Other than that, I don’t know where to look.

I’m sure you are aware that having hyperlinks depends heavily on information in the .aux  file.
So you cannot expect hyperlinks to work until the 2nd or 3rd typesetting run.
You must *not* Trash  .aux  files in-between runs.
Personally I’d say that you should *never* Trash those files, because they are often the place to look
when you are getting unexpected results not apparent in the visual appearance of your textual matter.

What to try?
First look in the Console window for your job.
There should be warning messages that say something relevant.
If that doesn’t give any clues then look inside your  .log  file  for any messages about things not being defined.
This file has quite a bit more information than the Console window.

Next have a look inside your .aux  and .toc  files.  (also .lof  with floating figures, and  .lot  with floating tables)
Since these are plain in text format, TeXShop should be able to open them.
Does anything look wrong?
e.g. macros having been expanded into TeX primitives is not a good sign.
It doesn’t mean the result is necessarily wrong, but it could mean that you are
not doing things as cleanly as you could be, leading to unexpected consequences.

At the beginning of the  .aux  file you should see some coding placed there by  Hyperref,
to patch the way  \ref  etc.  work.
Are you sure that your macro hasn’t captured the unpatched version, and is using that?
Or is otherwise somehow neutralising that Hyperref patch?

Another thing you can try is to do some tracing of one of your \ref  instances that isn’t working.

… {\tracingall  \ref{<target-label>} … some text … }

This will produce a huge amount of tracing information, which at first you will regard as being unintelligible.
In the case of processing a hyperlink, every letter and macro is checked to guarantee it’s results
are encoded correctly – you can scroll past all this to find the final string that will be put into the PDF.
If you cannot find anything going wrong yourself, then send me the resulting  .log  file and a short description
of the LaTeX source at that point, together with the PDF including the wrong result.

Note that the surrounding braces  { … }  are extremely important.
Otherwise the tracing will just keep going, taking a very long time to finish and producing
many Mbytes of (mostly useless) information.

Hope this helps.
Stay safe.

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966

On May 31, 2020, at 16:22, Herbert Schulz <herbs at wideopenwest.com<mailto:herbs at wideopenwest.com>> wrote:

On May 31, 2020, at 2:19 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>> wrote:

I have tried to insert hyperreferences into a \documentclass{article} latex document, with the preamble line
\usepackage[colorlinks, backref]{hyperref}
which had worked on several previous \documentclass{book} documents.

The result is that my back references, and the table of contents, show up in red, but there seems to be no link (that is, clicking on any of this red text in the pdf
fails to take me to the referenced part of the document.

What could I have overlooked?  I doubt that hyperref works only in the book document class.

Zbigniew Nitecki


No problem here using hyperref and toc with the article class. Could you supply a small example where this happens?

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq<https://protect-au.mimecast.com/s/kZUpCgZ05Jf8DqlJcoYy9r?domain=tex.ac.uk>
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/<https://protect-au.mimecast.com/s/SJBYCjZ12RfgVYj0I5ty8i?domain=sites.esm.psu.edu/>
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx<https://protect-au.mimecast.com/s/fLb8Ck815RCgPknvI9jH2s?domain=dir.gmane.org>
TeX on Mac OS X Website: http://mactex-wiki.tug.org/<https://protect-au.mimecast.com/s/VgNtCmO5wZsv9p5qHDAJCg?domain=mactex-wiki.tug.org/>
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex<https://protect-au.mimecast.com/s/fbCZCnx1Z5UnkXGVIptON1?domain=email.esm.psu.edu>

----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://protect-au.mimecast.com/s/kZUpCgZ05Jf8DqlJcoYy9r?domain=tex.ac.uk
List Reminders and Etiquette: https://protect-au.mimecast.com/s/SJBYCjZ12RfgVYj0I5ty8i?domain=sites.esm.psu.edu/
List Archives: https://protect-au.mimecast.com/s/fLb8Ck815RCgPknvI9jH2s?domain=dir.gmane.org
TeX on Mac OS X Website: https://protect-au.mimecast.com/s/VgNtCmO5wZsv9p5qHDAJCg?domain=mactex-wiki.tug.org/
List Info: https://protect-au.mimecast.com/s/fbCZCnx1Z5UnkXGVIptON1?domain=email.esm.psu.edu

Dr Ross Moore
Department of Mathematics and Statistics
12 Wally’s Walk, Level 7, Room 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955  |  F: +61 2 9850 8114
M:+61 407 288 255  |  E: ross.moore at mq.edu.au<mailto:ross.moore at mq.edu.au>
[cid:image001.png at 01D030BE.D37A46F0]
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. <http://mq.edu.au/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20200531/a00edbfe/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <https://tug.org/pipermail/macostex-archives/attachments/20200531/a00edbfe/attachment-0001.png>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list.