hyperref problem

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

hyperref problem

Nitecki, Zbigniew H.
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/





----------- 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

refmacros.sty (2K) Download Attachment
TestofHyperref.tex (1K) Download Attachment
TestofHyperref.log (20K) Download Attachment
TestofHyperref.pdf (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Murray Eisenberg
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. <[hidden email]> 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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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

---
Murray Eisenberg [hidden email]
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
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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
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/




On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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

---
Murray Eisenberg [hidden email]
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
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


----------- 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

formatmacros.sty (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Ross Moore-3
In reply to this post by Nitecki, Zbigniew H.
Hi Zbigniew,

On 22 Jun 2020, at 6:58 am, Nitecki, Zbigniew H. <[hidden email]> 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?

No. This will not have anything to do with the (back-end) macros that you use.

The small (Prelink) window is a feature added quite recently (say within 3 years).
It was used in Skim for awhile before it came into TeXshop’s Preview.
Someone else might be able to say exactly when (and why) this feature has been added to the TeXshop front-end.
It should show up simply by hovering your mouse over the active rectangle which is associated with the hyperlink.
Then actually clicking within that rectangle should activate the link as previously.
It may be that once the small Prelink window comes up, you cannot tell where the active rectangle is anymore,
or it may be completely obscured. 
Is there a setting to shift where the Prelink window is located, w.r.t. the active rectangle?
Again, someone else may be able to answer this question.


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.

Not at all uncommon.

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.

Yes.
That recommendation in the hyperref manual was made roughly 20 years ago.
The reasoning is that quite a few macros need to be patched to support automatic creation
of advanced PDF features, such as Bookmarks, hyperlinked cross-references to sections,
citations, etc. as well as external hyperlinking.
It was then thought that it was best to delay Hyperref until as late as possible, so that when it does 
its patching, it will build on top of whatever other packages may have done themselves, earlier
within the preamble.

Such advice is now grossly out-dated.
There are better ways to delay the patching until other packages have been loaded.
Nowadays I find it best to load hyperref as early as possible, so that you know what 
you have and can build on top of that (using the better methods).



Another thing that is very important is that you don’t define home-grown macros
with names that will be altered by Hyperref, because they are standard in many
ways although you do not actually use them yourself. 

This next problem is an example of exactly this.

 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}.  

I’m surprised that  \newcommand{\c}{… }  doesn’t throw an error immediately.
 \c  is the accent command for a cedilla, as is rather common in French and other languages.
By making this definition, you will never be able to properly typeset a co-author or citation-author’s name
such as   Fran\c{c}ois .

This affects hyperref, because in the advanced features it supports, it is necessary to declare 
such macro names for encodings other than ones directed at specific font characters.
Hence all macros in commonly-used language encodings also become defined whenever hyperref is required. 


In my mind, having single-letter user-defined macros is a real no-no.
Very many letters are used this way already for various languages and encodings.
Thus you are just asking for trouble when using hyperref, unless you are very careful
in how you choose macro names.

Trying to find single-letter names that are not already used, and remembering what you defined them for 
is just a fool’s game. Better is to be more descriptive: e.g.  \frakc  in your case.
Yes, it’s more typing, at first; but with copy/paste and/or command completion it really is not so.
Furthermore, your LaTeX sources become easier to read and understand/proofread  than when every
3rd or 4th letter is a backslash.


Even 2-letter names commonly have another use.   (\it, \rm, \tt, \sc, \sf, \ij, \dj, \dz , … )
The only 2-letter combinations that I use are ones that clearly jolt the mind as to
their intended meaning; e.g. \RR , \QQ, \CC  etc. for  \mathbb  letters, or bold-face symbols.
Using \bb, \cc, \xx, \yy etc.  for vectors is generally acceptable, but beware \tt  and that  \aa  and \AA 
already have a meaning.   (think the symbol for Angstrøm units, or in Swedish names).


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.

Not so strange, when you realise that  hyperref  is encountering a macro name that it is trying to declare
for a standard meaning, but it has been usurped by something already defined.
 
So for now, I am not using hyperref in these notes, but would like to.

My advice is to go back to loading it early,
and take great care about resolving any errors that you may encounter.

If you have lots of foreign names in your References, check them to make sure
 a.  that they are actually typeset correctly;
 b.  try to Copy/Paste your whole reference section into a text-file; check
      for errors in the spellings that may result.

Also, I recommend doing:

 c.  load the  pdfx  package to generate PDF/A-2u output, to attempt to conform to
      a published standard for Archivability.

There is a lot of stuff in there specifically to allow you to detect and fix the kinds of
errors that are discussed above.
But you’ll need to check your PDFs with validation software.
There are a number of online PDF/A validators, so you don’t need to have purchased
a licence for Acrobat Pro, or other costly software. 
(But if your institution gives you cheap access to Acrobat Pro, then it is well worth having.)


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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://protect-au.mimecast.com/s/haBqCwV1jpSoW5PQSqKkVT?domain=tex.ac.uk
List Reminders and Etiquette: https://protect-au.mimecast.com/s/-dmXCxngGkfZ3pB0SY9yff?domain=sites.esm.psu.edu
List Archives: https://protect-au.mimecast.com/s/uahlCyoj8PuYRGJWSR9OPu?domain=dir.gmane.org
               https://protect-au.mimecast.com/s/1KPVCzvkmpfKAXnBto1_x6?domain=email.esm.psu.edu
TeX on Mac OS X Website: https://protect-au.mimecast.com/s/w7VKCANpnDCjzxVofMkjBJ?domain=mactex-wiki.tug.org
List Info: https://protect-au.mimecast.com/s/u3O0CBNqgBCvOxAmsv1q37?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: [hidden email]
http://www.maths.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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
Ross:
Thank you for taking the time to write all this very useful and thoughtful advice.

I am properly chastened for my sinful shortcut with the \c macro—and I should have realized its use in the context of foreign languages.  
My current project doesn’t involve any references, but I used the foreign language packages extensively when writing my earlier book(s), particularly for foreign names.  I will try to go back and figure out what is going wrong a little more carefully and patiently.

I have a question about the pdfx package you mention at the end of your email.  I had not heard of it;  what exactly does it do?  Is it part of MacTex or TeX Live—in other words do I need to download it separately?  Do I call it with a \usepackage command?  I’m not quite sure what the whole validation process is about.  I gather it has to do with making one’s source code compatible with global standards, which I am happy to try to do.
(One of my worst publication experiences was with an article for the American Mathematical Monthly—my macros, even when I supplied the macro files, just wouldn’t cooperate with the MAA style file;  the editor at one point threatened, even though he liked the paper, to reject it on technical grounds.
I ended up going through a 20-page paper and replacing every one of my macro occurrences with its definition.  BTW, that would be a very useful kind
of script, if someone who knows these things were to write it.)

Thanks again for your advice.  I really appreciate it.

Best regards
Ziggy Nitecki

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 21, 2020, at 21:27, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 22 Jun 2020, at 6:58 am, Nitecki, Zbigniew H. <[hidden email]> 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?

No. This will not have anything to do with the (back-end) macros that you use.

The small (Prelink) window is a feature added quite recently (say within 3 years).
It was used in Skim for awhile before it came into TeXshop’s Preview.
Someone else might be able to say exactly when (and why) this feature has been added to the TeXshop front-end.
It should show up simply by hovering your mouse over the active rectangle which is associated with the hyperlink.
Then actually clicking within that rectangle should activate the link as previously.
It may be that once the small Prelink window comes up, you cannot tell where the active rectangle is anymore,
or it may be completely obscured. 
Is there a setting to shift where the Prelink window is located, w.r.t. the active rectangle?
Again, someone else may be able to answer this question.


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.

Not at all uncommon.

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.

Yes.
That recommendation in the hyperref manual was made roughly 20 years ago.
The reasoning is that quite a few macros need to be patched to support automatic creation
of advanced PDF features, such as Bookmarks, hyperlinked cross-references to sections,
citations, etc. as well as external hyperlinking.
It was then thought that it was best to delay Hyperref until as late as possible, so that when it does 
its patching, it will build on top of whatever other packages may have done themselves, earlier
within the preamble.

Such advice is now grossly out-dated.
There are better ways to delay the patching until other packages have been loaded.
Nowadays I find it best to load hyperref as early as possible, so that you know what 
you have and can build on top of that (using the better methods).



Another thing that is very important is that you don’t define home-grown macros
with names that will be altered by Hyperref, because they are standard in many
ways although you do not actually use them yourself. 

This next problem is an example of exactly this.

 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}.  

