<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<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 style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=utf-8">
<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 style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=us-ascii">
<div></div>
</div>
<div style="word-wrap:break-word; line-break:after-white-space">
<meta content="text/html; charset=us-ascii">
<div></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_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_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_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_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_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; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant: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; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant: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>
<br class="">
</div>
</div>
</body>
</html>