[tex-live] [PATCH] CWEB+XDvi (2/2): reorganize PDF code & add hypertex support

Richard M Kreuter kreuter at progn.net
Sat Jan 30 17:47:32 CET 2016


Hello TeX Live,

I wanted to get clickable navigation links in the woven output of cweave
under XDvi (via hypertex specials, which XDvi recognizes), and this
turned out to involve a bit of rejiggering of the PDF support in cwebmac.
Toward that end, the attached modifies cwebmac in 4 ways, mostly to move
around the time at which the PDF macros are defined and expanded:

(1) Hoist all the PDF-specific command sequences upwards in the file and
hide them behind a layer of indirection (mostly to support items (2) and
(4) following).

(2) Define all the PDF command sequences unconditionally during the
input of cwebmac, but only execute them when \ifacro is true inside the
indirection layer from item (1).

(3) Add some PDF-specfic command sequences for destinations and links by
page number for the table of contents. (This isn't really related to my
goals, but I was touching this stuff anyway.)

(4) add a branch in the destination and link command sequences of the
indirection layer from item (1) to emit HyperTeX specials when \ifacro
is false and \ifhypertex is true, for clickable navigation links in the
DVI under XDvi.

I believe all of the above is compatible with the current default
behavior of cwebmac.tex. However, with the attached changes, the user
can put

\hypertextrue 

in the limbo text at the top of the main .w file in order to get
clickable navigation links for XDvi when cwebmac line 9 is commented.
(When cwebmac:9 is uncommented, the PDF specials take
precedent. Additionally, by delaying the \ifacro usage as this changeset
does, the user who wants PDF goodies via tex+dvipdfm(x) can put

\acrotrue

in the limbo text rather than uncommenting cwebmac:9.)

Would the web2c maintainers please let me know how such a feature
(either this implementation, or another) might get included?

(Note: this change conflicts slightly with the change I've submitted in
a previous message to add source specials to the woven DVI, so I'm also
attaching a patch that combines this message's content with that one's.)

Finally, I've been using git-svn to track Build/source. If someone needs
either of these patches formatted differently for inclusion, please let
me know.

Thank you,
Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cwebmac-hypertex.patch
Type: text/x-diff
Size: 14452 bytes
Desc: Reorganize PDF command sequences in cwebmac.tex & add hypertex support
URL: <http://tug.org/pipermail/tex-live/attachments/20160130/030aabb4/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cwebmac-hypertex-and-source-locations.patch
Type: text/x-diff
Size: 15122 bytes
Desc: Reorganize PDF command sequences in cwebmac.tex & add hypertex support & support source locations from cweave
URL: <http://tug.org/pipermail/tex-live/attachments/20160130/030aabb4/attachment-0003.bin>


More information about the tex-live mailing list