I’m surprised that  \newcommand{\c}{… }  doesn’t throw an error immediately.
 \c  is the accent command for a cedilla, as is rather common in French and other languages.
By making this definition, you will never be able to properly typeset a co-author or citation-author’s name
such as   Fran\c{c}ois .

This affects hyperref, because in the advanced features it supports, it is necessary to declare 
such macro names for encodings other than ones directed at specific font characters.
Hence all macros in commonly-used language encodings also become defined whenever hyperref is required. 


In my mind, having single-letter user-defined macros is a real no-no.
Very many letters are used this way already for various languages and encodings.
Thus you are just asking for trouble when using hyperref, unless you are very careful
in how you choose macro names.

Trying to find single-letter names that are not already used, and remembering what you defined them for 
is just a fool’s game. Better is to be more descriptive: e.g.  \frakc  in your case.
Yes, it’s more typing, at first; but with copy/paste and/or command completion it really is not so.
Furthermore, your LaTeX sources become easier to read and understand/proofread  than when every
3rd or 4th letter is a backslash.


Even 2-letter names commonly have another use.   (\it, \rm, \tt, \sc, \sf, \ij, \dj, \dz , … )
The only 2-letter combinations that I use are ones that clearly jolt the mind as to
their intended meaning; e.g. \RR , \QQ, \CC  etc. for  \mathbb  letters, or bold-face symbols.
Using \bb, \cc, \xx, \yy etc.  for vectors is generally acceptable, but beware \tt  and that  \aa  and \AA 
already have a meaning.   (think the symbol for Angstrøm units, or in Swedish names).


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.

