# Tag Info

10

That's not from “The TeXbook”, but is rather the typeset version of the WEB source for TeX (the program). This is available in the TeX Live distribution (possibly also with MiKTeX) as a hyperlinked PDF file, with texdoc tex or from texdoc.net. The red numbers are hyperlinks pointing to the corresponding module or section. If I hover on a link I get the ...

6

If you are referring Donald Knuth and Silvio Levy's CWEB system of structured documentation, and you have a TeXLive installation, you can find the CWEB documentation in the texmf-dist/doc/plain/cweb directory in your texlive tree. In a standard Linux installation the path is /usr/local/texlive/2014/texmf-dist/doc/plain/cweb. There you will find cwebman....

6

I asked the following in a letter to Donald Knuth: Lastly, I started to use your CWEB system for a project to find out if literate programming is a style that suits me. So far, I like it very much! The only problem I am experiencing is that I haven't found a way yet to mention the bitwise-or operator | within a c-section. Is there special syntax for that ...

5

\relax is not undefined enough, use \let\ifpdf\undefined % working workaround \input eplain \pdffalse % restore cwebmac definition Just undefining \ifpdf not enough, the two systems define \ifpdf for different reasons, eplain uses it to test for pdftex, but cweave uses \ifpdftex for that and uses \ifpdf for use with dvipdf(m)(x) see: \ifpdftex\...

4

This is documented in the CWEB manual (which you can open by invoking texdoc cweb which opens a DVI file, or read as PDF online), in Appendix C: How to use CWEB macros (page 25), point 4. The trick is that after setting any of \pagewidth (default 6.5in), \pageheight (default 8.7in) or \fullpageheight (default 9in), you need to say \setpage: If you change ...

4

The definition of \epsfbox in the epsf.tex file included in TeX Live (at /usr/local/texlive/2017/texmf-dist/tex/generic/epsf/epsf.tex, advertising This is epsf.tex' v2.7.4 <14 February 2011>) is \def \epsfbox #1{% \global \def \epsfllx {72}% \global \def \epsflly {72}% \global \def \epsfurx {540}% \global \def \epsfury {720}% \def ...

4

You are processing the following items in main vertical list when abc\par OK is used: - set first special output routine (line 42) - put \vbox to\vsize (line 46), this makes the page full, but cost is zero - put one-line paragraph "abc", this makes the page overfull, cost is infinity - put second paragraph "OK": when the \parskip of this paragraph is ...

3

The difference comes from the time when the output routine is invoked. It is exercised when TeX moves material from the list of recent contributions to the current page. In the case that only abc is entered the current page consists of a mark, the topskip and an empty vbox; the paragraph with abc is the recent contribution. The output routine is called when ...

3

It appears that Don Knuth uses the original epsf.tex with a completely different definition of \epsfbox without \leavevmode. So, instead of bothering “The Grand Wizard” with this issue and forcing him to update his local epsf.tex, I simply add the missing \hboxes for those of us with an “updated” epsf.tex.

3

Do not change page dimensions - change offsets to center the output on A4 page. TeX does not care about "paper size". It is the job of the user to ensure that the output does not fall off the edge of the physical medium on which it is being printed through adjusting \hoffset, \hsize, \voffset and \vsize. I choose to adjust \hoffset and \voffset to preserve ...

3

You have to define a suitable font for \eightrm, but also setup some uppercase conversions; here I define only those necessary for the examples. There was also an unfortunate typo in utfplainmac.tex, with \c{A} instead of the correct \c{C}. Fix it in the file. \input cwebmac \input utfplainmac \input plain-t1 \font\eightrm=ecrm0800 \uccode"A7="87 % ç is &...

3

@ Let's say we want to write a \.{CWEB} program that manipulates \.{bibtex} files. How can we do a multiline verbatim code listing? Like this? \begingroup\tt\obeylines\catcode\{12 \catcode\}12 @@Book{Author:2000, author={Last,First}, title={Title}, year=2000, } \endgroup

2

By trial and error, I came to this. This is complete working example using Latex and some plain TeX definition together. This example is not perfectly. % -*- coding: utf-8 -*- \documentclass[a4paper]{cweb} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{polski} \begin{document} @* Wstęp. To jest początek. A to kolejna linia zakończona ...

2

toutf16 function should be changed to this: \directlua{ function toutf16(str) tex.write(string.char(92) .. "376" .. string.char(92) .. "377") for c in string.utfvalues(str) do if c < 0x10000 then tex.write(string.char(92) .. string.format("%03o", c / 256) .. string.char(92) .. string.format("%03o", c % 256)) ...

2

Based on David Carlisle's answer, I defined these macros, which allow almost verbatim input (I still have to escape a few characters). \def\beginlisting{% \par\vskip\baselineskip% \begingroup% \tt\obeylines\obeyspaces% \catcode\{12\catcode`\}12% } \def\endlisting{% \endgroup\par% \vskip\baselineskip% } @ Let's say we want to write ...

1

There is an alternative using pdfcsplain: \input cwebmac \input utf8lat1 \input lmfonts \N{1}{1} Introdução. Lorem ipsum dolor... \end

1