14

When viewing the source code of the TeXBook, I find that there is a character ^^ff before every chapter in it. I am wondering why using this ^^ff character which seems useless?

The following screenshots show what I see in WinEdt and Notepad++ editors:

enter image description hereenter image description here

  • This is not a general thing: presumably you have an issue either with the copy of the file you have or in some way with your viewer. Where did you get your copy of texbook.tex and how are you viewing it? – Joseph Wright Oct 26 '14 at 7:58
  • @JosephWright I get it from ctan.org/tex-archive/systems/knuth/dist/tex and view it with both WinEdt and Notepad++ . – Z.H. Oct 26 '14 at 8:09
  • That's the generic link: exactly which host did you get it from? (There is a mirror system in place which means that if I follow that link I'll actually get it from a machine in Warwick, for example.) – Joseph Wright Oct 26 '14 at 8:17
  • @JosephWright I have downloaded this file several times in several different computers. The actual link of last download is mirrors.rit.edu/CTAN/systems/knuth/dist/tex/texbook.tex . I have also modified my question, adding two screenshots for it. – Z.H. Oct 26 '14 at 8:25
9

It's an old control character for a page break (form feed), used long time ago for marking the new page for printers.

It's 0x0C in HEX, also represented as Control + L. WinEdt shows it as ^L - underlined L. Notepad++ show it as FF.

  • Thanks, I find it in texbook: \catcode`\^^L=\active \outer\def^^L{\par}. Why using 0x0C rather than \par, while it is hard to input 0x0C with keyboard? – Z.H. Oct 26 '14 at 8:42
  • I think this was typesetted in very old days, when vim or emacs was very popular and typesetting ^L was as simple, as Ctrl + L (e.g. in vim). So, it's an obvious idea to use "page break" character for a paragraph in this case. – m0nhawk Oct 26 '14 at 8:54
  • 2
    Your comment about "old TeX distribution" is misleading control L is an active character which expands to \par (not newline) in current plain TeX and LaTeX. – David Carlisle Oct 26 '14 at 10:31
  • Editors (not just vim and emacs, and to this day) also often have keybindings to jump to the next or previous occurrence of ^L. – zwol Oct 27 '14 at 3:11
19

It is definitely not 0xFF, but “Control-L” or ASCII 0x0C (decimal 12), called “form feed” (this is why your viewer shows it as FF).

As you probably know, Knuth started using computers when they weren't like the ones we use today. When the teletype was the only interface, character Control-L was used to tell the teletype “advance to the end of the form”, so the roll of paper could be easily torn up and the session could restart from a fresh state.

Later, screen editors used “Control-L” to tell the computer “do a new page”, so that scrolling past “Control-L” would put the next copy at the top of the screen. It's also useful for marking relevant points in the text, so “search for Control-L” leads, in the case of texbook.tex, to the start of the next chapter.

The Plain format defines

\catcode`\^^L=\active \outer\def^^L{\par} % ascii form-feed is "\outer\par"

so to get yet another check for unbalanced braces. Look at the start of chapter 2:

Technique! The very word is like the shriek
Of outraged Art. It is the idiot name
Given to effort by those who are too weak,
Too weary, or too dull to play the game.
\author LEONARD ^{BACON}, {\sl Sophia Trenton\/} (1920) % composed at Stanford

\eject
^^L\beginchapter Chapter 2. Book Printing\\versus\\Ordinary Typing

Forgetting the year in the citation would make TeX find ^^L during the scan for the argument to \author, but active ^^L is an outer macro.

During the run of TeX on the file it just produces \par, but it could be redefined in other ways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.