Not so strange, when you realise that  hyperref  is encountering a macro name that it is trying to declare
for a standard meaning, but it has been usurped by something already defined.
 
So for now, I am not using hyperref in these notes, but would like to.

My advice is to go back to loading it early,
and take great care about resolving any errors that you may encounter.

If you have lots of foreign names in your References, check them to make sure
 a.  that they are actually typeset correctly;
 b.  try to Copy/Paste your whole reference section into a text-file; check
      for errors in the spellings that may result.

Also, I recommend doing:

 c.  load the  pdfx  package to generate PDF/A-2u output, to attempt to conform to
      a published standard for Archivability.

There is a lot of stuff in there specifically to allow you to detect and fix the kinds of
errors that are discussed above.
But you’ll need to check your PDFs with validation software.
There are a number of online PDF/A validators, so you don’t need to have purchased
a licence for Acrobat Pro, or other costly software. 
(But if your institution gives you cheap access to Acrobat Pro, then it is well worth having.)


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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://protect-au.mimecast.com/s/haBqCwV1jpSoW5PQSqKkVT?domain=tex.ac.uk
List Reminders and Etiquette: https://protect-au.mimecast.com/s/-dmXCxngGkfZ3pB0SY9yff?domain=sites.esm.psu.edu
List Archives: https://protect-au.mimecast.com/s/uahlCyoj8PuYRGJWSR9OPu?domain=dir.gmane.org
               https://protect-au.mimecast.com/s/1KPVCzvkmpfKAXnBto1_x6?domain=email.esm.psu.edu
TeX on Mac OS X Website: https://protect-au.mimecast.com/s/w7VKCANpnDCjzxVofMkjBJ?domain=mactex-wiki.tug.org
List Info: https://protect-au.mimecast.com/s/u3O0CBNqgBCvOxAmsv1q37?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: [hidden email]
http://www.maths.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


----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Ross Moore-3
Hi Zbigniew.

On 22 Jun 2020, at 12:26 pm, Nitecki, Zbigniew H. <[hidden email]> wrote:

Ross:
Thank you for taking the time to write all this very useful and thoughtful advice.

I am properly chastened for my sinful shortcut with the \c macro—and I should have realized its use in the context of foreign languages.  
My current project doesn’t involve any references, but I used the foreign language packages extensively when writing my earlier book(s), particularly for foreign names.  I will try to go back and figure out what is going wrong a little more carefully and patiently.

There are usually very good reasons why something doesn’t work;
usually a clash of some kind.


I have a question about the pdfx package you mention at the end of your email.  I had not heard of it;  what exactly does it do?

It is for adding the Metadata, and enabling features designed to ensure that the PDF
has sufficient information for proper extraction of its visual and textual content, well into the future.
 (no matter how software tools change, that is)
If you Google for PDF/A you will find lots of material about what it is for and why it is desirable; 
totally independent of producing PDFs with TeX/LaTeX/etc.

 Is it part of MacTex or TeX Live—in other words do I need to download it separately?  

It has been in TeXLive for quite awhile now (at least 4 years), but dates back much longer.

