<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I compiled your TestofHyperref.tex and the links work just fine:<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- In an external previewer, e.g., Adobe Acrobat Reader or macOS Preview, clicking a link takes you to its target.</div><div class=""><br class=""></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">  </span>- 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.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>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!</div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 21 Jun2020, at 7:29 PM, Nitecki, Zbigniew H. <<a href="mailto:Zbigniew.Nitecki@tufts.edu" class="">Zbigniew.Nitecki@tufts.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">

<div class="">
<div class="" style="word-wrap:break-word; line-break:after-white-space">Sorry—I missed that the refmacros file needs the formatmacros file.  Here it is:
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
<div class=""><br class="">
</div>
<div class="">I’ll check out cleverer.  Thanks for the tip.<br class="">
<div class=""><span class="x_Apple-style-span" style="border-collapse:separate; font-variant-ligatures:normal; font-variant-east-asian:normal; line-height:normal; border-spacing:0px"><span class="x_Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div class="" style="word-wrap:break-word">
<div class="">
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica"><br class="x_Apple-interchange-newline">
Zbigniew Nitecki</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Department of Mathematics</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Tufts University</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Medford, MA 02155</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font:normal normal normal 12px/normal Helvetica; min-height:14px; font-size:12px">
<br class="">
</div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">telephones:</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Office<span class="x_Apple-converted-tab">    </span>(617)627-3843</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept.<span class="x_Apple-converted-tab">    </span>(617)627-3234</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept. fax<span class="x_Apple-converted-tab">    </span>(617)627-3966</font></div>
<span class="x_Apple-style-span" style="font-size:12px"><a href="http://www.tufts.edu/~znitecki/" class="">http://www.tufts.edu/~znitecki/</a></span></div>
</div>
</span><br class="x_Apple-interchange-newline">
</div>
</span><br class="x_Apple-interchange-newline">
</span><br class="x_Apple-interchange-newline">
</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 21, 2020, at 17:57, Murray Eisenberg <<a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<meta content="text/html; charset=utf-8" class="">
<div class="" style="word-wrap:break-word; line-break:after-white-space">I could not try your sample source because your package formatmacros was missing from the post.
<div class=""><br class="">
</div>
<div class="">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).</div>
<div class=""><br class="">
</div>
<div class="">For example:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">documentclass{article}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\usepackage{amsthm}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\newtheorem{thm}{Theorem}[section]</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\usepackage{hyperref}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class="">  <br class="x_webkit-block-placeholder">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\usepackage[nameinlink,noabbrev,capitalize]{cleveref}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\crefname{thm}{Theorem}{Theorems}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\begin{document}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\section{First section}\label{mysec:first}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">See \cref{two} in \cref{sec:another-sec}.</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\section{Another section}\label{sec:another-sec}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\begin{thm}\label{two}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">$1+1=2$</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\end{thm}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal; min-height:22px">
<font face="Courier" class=""><br class="">
</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><font face="Courier" class="">\end{document}</font></div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><br class="">
</div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal">will show in the output:</div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><br class="">
</div>
<div class="" style="margin:0px; font-stretch:normal; line-height:normal"><span class="x_Apple-tab-span" style="white-space:pre"></span>See Theorem 2.1 in Section 2.</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 21 Jun2020, at 4:58 PM, Nitecki, Zbigniew H. <<a href="mailto:Zbigniew.Nitecki@tufts.edu" class="">Zbigniew.Nitecki@tufts.edu</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="">
<div class="" style="word-wrap:break-word; line-break:after-white-space">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.
<div class=""><br class="">
</div>
<div class="">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</div>
<div class="">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}</div>
<div class="">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.</div>
<div class="">Here is the style file whose main content is that macro:</div>
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=utf-8" class="">
<div class=""></div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class="">Here are a short sourcefile and pdf output, as well as a log file:</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=us-ascii" class="">
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=us-ascii" class="">
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
<div class="">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.</div>
<div class="">I don’t know if there is something about the \refer macro that is conflcting with \hyperref, and if so, is there a workaround?</div>
<div class=""><br class="">
</div>
<div class="">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,</div>
<div class="">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.</div>
<div class="">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</div>
<div class="">\newcommand{\c}{\ensuremath{\mathfrak{c}}} led to an “unknown command” error once the hyperref command was moved to immediately precede the </div>
<div class="">\begin{document}.  Also, one of the pstricks routines I used (pst-ode) defined some parameters via the statement </div>
<div class="">
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
                \pstVerb{</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
                <span class="x_x_Apple-tab-span" style="white-space:pre"></span>/A -1 def</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
                <span class="x_x_Apple-tab-span" style="white-space:pre"></span>/B 0 def</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
                <span class="x_x_Apple-tab-span" style="white-space:pre"></span>/C 0 def</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
                <span class="x_x_Apple-tab-span" style="white-space:pre"></span>/D -2 def</div>
<div class="" style="margin:0px; font-stretch:normal; font-size:12px; line-height:normal">
                }</div>
