[texhax] Question about cwebmac.tex

Igor Liferenko igor.liferenko at gmail.com
Thu Feb 4 03:41:59 CET 2016

Hi all,

> E.g., (untested)
> 	\edef \next (\noexpand \pdfoutline goto num 2 {\noexpand \directlua
> {toutf16("\the\toksE")}})
> 	\next

Thanks, Philip Taylor. This seems to work fine:

  function toutf16(str)
\edef \next {\noexpand \pdfoutline goto num 2 {\noexpand \directlua
\pdfoutline goto num 3 {\directlua{toutf16("\the\toksE")}}

I would like to point out that I make no changes to cwebmac.tex (the
only issue was non-ascii strings in \pdfoutline, which is now solved)
- I just want to bring some clarity.

I have accumulated two questions.

1) It is curious why in the following example contents of \foo do not
get to the outline (the outline is just "Example program"):

@* Example \foo program.


@ @<Something@>=
void main (void)

2) In the following example "Foo..." is written as "Foo \(test\)
program" to pdf file.
And "If..." is written as "If \(try\) catch" to pdf file.
Although the backslashes are not displayed in pdf viewer, they are not
necessary to print braces in pdf outlines.
Why in cwebmac.tex braces (and other symbols) are escaped with
backslashes in pdf outlines?

@* Foo (test) program.

@<If (try) catch@>;

@ @<If...@>=
void main (void)


More information about the texhax mailing list