Do I call it with a \usepackage command?  

Read its documentation.    texdoc pdfx   in a terminal should bring it up.

I’m not quite sure what the whole validation process is about.  I gather it has to do with making one’s source code compatible with global standards, which I am happy to try to do.

Nothing about LaTeX source.
It is about ensuring the PDF has everything, and that fonts are embedded 
and have tables that map all their characters into Unicode sub-strings, etc. 

(One of my worst publication experiences was with an article for the American Mathematical Monthly—my macros, even when I supplied the macro files, just wouldn’t cooperate with the MAA style file;  the editor at one point threatened, even though he liked the paper, to reject it on technical grounds.

Bunkum!
Editors, especially the technical kind, are the ones that are meant to solve compatibility problems.
Authors write down their ideas, in whatever way is convenient and precise.
Editors handle the technical aspects of making those ideas reliably readable.


I ended up going through a 20-page paper and replacing every one of my macro occurrences with its definition.

That’s just the wrong way to handle such things.
It makes more work for everyone.

 BTW, that would be a very useful kind
of script, if someone who knows these things were to write it.)

The most you should have to do is rename the macro, to avoid conflict with something 
they already use.
If there’s an issue with macro-expansion after that, then they should be able to sort it out.



Thanks again for your advice.  I really appreciate it.

You’re welcome.

All the best.

Ross


Best regards
Ziggy Nitecki

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 21, 2020, at 21:27, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 22 Jun 2020, at 6:58 am, Nitecki, Zbigniew H. <[hidden email]> 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?

No. This will not have anything to do with the (back-end) macros that you use.

The small (Prelink) window is a feature added quite recently (say within 3 years).
It was used in Skim for awhile before it came into TeXshop’s Preview.
Someone else might be able to say exactly when (and why) this feature has been added to the TeXshop front-end.
It should show up simply by hovering your mouse over the active rectangle which is associated with the hyperlink.
Then actually clicking within that rectangle should activate the link as previously.
It may be that once the small Prelink window comes up, you cannot tell where the active rectangle is anymore,
or it may be completely obscured. 
Is there a setting to shift where the Prelink window is located, w.r.t. the active rectangle?
Again, someone else may be able to answer this question.


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.

Not at all uncommon.

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.

Yes.
That recommendation in the hyperref manual was made roughly 20 years ago.
The reasoning is that quite a few macros need to be patched to support automatic creation
of advanced PDF features, such as Bookmarks, hyperlinked cross-references to sections,
citations, etc. as well as external hyperlinking.
It was then thought that it was best to delay Hyperref until as late as possible, so that when it does 
its patching, it will build on top of whatever other packages may have done themselves, earlier
within the preamble.

Such advice is now grossly out-dated.
There are better ways to delay the patching until other packages have been loaded.
Nowadays I find it best to load hyperref as early as possible, so that you know what 
you have and can build on top of that (using the better methods).



Another thing that is very important is that you don’t define home-grown macros
with names that will be altered by Hyperref, because they are standard in many
ways although you do not actually use them yourself. 

This next problem is an example of exactly this.

 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}.  

I’m surprised that  \newcommand{\c}{… }  doesn’t throw an error immediately.
 \c  is the accent command for a cedilla, as is rather common in French and other languages.
By making this definition, you will never be able to properly typeset a co-author or citation-author’s name
such as   Fran\c{c}ois .

This affects hyperref, because in the advanced features it supports, it is necessary to declare 
such macro names for encodings other than ones directed at specific font characters.
Hence all macros in commonly-used language encodings also become defined whenever hyperref is required. 


In my mind, having single-letter user-defined macros is a real no-no.
Very many letters are used this way already for various languages and encodings.
Thus you are just asking for trouble when using hyperref, unless you are very careful
in how you choose macro names.

Trying to find single-letter names that are not already used, and remembering what you defined them for 
is just a fool’s game. Better is to be more descriptive: e.g.  \frakc  in your case.
Yes, it’s more typing, at first; but with copy/paste and/or command completion it really is not so.
Furthermore, your LaTeX sources become easier to read and understand/proofread  than when every
3rd or 4th letter is a backslash.


Even 2-letter names commonly have another use.   (\it, \rm, \tt, \sc, \sf, \ij, \dj, \dz , … )
The only 2-letter combinations that I use are ones that clearly jolt the mind as to
their intended meaning; e.g. \RR , \QQ, \CC  etc. for  \mathbb  letters, or bold-face symbols.
Using \bb, \cc, \xx, \yy etc.  for vectors is generally acceptable, but beware \tt  and that  \aa  and \AA 
already have a meaning.   (think the symbol for Angstrøm units, or in Swedish names).


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.

