ascherer / cweb

Literate Programming in C/C++
https://github.com/ascherer/cwebbin
86 stars 11 forks source link

more problems with pdf bookmarks #2

Closed ascherer closed 4 years ago

ascherer commented 8 years ago

The patches in the attachment show the effect of using colored boxes instead of destination marks.

Take latest cwebmac.tex (ver. 3.69) and test.w from the attachment.

First apply patch cwebmac-dvi.patch:

<get clean cwebmac.tex>
patch -p0 < cwebmac-dvi.patch
cweave test.w
tex '\let\pdf+ \input test.tex'
dvipdfm test.dvi
mv test.pdf test1.pdf

Then apply patch cwebmac-pdf.patch:

<get clean cwebmac.tex>
patch -p0 < cwebmac-pdf.patch
cweave test.w
pdftex test.tex
mv test.pdf test2.pdf

Now compare test1.pdf and test2.pdf

I see two problems:

  1. for pdf mode there are only two occurrences of \pdfdest (red and green), while for dvi mode there are three occurrences of setting destination marks (red, green and blue). I would like to point out that in pdf mode there is \makebookmarks macros, which does the same job more clearly, than it is done in dvi mode.
  2. in dvi mode link to first section points before date, not before the section itself, as in pdf mode
ascherer commented 8 years ago

Deeper analysis is done on branch https://github.com/ascherer/cweb/tree/pdf-bookmarks