Table of contents has question marks instead of page numbers, even when I update

Hi, I’m having a problem. My table of contents shows question marks rather than page numbers, and this persists even when I apply Document > Update > All multiple times.

Can someone help me find out what is going on? Thank you for your help! This is happening intermittently — meaning that if I undo some changes, it stops happening, but I can’t figure out exactly what changed. It seems like something must be getting corrupted somewhere but I don’t know what I’m doing to cause it.

In case it helps debug this issue, one thing I noticed (perhaps coincidental) is that I was able to get the question marks to disappear once by switching from papyrus mode to paper mode.

I think the reason is because in papyrus mode TeXmacs does not break the text into pages, so does not know in which page is each entry of the table of contents.
The papyrus mode is useful when writing long documents—I do not have experience with that but it makes intuitive sense, as TeXmacs in papyrus mode must not do the page-breaking calculations.

3 Likes

Thanks very much @pireddag for this helpful explanation! I am glad my document is not corrupted.

Yes, @pireddag is right. TeXmacs computes page breaks only in paper mode, so page numbers are undefined in papyrus mode. All is in order :slight_smile: Sometimes the TOC is cached, so page numbers persist, but as soon as you refresh the document the TOC could display undefined. A possibility is to automatically switch mode when you want to refresh the document, but I do not think it is really needed in usual workflows.

PS: Maybe one can make page breaks persistent by recording them in the document, this would allow to show them in papyrus mode (even if they would not be updated).

1 Like

OK thanks everyone! I think what was confusing me is that the cache was a bit unpredictable so I didn’t guess right away what was happening :laughing:

Anyway, I’m perfectly fine with the behavior as-is now that I understand it. Thanks again for all your help! I’m having so much fun with TeXmacs.

1 Like