[OS X TeX] hyperref problem

Nitecki, Zbigniew H. Zbigniew.Nitecki at tufts.edu
Mon Jun 22 19:57:13 EDT 2020


First, when I have just typeset/compiled the pdf (and not done anything with it yet) I can, as I used to, click on the hyperlinked reference, and I jump to the appropriate page.  Once I have done that (just once) what I get the next time I try to click on a link is precisely what your screenshot shows.  The tool is elusive, but even if I do catch it, I can no longer automatically jump to the appropriate new page.  I tried this yet again (that is, I re-typeset the test file)
and again,I could go to page 2 and then click on one of the items on page 1 which are linked, and (even without seeing a preview box) the view jumps to page 1.  Once that has happened, though, it never happens again.  Every subsequent time if I either click or hover over the linked item, I get the preview box, and (I think in either case, but certainly if I click on a link) I get what you are calling the tool-popup, but I am unable to jump to the appropriate page.

What I find strange is that I DO get the desired behavior on first try, but (absolutely consistently) not again, unless I re-typeset, in which case I get my first chance to jump, but never again until the next re-typeset.  Quitting Texshop and coming back to it also doesn’t help.

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/




On Jun 22, 2020, at 18:52, Ross Moore <ross.moore at mq.edu.au<mailto:ross.moore at mq.edu.au>> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 2:09 am, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>> wrote:

Well, I don’t know what to say or do.  I just compiled it again, and tested it with Adobe Acrobat (last night and this morning, I downlaoded MacTex 2020, found that I was getting problems with another, more complicated and more important document due to what appears to be an error in the updated pstricks file, so I switched back to my old TexLive 2017;  I also got hold of Adobe Acrobat, downloaded it, and made it my default reader).  When I recompiled, the very first time I clicked on a link, it worked (I went from page 2 to page 1).Subsequent clicks on any link gave me the preview box but no motion to a different page.

Here’s what it looks like for me, using TeXshop v4.44 .

<pop-upImage.png>

You can see that not only is there the “link preview”, but also a tool-popup.
The active rectangle is over the words “Minimal requirements”, and this does not overlap the preview.
For other links the preview can be quite a bit closer than shown here.
Jumping backwards and forwards using links does not affect any of the behaviour.

My MacOS is 10.13.6, so quite old now.

To take screen-shots like this use  Preview  app, as supplied with the OS,
via its menu option:  File > Take screenshot > Entire screen .
This gives you 10 seconds to setup the popup bits, that are hard to capture via other means.
Then in the resulting image,  Select  the area you want, and use  Tools > Crop  (Cmd-K) .

When you need to capture pop-ups, I find this method better than  Cmd-Shift-4
or other tools that previously you had to purchase (though not expensive).
This comes as part of the OS now, so making those previous tools totally redundant.


Hope this helps.

Ross


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/<https://protect-au.mimecast.com/s/JWbKCnx1Z5UnovzNI9VAoN?domain=tufts.edu/>




On Jun 22, 2020, at 11:54, Herbert Schulz <herbs at wideopenwest.com<mailto:herbs at wideopenwest.com>> wrote:

On Jun 22, 2020, at 10:43 AM, Murray Eisenberg <murrayeisenberg at gmail.com<mailto:murrayeisenberg at gmail.com>> wrote:

I compiled your TestofHyperref.tex and the links work just fine:

- In an external previewer, e.g., Adobe Acrobat Reader or macOS Preview, clicking a link takes you to its target.

- In the TeXShop previewer, as somebody else pointed out, if you move the mouse to a link, a little window pops up showing the actual target; if you then click the link, it takes you to the page of the link. This is exactly what the TeXShop previewer is supposed to do.

It would be really nice if standard, external, previewers had the same feature of the little pop-up window showing the target. It’s a really convenient way to see what the link refers to without having to jump to the target’s page and thereby losing your place in the document!


On 21 Jun2020, at 7:29 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>> wrote:

Sorry—I missed that the refmacros file needs the formatmacros file.  Here it is:

I’ll check out cleverer.  Thanks for the tip.

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/<https://protect-au.mimecast.com/s/JWbKCnx1Z5UnovzNI9VAoN?domain=tufts.edu/>




On Jun 21, 2020, at 17:57, Murray Eisenberg <murrayeisenberg at gmail.com<mailto:murrayeisenberg at gmail.com>> wrote:

I could not try your sample source because your package formatmacros was missing from the post.

However, as to the first hyperref issue: are you aware of the cleveref package, which you to do even more than your \refer command seems to do. For example, with cleveref (and hypreref) you could still use a label such as \label{subsec:first} but don’t actually need the “subsec:” part then, as cleveref will detect what kind of entity it is and then using the \crefname in the preamble allows you to use whatever name you wish when it is referenced (now with \cref rather than \ref).

For example:

documentclass{article}

\usepackage{amsthm}
\newtheorem{thm}{Theorem}[section]

\usepackage{hyperref}

\usepackage[nameinlink,noabbrev,capitalize]{cleveref}
\crefname{thm}{Theorem}{Theorems}

\begin{document}

\section{First section}\label{mysec:first}

See \cref{two} in \cref{sec:another-sec}.

\section{Another section}\label{sec:another-sec}

\begin{thm}\label{two}
$1+1=2$
\end{thm}

\end{document}

will show in the output:

See Theorem 2.1 in Section 2.

On 21 Jun2020, at 4:58 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>> wrote:

I just finished writing up a longish (50pp) set of notes using TeXShop; in the process I ran into two sets of problems, one involving hyperref, the  other a problem with the TeXShop editor.  I’m separating my questions into two emails.  This one concerns hyperref, for which I can provide a reasonably minimal example.  I’ll address my editor problems in a subsequent email.