Not so strange, when you realise that  hyperref  is encountering a macro name that it is trying to declare
for a standard meaning, but it has been usurped by something already defined.
 
So for now, I am not using hyperref in these notes, but would like to.

My advice is to go back to loading it early,
and take great care about resolving any errors that you may encounter.

If you have lots of foreign names in your References, check them to make sure
 a.  that they are actually typeset correctly;
 b.  try to Copy/Paste your whole reference section into a text-file; check
      for errors in the spellings that may result.

Also, I recommend doing:

 c.  load the  pdfx  package to generate PDF/A-2u output, to attempt to conform to
      a published standard for Archivability.

There is a lot of stuff in there specifically to allow you to detect and fix the kinds of
errors that are discussed above.
But you’ll need to check your PDFs with validation software.
There are a number of online PDF/A validators, so you don’t need to have purchased
a licence for Acrobat Pro, or other costly software. 
(But if your institution gives you cheap access to Acrobat Pro, then it is well worth having.)


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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://protect-au.mimecast.com/s/haBqCwV1jpSoW5PQSqKkVT?domain=tex.ac.uk
List Reminders and Etiquette: https://protect-au.mimecast.com/s/-dmXCxngGkfZ3pB0SY9yff?domain=sites.esm.psu.edu
List Archives: https://protect-au.mimecast.com/s/uahlCyoj8PuYRGJWSR9OPu?domain=dir.gmane.org
               https://protect-au.mimecast.com/s/1KPVCzvkmpfKAXnBto1_x6?domain=email.esm.psu.edu
TeX on Mac OS X Website: https://protect-au.mimecast.com/s/w7VKCANpnDCjzxVofMkjBJ?domain=mactex-wiki.tug.org
List Info: https://protect-au.mimecast.com/s/u3O0CBNqgBCvOxAmsv1q37?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: [hidden email]
http://www.maths.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

----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://protect-au.mimecast.com/s/eNGACK1DOrCLGXQ4ivnSGX?domain=tex.ac.uk
List Reminders and Etiquette: https://protect-au.mimecast.com/s/GUMICL7Eg9fLZG0QiPWX0r?domain=sites.esm.psu.edu/
List Archives: https://protect-au.mimecast.com/s/KNLCCMwGj8CjAwpzsWN0tN?domain=dir.gmane.org
               https://protect-au.mimecast.com/s/5nbJCNLJxkioGOYjIrBSZA?domain=email.esm.psu.edu/
TeX on Mac OS X Website: https://protect-au.mimecast.com/s/7-RFCOMK7Yc3y7DvI56Qak?domain=mactex-wiki.tug.org/
List Info: https://protect-au.mimecast.com/s/BnKXCP7L1NfQkjB3hBI4os?domain=email.esm.psu.edu



----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Murray Eisenberg
In reply to this post by Nitecki, Zbigniew H.
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. <[hidden email]> 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/




On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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

---
Murray Eisenberg [hidden email]
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
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

<formatmacros.sty>

---
Murray Eisenberg [hidden email]
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
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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Herbert Schulz
> On Jun 22, 2020, at 10:43 AM, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/
>>
>>
>>
>>
>>> On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/
>>>>
>>>>
>>>>
>>>>
>>>> <refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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
>>>
>>> ---
>>> Murray Eisenberg [hidden email]
>>> 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
>>> 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
>>
>> <formatmacros.sty>
>
> ---
> Murray Eisenberg [hidden email]
> 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
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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
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.

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 11:54, Herbert Schulz <[hidden email]> wrote:

On Jun 22, 2020, at 10:43 AM, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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

---
Murray Eisenberg [hidden email]
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
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

<formatmacros.sty>

---
Murray Eisenberg [hidden email]
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
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


----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Ross Moore-3
Hi Zbigniew,

On 23 Jun 2020, at 2:09 am, Nitecki, Zbigniew H. <[hidden email]> 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 .


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/




On Jun 22, 2020, at 11:54, Herbert Schulz <[hidden email]> wrote:

On Jun 22, 2020, at 10:43 AM, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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

---
Murray Eisenberg [hidden email]
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
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

<formatmacros.sty>

---
Murray Eisenberg [hidden email]
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
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

----------- 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



