Questions tagged [plain-tex]

Plain TeX is Knuth's original default format for TeX documents.

Plain TeX is a useful minimum set of macros that can be used with TeX, together with some demonstration versions of higher-level commands.

869 questions
77
votes
8 answers

Reasons to use plain TeX

Given the active development in LaTeX and ConTeXt, and how LaTeX insulates the writer from typographical details and ConTeXt gives the user extensive control over formatting thus taking useful complementary approaches (see ConTeXt wiki), are there…
user2265
50
votes
1 answer

Why does plain TeX have a \bye command?

In plain TeX, \bye marks the end of the TeX document. Yet why is such a command even needed? TeX should be quite able to see for itself that here, the file stops, and there is nothing more to find. I do not see why it needs a command to tell it…
Gaussler
  • 12,801
19
votes
1 answer

How does plain TeX \insert work?

My question is about Plain TeX command \insert. I understood that every insert series has a dedicated box. But I didn't understand if the use of \insert adds content to the box, or if the box is constructed at the end of the page, from a list. If…
Maïeul
  • 10,984
19
votes
3 answers

Is there an "Appending \let"?

After \def\MyText{\textbf{My Text}} \let\MySaved\MyText \MySaved and \MyText have the same \meaning. What I would like to have further down in the document is % \MyText = \textbf{My Text} \def\MyText{\textit{More Text}} \let\MySaved{\MySaved…
arney
  • 2,023
18
votes
2 answers

LaTeX for plain TeX users?

Does there exist some concise documentation showing, for things commonly done in plain TeX, the recommended/idiomatic “LaTeX way” of doing something equivalent? Or if not, what are the most common such things to know? Background/context: Recently,…
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
14
votes
1 answer

What is the purpose of \raggedright?

I thought that \raggedright is used to get text: 1) not exceeding certain width, 2) with natural interword spaces, 3) without hyphenation. But it turns out that hyphenation is done with \raggedright. So, what this macro was conceived for? Why was…
Igor Liferenko
  • 7,063
  • 2
  • 14
  • 47
14
votes
1 answer

Number Sets in Plain TeX

Okay, I know how to enter the standard number sets such as Z, Q, R, etc. into LaTeX, but how can I do this in plain TeX? I ask because I can't seem to find it anywhere, and really need them in the document I am currently composing. Thanks.
12
votes
1 answer

Why use \spaceskip and \xspaceskip here?

Plain TeX provides \centerline for centering, well, lines of text, but nothing to center a paragraph. LaTeX has \centering and the \center environment. Looking at the LaTeX code, it appears very similar to what Bechtolsheim proffers in "TeX in…
acarlow
  • 1,311
12
votes
2 answers

Plain TeX macros contains \par as parameter delimiter, but doesn't work with \obeylines, why?

I just wanted to format a .csv file, so I do a test (1), shown as below: \global\let\xpar=\par \def\format#1,#2,#3\par{$#1\times #2=#3$\xpar} \begingroup \everypar={\format}\obeylines% 11,2,22 13,9,117 a,b,c \endgroup \end but it doesn't work, TeX…
10
votes
1 answer

How has plain.tex been updated?

I've noticed that on CTAN there is a new version of the file plain.tex, dating 2021-01-17. But nowehere I see what the changes are. What has changed?
User
  • 2,530
  • 1
  • 14
  • 25
10
votes
1 answer

Where is it allowed to change \hsize?

In chapter 23 "Output routines" there is a warning: It's best not to monkey with \hsize and \vsize except at the very beginning of a job, or after you have ejected all pages from TeX's memory. But in TeXbook itself there are several examples where…
Igor Liferenko
  • 7,063
  • 2
  • 14
  • 47
10
votes
2 answers

Why to store a number via chardef?

For example, in plain.tex and in hyrules.tex (package hyplain) we find such code: \chardef\active=13 \catcode`\~=\active \chardef\myh@us@catcode=\the\catcode`\_ ... \catcode`\_=\myh@us@catcode Are there any other ways to store a number and why…
Igor Liferenko
  • 7,063
  • 2
  • 14
  • 47
10
votes
2 answers

How can we decide a glue or a kern when we are writing a macro?

I don't know if I am right. Let's read the codes :) \setbox0=\vbox{a\par \vskip2pt \kern2pt b} \showbox0 the snippet of the log file: .\glue 2.0 .\kern 2.0 .\glue(\parskip) 0.0 plus 1.0 .\glue(\baselineskip) 5.05556 When…
yanpengl
  • 2,691
  • 12
  • 24
9
votes
1 answer

Problem with a code to draw a box around text

I want to enclose a text in a box. My problem is that when the code below is placed at the beginning of a line it causes a line-break/carriage-return (the box stays on a line by itself, the rest of paragraph starts at the next line). But it is OK…
Maesumi
  • 9,059
9
votes
2 answers

Using a loop in \halign's preamble

I've been trying to use a macro which abstracts the structure of an \halign object to a number of columns, as mentioned in my previous question "Can I use a macro in \halign's preamble?." For that part of the problem, \span worked well, but I…
1
2 3 4 5 6