I have for quite some time used a modification of the \ref macro in latex, which works as follows: labels are always in the format \label{#1:#2}, where #1
identifies a descriptive term like ’Section”  or “Theorem” and #2 identifies which one it is;  then when I want to refer back to the labeled item, I write \refer{#1}{#2}
and what gets printed is the descriptive term followd by the number.  I found this very useful, particularly in writing a book, to make the spelling and capitalization of cross references uniform.
Here is the style file whose main content is that macro:

All has gone well, and as I recall (it’s been a few years) it seemed to work well with hyperref on my book project as well.  But this time something went wrong.  There are two problems, but I think only the first can be addressed in this forum.
Here are a short sourcefile and pdf output, as well as a log file:

I find that when I compile this, if I immediately click on one of the (red) hyperlinked items, I am taken to the appropriate page (there are only two pages in this example).  However, any subsequent click on a hyperlinked item gives me only a little window showing what the text referred to looks like—it doesn’t go to the appropriate page.  I should clarify that this behavior is when I am in view in TeXShop.When I open just the pdf (so it opens in Preview, not in TeXShop, the hyperlinks seem to work.
I don’t know if there is something about the \refer macro that is conflcting with \hyperref, and if so, is there a workaround?

The second hyperref problem is harder to pin down.  I actually have a lot of self-defined macros, mostly formatting notation, so in my actual source file,
there were both a number of \usepackage commands in the preamble which referred to my  macro packages—as well as pstricks and other packages—and a lot of \newcommands specific to the notes.
I initially had the call to \hperref in the middle of my preamble, and then I was experiencing the problem described by the example.  But then I looked at the hyperref manual and it said that the call should come after all the other calls.  So I moved it, and all hell broke loose.  For example, I had at one point decided to use fraktur in one place in the notes, so put in a short sequence of macros for typing a,b,c, d, and A in fraktur.  Most of them were ok, except
\newcommand{\c}{\ensuremath{\mathfrak{c}}} led to an “unknown command” error once the hyperref command was moved to immediately precede the
\begin{document}.  Also, one of the pstricks routines I used (pst-ode) defined some parameters via the statement
               \pstVerb{
               /A -1 def
               /B 0 def
               /C 0 def
               /D -2 def
               }
and this led to unknown command errors.  (They disappeared if I moved the \hyperref call earlier).
Again, I don’t know what is going on, but this one is harder to correct because there are a lot of possible conflicts spread over many files.
However, I found it strange that this problem only occurred when I moved the hyperref call to the end of the preamble.

So for now, I am not using hyperref in these notes, but would like to.

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/<https://protect-au.mimecast.com/s/JWbKCnx1Z5UnovzNI9VAoN?domain=tufts.edu/>




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq<https://protect-au.mimecast.com/s/68rXCoV1Y2SkzEM3izmuHi?domain=tex.ac.uk>
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/<https://protect-au.mimecast.com/s/lqjmCp81gYC58mG3iYF8ld?domain=sites.esm.psu.edu/>
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx<https://protect-au.mimecast.com/s/bMphCq71jxf95ZDjfEZzPO?domain=dir.gmane.org>
              https://email.esm.psu.edu/pipermail/macosx-tex/<https://protect-au.mimecast.com/s/hbcQCr810kCxvEplFjP7aI?domain=email.esm.psu.edu/>
TeX on Mac OS X Website: http://mactex-wiki.tug.org/<https://protect-au.mimecast.com/s/H540Cvl1g2Sv6xGzt53ylu?domain=mactex-wiki.tug.org/>
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex<https://protect-au.mimecast.com/s/UIOXCwV1jpSo1K73txIGim?domain=email.esm.psu.edu>

---
Murray Eisenberg murrayeisenberg at gmail.com<mailto:murrayeisenberg at gmail.com>
503 King Farm Blvd #101  Home (240)-246-7240
Rockville, MD 20850-6667  Mobile (413)-427-5334


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

<formatmacros.sty>

---
Murray Eisenberg murrayeisenberg at gmail.com<mailto:murrayeisenberg at gmail.com>
503 King Farm Blvd #101  Home (240)-246-7240
Rockville, MD 20850-6667  Mobile (413)-427-5334


Howdy,

I confirm that compiling the example with a fully updated TeX Live 2020 there is no problem with the links using the TeXShop Preview window.

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/68rXCoV1Y2SkzEM3izmuHi?domain=tex.ac.uk>
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/<https://protect-au.mimecast.com/s/lqjmCp81gYC58mG3iYF8ld?domain=sites.esm.psu.edu/>
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx<https://protect-au.mimecast.com/s/bMphCq71jxf95ZDjfEZzPO?domain=dir.gmane.org>
               https://email.esm.psu.edu/pipermail/macosx-tex/<https://protect-au.mimecast.com/s/hbcQCr810kCxvEplFjP7aI?domain=email.esm.psu.edu/>
TeX on Mac OS X Website: http://mactex-wiki.tug.org/<https://protect-au.mimecast.com/s/H540Cvl1g2Sv6xGzt53ylu?domain=mactex-wiki.tug.org/>
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex<https://protect-au.mimecast.com/s/UIOXCwV1jpSo1K73txIGim?domain=email.esm.psu.edu>

----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://protect-au.mimecast.com/s/68rXCoV1Y2SkzEM3izmuHi?domain=tex.ac.uk
List Reminders and Etiquette: https://protect-au.mimecast.com/s/lqjmCp81gYC58mG3iYF8ld?domain=sites.esm.psu.edu/
List Archives: https://protect-au.mimecast.com/s/bMphCq71jxf95ZDjfEZzPO?domain=dir.gmane.org
               https://protect-au.mimecast.com/s/hbcQCr810kCxvEplFjP7aI?domain=email.esm.psu.edu/
TeX on Mac OS X Website: https://protect-au.mimecast.com/s/H540Cvl1g2Sv6xGzt53ylu?domain=mactex-wiki.tug.org/
List Info: https://protect-au.mimecast.com/s/UIOXCwV1jpSo1K73txIGim?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>
http://www.maths.mq.edu.au<http://www.maths.mq.edu.au/>
<image001.png>
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/>
<http://mq.edu.au/>

----------- 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
               https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20200622/30d7498d/attachment.htm>


More information about the MacOSX-TeX mailing list