----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
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 <[hidden email]> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 2:09 am, Nitecki, Zbigniew H. <[hidden email]> 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/




On Jun 22, 2020, at 11:54, Herbert Schulz <[hidden email]> wrote:

On Jun 22, 2020, at 10:43 AM, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/




<refmacros.sty><TestofHyperref.tex><TestofHyperref.log><TestofHyperref.pdf>----------- 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

---
Murray Eisenberg [hidden email]
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
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

<formatmacros.sty>

---
Murray Eisenberg [hidden email]
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
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

----------- 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


----------- 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


----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Ross Moore-3
Hi Zbigniew,

On 23 Jun 2020, at 9:57 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

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.

Yes, I understood you to be saying this earlier; nevertheless it is good to be able to eliminate other possibilities.
It is a very strange behaviour.
Do you get any changed behaviour if you use the little “back view” arrows to return to page 1 or page 2, 
after using the PDF’s hyper-links? That is, the left-facing black triangle in this image:





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. 

Can you send a 2-page document, as a PDF.
I don’t believe that there’s anything wrong within the PDF, and it’s somehow all just on your own system.
But as usual, let’s eliminate the PDF itself as a possibility.


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/


Hope the helps.
Stay safe.

Ross

----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
This is the pdf I have been using as a test.  I agree that the behavior is very strange.  And I also agree that the behavior is unlikely to be because of the pdf itself, since I only noticed it on a different document. I’m including the source file.  Oh, and the two macro packages it uses (I think you told me about cleveref, which I have yet to check out, and which my macro seems to emulate).



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 20:09, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 9:57 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

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.

Yes, I understood you to be saying this earlier; nevertheless it is good to be able to eliminate other possibilities.
It is a very strange behaviour.
Do you get any changed behaviour if you use the little “back view” arrows to return to page 1 or page 2, 
after using the PDF’s hyper-links? That is, the left-facing black triangle in this image:

<Screen Shot 2020-06-23 at 10.04.08 am.png>




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. 

Can you send a 2-page document, as a PDF.
I don’t believe that there’s anything wrong within the PDF, and it’s somehow all just on your own system.
But as usual, let’s eliminate the PDF itself as a possibility.


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/


Hope the helps.
Stay safe.

Ross
----------- 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


----------- 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

