[OS X TeX] Two unanswered questions on StackExchange

Ross Moore ross.moore at mq.edu.au
Fri Nov 13 15:22:44 EST 2020


Hi Alain,

On 13 Nov 2020, at 6:36 pm, Alain Schremmer <schremmer.alain at freemathtexts.org<mailto:schremmer.alain at freemathtexts.org>> wrote:

https://tex.stackexchange.com/questions/569158/misnumbered-sections-in-starred-chapter-and-mishyperlinked-sections-in-main-matt<https://protect-au.mimecast.com/s/6COECvl1g2SBxGEXUQxkWT?domain=tex.stackexchange.com>


While the MWE below compiles, there are two glitches whose causes I have not been able to figure out:

As can already be seen in the ToC, the sections in the Epilogue are numbered 3 and 4 instead of 1 and 2,
In the ToC, if you hover near, for instance, Numbers, you will see “Go to page 9” while the Toc indicates page 1. In other words, the number of pages in the front matter (8) is being added to the page number in the hyperlink of the main matter items. The same obtains in the ChapterTocs.

(I didn’t think I should copy the MWE.)

This is perfectly normal.
The hyperlink is using the “virtual page” of the PDF,
whereas the printed number can easily be different, due to front-matter material
using different numbering to the full document.

The pop-up is showing the name of the internal destination,
which *must be unique* within the PDF.

It is quite hard to build the PDF so that it shows a message that is different from the internal unique destination name.
Certainly this is not done as a matter of course.
I’m not saying that it is impossible, but that the value of trying this is dubious,
since it may not be understood by all PDF reader software.

Once again, Ross to the rescue of Alain!!!!!

Here’s a screen-shot of the same kind of problem with a document that I am currently working on.

[cid:CC5205FF-B76B-4EB6-95E8-79C97BB46174 at telstra.com.au]

There are 3 pages of Cover and title pages; prior to roman numbering of front-matter: ToC, LoT, LoF.
The link goes to the correct page, which is physically numbered as  ii ,
but it is the 5th (virtual) page within the entire PDF document.
   (See the page number indicator in the 2nd image.)

[cid:F12FCFED-1508-4141-B7C2-BEDF520F3684 at telstra.com.au]

I’ll be looking into ways of making this seem more intuitive.
But that’s not high on the priority list, since the visual popup (in Apple’s Preview)
shows what is on that target page.


The only way to improve this is to overload the PDF document with an annotation that
masks what the PDF viewer would do, barring such a masking annotation.
But if one does this, then you cannot be sure that all PDF viewers will actually honour it in the same way.

The lesson here is that LaTeX can be used to create a PDF, fully loaded with all kinds of information.
How it actually appears is not predetermined for all viewers.
In situations such as this, the viewer may have been programmed to choose to use different pieces
of the provided information.  Yes, that can be frustrating!


1. I had noticed that “the number of pages in the front matter is being added to the page number of the toc to produce the page number in the pop-up” (I will edit the question with that wording.) But I was not at all aware that it would be so much harder for hyperref to keep track the way latex does. So, I thought it was my problem.

2. But a pdf on screen is much more appropriate for the kind of students I used to have as, for instance, while mathematicians will "go back" to ascertain the meaning of a word, these students are just not going to go to the index and then to where the term was defined and then back to where they needed it. They just won’t and that’s that. Onscreen, in the magnum opus, they will just have to click on the word and they might do it. But the toc glitch is going to upset them.

3. What about the numbering of the sections in the Epilogue? That's got to be the result of my dismal understanding of LaTeX.

4. In any case, thanks for explaning the first glitch. Now, I can go ask Oberdieck if he might see his way to make another “quick and dirty hack”.

—alain


Hope this helps.

Ross


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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20201113/655df4f8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Page5or2.png
Type: image/png
Size: 68616 bytes
Desc: Page5or2.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20201113/655df4f8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-11-13 at 10.45.58 pm.png
Type: image/png
Size: 101600 bytes
Desc: Screen Shot 2020-11-13 at 10.45.58 pm.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20201113/655df4f8/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20201113/655df4f8/attachment-0002.png>


More information about the MacOSX-TeX mailing list