diff options
Diffstat (limited to 'web/c_cpp/cweb/cwebman.tex')
-rw-r--r-- | web/c_cpp/cweb/cwebman.tex | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/web/c_cpp/cweb/cwebman.tex b/web/c_cpp/cweb/cwebman.tex index 108bd32f88..7a906cc954 100644 --- a/web/c_cpp/cweb/cwebman.tex +++ b/web/c_cpp/cweb/cwebman.tex @@ -35,7 +35,7 @@ \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill} \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno} -\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.10)} +\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.11)} % This verbatim mode assumes that ! marks are !! in the text being copied. \def\verbatim{\begingroup @@ -49,7 +49,7 @@ \null\vfill \centerline{\titlefont The {\ttitlefont CWEB} System of Structured Documentation} -\vskip 18pt\centerline{(Version 4.10 --- August 2023)} +\vskip 18pt\centerline{(Version 4.11 --- December 2023)} \vskip 24pt \centerline{\authorfont Donald E. Knuth and Silvio Levy} \vfill @@ -57,9 +57,6 @@ \noindent \TeX\ is a trademark of the American Mathematical Society. -\noindent -Acrobat Reader is a trademark of Adobe Systems Incorporated. - \bigskip\noindent The printed form of this manual is copyright \copyright\ 1994 by Addison-Wesley Publishing Company, Inc. All rights reserved. @@ -1147,29 +1144,27 @@ the `\.{@\#}' will put extra space after `$\langle\,$Other locals$\,\rangle$'. Many people have of course noticed analogies between \.{CWEB} and the World Wide Web. The \.{CWEB} macros are in fact set up so that the output of -\.{CWEAVE} can be converted easily into Portable Document Format, -with clickable hyperlinks that can be read with Adobe's Acrobat Reader, -using a widely available open-source program called \.{dvipdfm} developed -by Mark~A. Wicks. After using \.{CWEAVE} to convert \.{cob.w} into -\.{cob.tex}, you can prepare and view a hypertext version of the program -by giving the commands +\.{CWEAVE} can be converted easily into Portable Document Format, with +clickable hyperlinks that can be read with your favorite {\mc PDF} viewer, +using a widely available open-source program called \.{dvipdfm} developed by +Mark~A. Wicks. After using \.{CWEAVE} to convert \.{cob.w} into \.{cob.tex}, +you can prepare a hypertext version of the program by giving the commands $$\vbox{\halign{\.{#}\hfil\cr tex "\\let\\pdf+ \\input cob"\cr -dvipdfm cob\cr -acroread cob.pdf\cr}}$$ +dvipdfm cob\cr}}$$ instead of invoking \TeX\ in the normal way. (Thanks to Hans Hagen, C\'esar Augusto Rorato Crusius, and Julian Gilbey for the macros that make this work.) Alternatively, thanks to H\`an Th\^e\kern-.3em\raise.3ex\hbox{\'{}} Th\`anh and Andreas Scherer, you can generate \.{cob.pdf} in one step by simply saying `\.{pdftex}~\.{cob}'. -And a third way to create PDF output from \.{CWEB} input is to say -`\.{xetex}~\.{cob}'. +Alternative ways to create {\mc PDF} output from \.{CWEB} input are to say +`\.{xetex}~\.{cob}' or `\.{luatex}~\.{cob}'. Similar output for ``smart'' devices can be created with Martin Ruckert's Hi\TeX\ and its dynamic \.{HINT} format; just say `\.{hitex}~\.{cob}'. \.{HINT} files can be viewed with the \.{hintview} program, which is available -for {\mc GNU}/Linux, {\mc MS}~Windows, and Android. +from \.{https://hint.userweb.mwn.de/hint/hintview.html}. A more elaborate system called \.{CTWILL}, which extends the usual cross references of \.{CWEAVE} by preparing links from the uses of identifiers @@ -1187,7 +1182,7 @@ contains an excerpt from the \.{CWEB} program itself. The reader who examines the listings in this appendix carefully will get a good feeling for the basic ideas of \.{CWEB}. -Appendix B is the file that sets \TEX/ up to accept +Appendix B displays the files that set \TEX/ up to accept the output of \.{CWEAVE}, and Appendix~C discusses how to use some of those macros to vary the output formats. @@ -1524,20 +1519,28 @@ features needed by the output of \.{CWEAVE}. \vskip6pt \begingroup \def\tt{\eighttt} \baselineskip9pt -\def\printmacs{\begingroup +\def\printmacs#1{\begingroup \def\do##1{\catcode`##1=12 } \dospecials \parskip 0pt \parindent 0pt \catcode`\ =13 \catcode`\^^M=13 - \tt \verbatimdefs \input cwebmac \endgroup} -\printmacs + \tt \verbatimdefs \input cweb#1mac \endgroup} +\printmacs{\empty} + +\vskip6pt \baselineskip12pt +\noindent And here comes the file that extends \.{cwebmac.tex} in order to +support the ``hypertext'' features needed by the enhanced \TEX/ engines when +processing the output of \.{CWEAVE}. + +\vskip6pt \baselineskip9pt +\printmacs{acro} \endgroup \vfill\eject \def\runninghead{APPENDIX C --- NOTES ON FORMATTING} \section Appendix C: How to use \.{CWEB} macros. -The macros in \.{cwebmac} make it possible to produce a variety of formats -without editing the output of \.{CWEAVE}, and the purpose of this appendix -is to explain some of the possibilities. +The macros in \.{cwebmac} and \.{cwebacromac} make it possible to produce a +variety of formats without editing the output of \.{CWEAVE}, and the purpose +of this appendix is to explain some of the possibilities. \def\point#1.{\yskip\indent#1.\quad\ignorespaces} @@ -1607,7 +1610,7 @@ $$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr \.{ { }\\titlefalse \% include headline on the contents page}\cr \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont CWEAVE\}{ }processor\}}\cr - \.{ { }\\vskip 15pt \\centerline\{(Version 4.10)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.11)\}{ }\\vfill\}}\cr}$$ Redefining \.{\\rheader}, which is the headline for right-hand pages, suffices in this case to put the desired information at the top of the contents page. @@ -1615,8 +1618,8 @@ contents page. \point 9. Data for the table of contents is written to a file that is read after the indexes have been \TEX/ed; there's one line of data for every starred section. The file \.{common.toc} might look like this: -$$\lpile{\.{\\ZZ \{Introduction\}\{0\}\{1\}\{29\}\{\}}\cr - \.{\\ZZ \{The character set\}\{1\}\{21\}\{35\}\{\}}\cr}$$ +$$\lpile{\.{\\ZZ \{Introduction\}\{1\}\{1\}\{30\}\{\}}\cr + \.{\\ZZ \{The character set\}\{1\}\{21\}\{36\}\{\}}\cr}$$ and so on. The \.{\\topofcontents} macro could redefine \.{\\ZZ} so that the information appears in any desired format. (See also point~19 below.) @@ -1735,9 +1738,9 @@ You can send email to \\pdfURL\{the author\}\{mailto:andreas\\UNDER/github@@freenet.de\}\cr or visit \\pdfURL\{his home page\}\{https://github.com/ascherer\}\cr}}$$ In a {\mc PDF} document, the first argument will appear in blue as -clickable text; the Acrobat reader, if correctly configured, will then -redirect those links to the user's browser and open either the -email client or the HTML viewer. In a hardcopy document, both arguments +clickable text; the {\mc PDF} viewer, if correctly configured, will then +redirect those links to the user's browser and open either the email client +or the {\mc HTML} viewer. In a hardcopy document, both arguments will be printed ({\tt the second in parentheses and typewriter type}). Certain special characters in an Internet address need to be handled in a somewhat awkward way, so that \.{CWEAVE} and/or \TeX\ @@ -1749,10 +1752,10 @@ titles in the table of contents, some of which will be subsidiary to others if the depth feature of \.{@*} has been used. Such bookmark entries are also known as ``outlines.'' Moreover, the final group title, `Names of the sections', -can be opened up to list every section name; Acrobat users can therefore +can be opened up to list every section name; users can therefore navigate easily to any desired section. -The macros of \.{cwebmac.tex} are careful to ``sanitize'' all the names +The macros of \.{cwebacromac.tex} are careful to ``sanitize'' all the names that appear as bookmarks, by removing special characters and formatting codes that are inappropriate for the limited typographic capabilities of {\mc PDF} outlines. For example, one section of \.{CWEAVE} |