Discussion:
[tex-k] FYI: CWEB problems with PDF bookmarks
Andreas Scherer
2016-05-16 14:44:41 UTC
Permalink
To whom it may concern:

I have been approached by mail that the set of PDF-related macros in
cwebmac.tex (originating from cweb 3.61 as of fall 2000) produces problems
with PDF bookmarks for sources and change files when "\let\maybe=\iffalse" is
set, so that only "changed" sections are actually printed.

To analyze the problem, I have create a branch on Github that reproduces the
relevant steps for closer inspection:
https://github.com/ascherer/cweb/tree/pdf-outlines-broken

Although I had been involved with the pdftex part of cwebmac.tex, I am not in
the position to work on this problem. However, I'd be glad to receive feedback
on "issue 1": https://github.com/ascherer/cweb/issues/1

Cheers, Andreas
Julian Gilbey
2016-05-22 19:48:10 UTC
Permalink
Post by Andreas Scherer
I have been approached by mail that the set of PDF-related macros in
cwebmac.tex (originating from cweb 3.61 as of fall 2000) produces problems
with PDF bookmarks for sources and change files when "\let\maybe=\iffalse" is
set, so that only "changed" sections are actually printed.
Hello Andreas,

I replied to the original email author as follows:

-----

The macros are not particularly robust: they were built by Don Knuth (the
original WEB macros) and then modified by Silvio Levy for CWEB, and
were designed to be good enough for most practical purposes.

The PDF features were added later by Silvio Levy, as far as I am
aware. There seems to be no care taken to ensure that bookmarks work
correctly when only outputting changed sections; search the
cwebmac.tex file for the occurrence of the string "num" to see where
the PDF annotations are created and used.

It looks like it would be a significant pain to fix it for this
somewhat unusual use case, and would require some major redesign, so I
doubt anyone would be likely to do the needed work.

-----

I had a quick think about what would be needed to fix it, and realised
that it would require a major code rewrite, which is probably not
worth it for this use case.

Julian
Andreas Scherer
2016-05-24 16:59:33 UTC
Permalink
Post by Julian Gilbey
I had a quick think about what would be needed to fix it, and realised
that it would require a major code rewrite, which is probably not
worth it for this use case.
Hello, Julian,

thanks muchly for looking into this. I'll leave the two Github branches open,
but won't expect any solution. Extracting 'changed sections only' certainly is
not a usecase for 'publication'.

Cheers,
Andreas

Loading...