<div class="">and this led to unknown command errors.  (They disappeared if I moved the \hyperref call earlier).</div>
<div class="">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.</div>
<div class="">However, I found it strange that this problem only occurred when I moved the hyperref call to the end of the preamble.</div>
<div class=""><br class="">
</div>
<div class="">So for now, I am not using hyperref in these notes, but would like to.</div>
<div class=""><span class="x_x_Apple-style-span" style="border-collapse:separate; font-variant-ligatures:normal; font-variant-east-asian:normal; line-height:normal; border-spacing:0px"><span class="x_x_Apple-style-span" style="border-collapse:separate; font-family:Helvetica; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-variant-east-asian:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_x_Apple-style-span" style="border-collapse:separate; font-family:Helvetica; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-variant-east-asian:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class="">
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica"><br class="x_x_Apple-interchange-newline">
Zbigniew Nitecki</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Department of Mathematics</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Tufts University</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Medford, MA 02155</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font:normal normal normal 12px/normal Helvetica; min-height:14px; font-size:12px">
<br class="">
</div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">telephones:</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Office<span class="x_x_Apple-converted-tab">    </span>(617)627-3843</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept.<span class="x_x_Apple-converted-tab">    </span>(617)627-3234</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept. fax<span class="x_x_Apple-converted-tab">    </span>(617)627-3966</font></div>
<span class="x_x_Apple-style-span" style="font-size:12px"><a href="http://www.tufts.edu/~znitecki/" class="">http://www.tufts.edu/~znitecki/</a></span></div>
</div>
</span><br class="x_x_Apple-interchange-newline">
</div>
</span><br class="x_x_Apple-interchange-newline">
</span><br class="x_x_Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</div>
<span id="x_cid:574F147168245346B325733C40CA3CC4@namprd05.prod.outlook.com" class=""><refmacros.sty></span><span id="x_cid:9E3CE2B30D08894686866724D8EAE339@namprd05.prod.outlook.com" class=""><TestofHyperref.tex></span><span id="x_cid:8AD7555D046A4047BCD16F87B0B9D4E2@namprd05.prod.outlook.com" class=""><TestofHyperref.log></span><span id="x_cid:fd70d1a2-2759-4266-869c-b87c5986bcf3@namprd05.prod.outlook.com" class=""><TestofHyperref.pdf></span>-----------
 Please Consult the Following Before Posting -----------<br class="">
TeX FAQ: <a href="http://www.tex.ac.uk/faq" class="">http://www.tex.ac.uk/faq</a><br class="">
List Reminders and Etiquette: <a href="https://sites.esm.psu.edu/~gray/tex/" class="">
https://sites.esm.psu.edu/~gray/tex/</a><br class="">
List Archives: <a href="http://dir.gmane.org/gmane.comp.tex.macosx" class="">http://dir.gmane.org/gmane.comp.tex.macosx</a><br class="">
               <a href="https://email.esm.psu.edu/pipermail/macosx-tex/" class="">https://email.esm.psu.edu/pipermail/macosx-tex/</a><br class="">
TeX on Mac OS X Website: <a href="http://mactex-wiki.tug.org/" class="">http://mactex-wiki.tug.org/</a><br class="">
List Info: <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-tex" class="">
https://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br class="">
</div>
</blockquote>
</div>
<br class="">
<div class="">---<br class="">
Murray Eisenberg<span class="x_Apple-tab-span" style="white-space:pre"> </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class="">
503 King Farm Blvd #101<span class="x_Apple-tab-span" style="white-space:pre"> </span>
Home (240)-246-7240<br class="">
Rockville, MD 20850-6667<span class="x_Apple-tab-span" style="white-space:pre"> </span>
Mobile (413)-427-5334<br class="">
<br class="">
</div>
<br class="">
</div>
</div>
----------- Please Consult the Following Before Posting -----------<br class="">
TeX FAQ: <a href="http://www.tex.ac.uk/faq" class="">http://www.tex.ac.uk/faq</a><br class="">
List Reminders and Etiquette: <a href="https://sites.esm.psu.edu/~gray/tex/" class="">
https://sites.esm.psu.edu/~gray/tex/</a><br class="">
List Archives: <a href="http://dir.gmane.org/gmane.comp.tex.macosx" class="">http://dir.gmane.org/gmane.comp.tex.macosx</a><br class="">
               <a href="https://email.esm.psu.edu/pipermail/macosx-tex/" class="">https://email.esm.psu.edu/pipermail/macosx-tex/</a><br class="">
TeX on Mac OS X Website: <a href="http://mactex-wiki.tug.org/" class="">http://mactex-wiki.tug.org/</a><br class="">
List Info: <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-tex" class="">
https://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>

<span id="cid:FFA1C3D17389D24889D6BB6495E7E590@namprd05.prod.outlook.com"><formatmacros.sty></span></div></blockquote></div><br class=""><div class="">
---<br class="">Murray Eisenberg<span class="Apple-tab-span" style="white-space: pre;">                       </span><a href="mailto:murrayeisenberg@gmail.com" class="">murrayeisenberg@gmail.com</a><br class="">503 King Farm Blvd #101<span class="Apple-tab-span" style="white-space: pre;">     </span>Home (240)-246-7240<br class="">Rockville, MD 20850-6667<span class="Apple-tab-span" style="white-space: pre;">  </span>Mobile (413)-427-5334<br class=""><br class="">

</div>
<br class=""></div></body></html>