TestofHyperref.tex (1K) Download Attachment
TestofHyperref.pdf (33K) Download Attachment
formatmacros.sty (19K) Download Attachment
refmacros.sty (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
In reply to this post by Ross Moore-3
I forgot to answer your question: there are only two pages, but those buttons do toggle me between them.

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 20:09, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 9:57 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

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.

Yes, I understood you to be saying this earlier; nevertheless it is good to be able to eliminate other possibilities.
It is a very strange behaviour.
Do you get any changed behaviour if you use the little “back view” arrows to return to page 1 or page 2, 
after using the PDF’s hyper-links? That is, the left-facing black triangle in this image:

<Screen Shot 2020-06-23 at 10.04.08 am.png>




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. 

Can you send a 2-page document, as a PDF.
I don’t believe that there’s anything wrong within the PDF, and it’s somehow all just on your own system.
But as usual, let’s eliminate the PDF itself as a possibility.


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/


Hope the helps.
Stay safe.

Ross
----------- 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


----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Ross Moore-3
Hi Zbigniew,

On 23 Jun 2020, at 10:23 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

I forgot to answer your question: there are only two pages, but those buttons do toggle me between them.

Everything’s fine with that PDF on my system, using viewers:

 1. Acrobat Pro
 2. Preview, from MacOS  (has no link previews)
 3. Preview from TeXshop (with link previews)

Also worth testing is to zoom the window to ~300% and check all your links.
Otherwise, in full page views, some links may seem to be doing nothing 
as the current view is already showing where it links 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/




On Jun 22, 2020, at 20:09, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 9:57 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

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.

Yes, I understood you to be saying this earlier; nevertheless it is good to be able to eliminate other possibilities.
It is a very strange behaviour.
Do you get any changed behaviour if you use the little “back view” arrows to return to page 1 or page 2, 
after using the PDF’s hyper-links? That is, the left-facing black triangle in this image:

<Screen Shot 2020-06-23 at 10.04.08 am.png>




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. 

Can you send a 2-page document, as a PDF.
I don’t believe that there’s anything wrong within the PDF, and it’s somehow all just on your own system.
But as usual, let’s eliminate the PDF itself as a possibility.


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/


Hope the helps.
Stay safe.

Ross




----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
I have realized something interesting about my hyper ref problem.
I have always used the TeXShop viewer from within TeXShop—that is, I’ve opened a source file in TeXShop and then viewed the pdf file that comes up.
For some silly reason, I just tried my test file OUTSIDE TeXShop—that is, opening either Preview or Adobe Acrobat, and opening only the pdf.  
Then the links work fine.  
So there is something glitchy in my copy of TeXShop—right?

But now I have a different problem—or actually two.
First, I tried again to use my newly uploaded MacTeX 2020 on the longer document that had originally exhibited my hyperref problem,
and was getting a slew of error messages—looking closely at them, they seem to be problems with pstricks and/or pst-3D before I even get to my document
in the typesetting process.  
Second, when I reverted back to my older 2017 TexLive, which I had originally used to generate the longer document, the behavior was different from before,
in that now I got a slew of error messaged for my pictures—which were generated using pst-ode, successfully on previous occasions—and if I did my usual and 
typed “r” in the console and hit return, the paper typeset with no pictures.  
So now I don’t have an electronic dopy of my paper as I originally managed to typeset it (of course, being naughty and ignoring warnings) and see no way to recover it.


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 20:35, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 10:23 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

I forgot to answer your question: there are only two pages, but those buttons do toggle me between them.

Everything’s fine with that PDF on my system, using viewers:

 1. Acrobat Pro
 2. Preview, from MacOS  (has no link previews)
 3. Preview from TeXshop (with link previews)

Also worth testing is to zoom the window to ~300% and check all your links.
Otherwise, in full page views, some links may seem to be doing nothing 
as the current view is already showing where it links 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/




On Jun 22, 2020, at 20:09, Ross Moore <[hidden email]> wrote:

Hi Zbigniew,

On 23 Jun 2020, at 9:57 am, Nitecki, Zbigniew H. <[hidden email]> wrote:

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.

Yes, I understood you to be saying this earlier; nevertheless it is good to be able to eliminate other possibilities.
It is a very strange behaviour.
Do you get any changed behaviour if you use the little “back view” arrows to return to page 1 or page 2, 
after using the PDF’s hyper-links? That is, the left-facing black triangle in this image:

<Screen Shot 2020-06-23 at 10.04.08 am.png>




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. 

Can you send a 2-page document, as a PDF.
I don’t believe that there’s anything wrong within the PDF, and it’s somehow all just on your own system.
But as usual, let’s eliminate the PDF itself as a possibility.


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/


Hope the helps.
Stay safe.

Ross



----------- 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


----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Herbert Schulz
> On Jun 23, 2020, at 7:37 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:
>
> I have realized something interesting about my hyper ref problem.
> I have always used the TeXShop viewer from within TeXShop—that is, I’ve opened a source file in TeXShop and then viewed the pdf file that comes up.
> For some silly reason, I just tried my test file OUTSIDE TeXShop—that is, opening either Preview or Adobe Acrobat, and opening only the pdf.  
> Then the links work fine.  
> So there is something glitchy in my copy of TeXShop—right?
>
> But now I have a different problem—or actually two.
> First, I tried again to use my newly uploaded MacTeX 2020 on the longer document that had originally exhibited my hyperref problem,
> and was getting a slew of error messages—looking closely at them, they seem to be problems with pstricks and/or pst-3D before I even get to my document
> in the typesetting process.  
> Second, when I reverted back to my older 2017 TexLive, which I had originally used to generate the longer document, the behavior was different from before,
> in that now I got a slew of error messaged for my pictures—which were generated using pst-ode, successfully on previous occasions—and if I did my usual and
> typed “r” in the console and hit return, the paper typeset with no pictures.  
> So now I don’t have an electronic dopy of my paper as I originally managed to typeset it (of course, being naughty and ignoring warnings) and see no way to recover it.
>
>
> Zbigniew Nitecki
> Department of Mathematics
> Tufts University
> Medford, MA 02155
>

Howdy,

Could you have some old packages in your personal tree that are interfering with the new versions of other packages? How about the same in the texmf-local tree.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Herbert Schulz
In reply to this post by Nitecki, Zbigniew H.
> On Jun 21, 2020, at 6:29 PM, Nitecki, Zbigniew H. <[hidden email]> 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/
>
>
>
>
>> On Jun 21, 2020, at 17:57, Murray Eisenberg <[hidden email]> 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. <[hidden email]> 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/
Howdy,

Hmmm... I just added a line to Section 1 before Sub-Section 1 and empty lines before and after the \newpage. I compiled using the xelatexmk engine (move it from ~/Library/TeXShop/Engines/Inactive/Latexmk up to ~/Library/TeXShop/Engines) and the problem disappeared.




Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)


----------- 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

TestofHyperref.tex (1K) Download Attachment
TestofHyperref.pdf (35K) Download Attachment
formatmacros.sty (17K) Download Attachment
refmacros.sty (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Nitecki, Zbigniew H.
In reply to this post by Herbert Schulz
Undoubtedly, but that goes way beyond my understanding of how the system works.
Can you point me to a guide (for Dummies) on how to troubleshoot something like this?

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 23, 2020, at 8:49, Herbert Schulz <[hidden email]> wrote:

On Jun 23, 2020, at 7:37 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:

I have realized something interesting about my hyper ref problem.
I have always used the TeXShop viewer from within TeXShop—that is, I’ve opened a source file in TeXShop and then viewed the pdf file that comes up.
For some silly reason, I just tried my test file OUTSIDE TeXShop—that is, opening either Preview or Adobe Acrobat, and opening only the pdf.  
Then the links work fine.  
So there is something glitchy in my copy of TeXShop—right?

But now I have a different problem—or actually two.
First, I tried again to use my newly uploaded MacTeX 2020 on the longer document that had originally exhibited my hyperref problem,
and was getting a slew of error messages—looking closely at them, they seem to be problems with pstricks and/or pst-3D before I even get to my document
in the typesetting process.  
Second, when I reverted back to my older 2017 TexLive, which I had originally used to generate the longer document, the behavior was different from before,
in that now I got a slew of error messaged for my pictures—which were generated using pst-ode, successfully on previous occasions—and if I did my usual and 
typed “r” in the console and hit return, the paper typeset with no pictures.  
So now I don’t have an electronic dopy of my paper as I originally managed to typeset it (of course, being naughty and ignoring warnings) and see no way to recover it.


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155


Howdy,

Could you have some old packages in your personal tree that are interfering with the new versions of other packages? How about the same in the texmf-local tree.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- 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


----------- 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
Reply | Threaded
Open this post in threaded view
|

Re: hyperref problem

Herbert Schulz
> On Jun 23, 2020, at 10:20 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:
>
> Undoubtedly, but that goes way beyond my understanding of how the system works.
> Can you point me to a guide (for Dummies) on how to troubleshoot something like this?
>
> 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 23, 2020, at 8:49, Herbert Schulz <[hidden email]> wrote:
>>
>>> On Jun 23, 2020, at 7:37 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:
>>>
>>> I have realized something interesting about my hyper ref problem.
>>> I have always used the TeXShop viewer from within TeXShop—that is, I’ve opened a source file in TeXShop and then viewed the pdf file that comes up.
>>> For some silly reason, I just tried my test file OUTSIDE TeXShop—that is, opening either Preview or Adobe Acrobat, and opening only the pdf.  
>>> Then the links work fine.  
>>> So there is something glitchy in my copy of TeXShop—right?
>>>
>>> But now I have a different problem—or actually two.
>>> First, I tried again to use my newly uploaded MacTeX 2020 on the longer document that had originally exhibited my hyperref problem,
>>> and was getting a slew of error messages—looking closely at them, they seem to be problems with pstricks and/or pst-3D before I even get to my document
>>> in the typesetting process.  
>>> Second, when I reverted back to my older 2017 TexLive, which I had originally used to generate the longer document, the behavior was different from before,
>>> in that now I got a slew of error messaged for my pictures—which were generated using pst-ode, successfully on previous occasions—and if I did my usual and
>>> typed “r” in the console and hit return, the paper typeset with no pictures.  
>>> So now I don’t have an electronic dopy of my paper as I originally managed to typeset it (of course, being naughty and ignoring warnings) and see no way to recover it.
>>>
>>>
>>> Zbigniew Nitecki
>>> Department of Mathematics
>>> Tufts University
>>> Medford, MA 02155
>>>
>>
>> Howdy,
>>
>> Could you have some old packages in your personal tree that are interfering with the new versions of other packages? How about the same in the texmf-local tree.
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)

Howdy,

The log file will list the full path of all packages as they load. Just look for packages that are coming from your personal or texmf-local tree and start to eliminate them. You personal custom packages don't count but anything loaded by them or other packages could be a culprit.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- 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
12