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

learn more… | top users | synonyms

15
votes
1answer
216 views

Behavior of \\ in Plain TeX

According to \show, the pre-defined control sequence \\ is supposed expand to its argument without the suffix "pt": This is TeX, Version 3.1415926 (TeX Live 2012/Debian) **\show\\ > \\=macro: ...
5
votes
1answer
109 views

Using end-of-line delimiter in plain Tex macro

How is it possible to use the end-of-line character as a macro parameter ? I would like something along the lines of : \def\mymacro#1\endlinechar{Content:#1} \mymacro First content \mymacro Second ...
13
votes
2answers
163 views

An hbox-vbox-halign permeable macro, is it possible?

I currently have a Plain TeX file which does something like this in a multitude of places: \indent\hbox{\vbox{\halign{#\hfil\quad&#\hfil\cr ... table content here ... }}} I would love to ...
5
votes
1answer
82 views

A question about <token2> in \expandafter<token1><token2>

I am getting confused about the \expandafter command in TeX. In TeXbook, Knuth said that \expandafter token. TeX first reads the token that comes immediately after \expandafter, without ...
5
votes
2answers
107 views

why I can't use footnote(insert) in nested boxes?

Sometimes, I need insert footnotes in nested boxes, but it seems that I can't use footnotes in nested boxes. % ok \hbox{a\footnote{$^1$}{a footnote}} but not this % won't get a footnote ...
1
vote
1answer
42 views

I need to install the package 'cjwplain' on Fedora 17

I need to compile old books typeset using Plain Tex. But I need to compile them using LaTeX instead of TeX because I need to process them using the package {preview}. I have found out about a package ...
17
votes
2answers
317 views

Is there a “smoking gun” to distinguish between ConTeXt and plain TeX

I'm writing a tool to streamline some typesetting jobs, and I am having trouble distinguishing between plain Tex and ConTeXt. LaTeX is straightforward to recognise by the \documentclass command (or ...
4
votes
2answers
77 views

plain tex: break \line and \vbox through pages

I'm trying to break the following command %\hsize=380 true pt \line{% 1 \hfil\vtop{\hsize 365 truept{% Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ...
6
votes
1answer
107 views

amstex: operator definition error

I can't understand why the following code give me an error \input amstex.tex $\mathop{\rm arctg}(x)$ \bye Thus, the input does not work with my macros that include the use of \rm, \mathop, etc., ...
1
vote
0answers
32 views

headlines are not shown with tikz input (plain TeX) [duplicate]

I'm usign plain TeX with custom headlines. If I load Tikz packages with \input tikz then headlines are blank. The following are my headlines (some commands don't belong to plain TeX, but I think ...
9
votes
2answers
419 views

Embedding a flv (or mp4) video using pdfTeX (plain TeX only)

I am attempting to find out how to embed a flv video in a pdf file created using plain TeX and pdfTeX. I was successful at manually (via Adobe Acrobat's menu: Tools->Multimedia->Video Tool) embedding ...
17
votes
3answers
2k views

How to compile the source code of TeX

I am more and more interested in the system TeX (and LaTeX) and I want to study it more deeply. I am not telling that I want to learn how to use it, but I want to understand its mechanism now. The ...
4
votes
2answers
92 views

How to put some comment-like text in a formula?

I have the following formula: $$\bot \dashv\vdash \bot \land A /* not derivable */$$ But the phrase /* not derivable */ doesn't show correctly. For example there is space between / and *, but no ...
44
votes
2answers
2k views

Electronic version of Knuth's “TeXbook”?

I have a printed copy of the TeXbook (from D.E. Knuth) at home. Now that I travel a lot, I don't want to take my library with me every time. Question: Is there a legal way to obtain (=purchase) a PDF ...
13
votes
1answer
391 views

When does TeX execute the \catcode=`\… assignment?

TeX always scans the input and converts it into some tokens, then expands some tokens according to the latest definition of that command ... stomach -> lists -> page but when does TeX execute the ...
8
votes
4answers
213 views

Special macro definition (2opt, 1mand)

How can you define a macro \cmd in TeX primitives using two optional arguments (and a mandatory one) that fulfills the property that calling \cmd[opt]{mand} is equivalent to \cmd[][opt]{mand}. Yet, I ...
6
votes
2answers
303 views

How to not have widows and orphans without using raggedbottom

I know I can set \clubpenalty and \widowpenalty to 10 000 to make them “really bad”, but then TeX sees it equally bad to cut the page short when there is no vertical stretch (i.e. \parskip=0pt), and ...
4
votes
2answers
118 views

Change display style in xlop package

I recently discovered the package xlop to typeset automatically elementary school calculations. Using this for division for example like this, gives the output below. \documentclass{article} ...
5
votes
1answer
77 views

Doubts about hbox behavior

Why when I write a hbox at the beginning of a paragraph, TeX puts the next word in the next line, but when the paragraph starts with a 'normal' letter TeX puts all together in a line? i.e. : ...
2
votes
2answers
127 views

Kind of spurious space

I'm trying to write a \spaced macro: it takes a string as parameter, decompose that string and then recompose it spreading avery token from the others according to a given \spreadratio. Here are the ...
10
votes
2answers
135 views

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 ...
2
votes
1answer
521 views

How to convert “plain TeX” to LaTeX

I want to convert to LaTeX from plain TeX. I try use Emacs, but I can't. The document is this.
1
vote
1answer
159 views

How to write a parameter-driven macro?

An specific question is as follows: I hope that I can define a macro that can switch to different typefaces. We assume that this macro is named \myfonts, so, if I type {\myfonts throughout his ...
10
votes
1answer
143 views

How to get the natural width of the last box in a paragraph?

I want to get the natural width of the last line in a paragraph. For example, the last line of the following paragraph Georg Friedrich Bernhard Riemann (September 17, 1826 – July 20, 1866) was an ...
4
votes
1answer
179 views

Getting the current page in plain TeX

What was the control sequence to get the current page in plain TeX? I thought it was \thepage, and this works in LaTeX, but it returns a undefined-control-sequence error in plain TeX.
10
votes
1answer
183 views

How to install or replace fonts in old TeX files?

I got interested in a research paper from 1991, which I cannot get an electronic online version of. The author was kind enough to send me his tex sources, but is himself unable to produce a pdf file ...
8
votes
1answer
202 views

Why I can't use \footnote inside \vbox or \hbox in horizontal mode?

The definition of \footnote is as follows in plain TeX % all from the Appendix B of The TeXbook \newinsert\footins \def\footnote#1{\let\@sf=\empty % parameter #2 (the text) is read later ...
10
votes
2answers
272 views

How to put signature number in footer (derived from page number)?

To make my book easier to bind I'd like to automatically put the signature number with small type in the footer of the first page of each octavo signature (except the first one which is given since it ...
8
votes
2answers
130 views

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 ...
6
votes
2answers
208 views

In plain tex, how to use Small Caps in equations?

In LaTeX, we can write $T_{\textsc{max}}$ In plain TeX, we can do thing like \font\scshape=cmcsc10 {\scashape max}. But this method does not work inside $$. We cannot write ...
11
votes
2answers
715 views

How to use OpenType fonts with plain-LuaTeX?

Is it possible to have OpenType fonts with LuaTeX using the plain format? I have tried: \font\test="texgyrepagellaregular"\test test\bye but I get ! Font \test=texgyrepagellaregular not loadable: ...
13
votes
1answer
196 views

Is it possible to `split a hbox`?

When creating two columns or balancing it, we may use \vsplit to achieve this, but can we split a \hbox in TeX? Compared with \vsplit, an example may be like this: \setbox0=\hbox to 6in{ ... } ...
2
votes
2answers
300 views

Align boxes and rotate boxes in plain TeX

When I finish reading the Appendix D: Dirty Tricks in the TeXbook, I rethink a question: is it possible to align some character boxes like this: The input may be like this: ...
4
votes
5answers
7k views

Real numbers symbol in XeTeX

How can I get the 'real number' sign (something like \mathbb{R} with the amssymb package in LaTeX) in XeTeX?
4
votes
2answers
250 views

ConTeXt doesn't implement some Knuth TeX primitives?

I try to use new TeX format ConTeXt, but I find that some TeX primitives don't act any more. How sad I am when I find that. An simple example is that in plain TeX, we can set the spaces between ...
1
vote
1answer
184 views

Compiling a Plain-TeX file that loads harvmac on TexWorks on windows

I had asked this question and it was suggested that I use plain TeX. On TeXworks among the compiling options there is no such thing. When I try running the file through pdfTeX I get the message, ...
2
votes
1answer
213 views

TeXmaker for plain TeX

Sorry if this has already been asked, but, if there is something similar like this TeXmaker for plain TeX?
2
votes
2answers
255 views

Why use plain TeX exclusively and eschew LaTeX2e entirely, nowadays? [duplicate]

I was surprised to learn that some users, as show in this post, stil insist on working exclusively in plain Tex, as opposed to LaTeX. I most certainly understand the benefits of occasionally ...
5
votes
1answer
188 views

How to create a page with two columns that can span pages to achieve my special goal?

I am a Chinese plain TeX user and also a beginner. Now I encounter a hard question, that is I must write some numbered English paragraphs at the left column and its corresponding Chinese ...
7
votes
3answers
170 views

\csname error in defining in loop

In following snippet I try to use TeX programming to define commands \Ab, \Bb, \Cb and so on. Strangely, I get Missing \endcsname inserted error. What is my mistake? I hadn't read TeXBook, so it is a ...
14
votes
1answer
336 views

Is there a LaTeX3 approach to \ignorespaces?

The following code works as I would like it to: Given the state of the boolean, certain content is to be printed or not. If it's not printed, then I run the risk of creating extraneous whitespace. ...
13
votes
2answers
393 views

What is “plain TeX”?

I occasionally see a statement that plain TeX is not the same as TeX, because plain TeX is already a format. What is plain TeX, and what is the difference to TeX proper? Some answers are here (The ...
15
votes
3answers
2k views

\string command behavior - Plain TeX

I would like to learn Plain TeX and I'm reading Knuth's "The TeXBook". At Chapter 7, Knuth talks about the \string command and how it converts control sequences into lists of characters tokens. Why ...
6
votes
1answer
257 views

Multiple vertical rules along text – by using \leaders?

I want to draw individual vertical rules on the left side of consecutive paragraphs/vertical boxes covering the vertical skips. In my case for every paragraph/vertical box, there can be different ...
10
votes
2answers
441 views

TeX equivalent for LaTeX's \boxed

Does anyone have any suggestions for recreating the \boxed{...} function from LaTeX in plain TeX? I'm pretty sure it's part of the amsmath package for LaTeX (not actually sure because I include ...
2
votes
0answers
240 views

Debugging OpenType Feature / Substitution Problems with XeTeX [closed]

I have been sent an updated set of fonts from a professionally developed OTF typeface which I am trying to use with plain XeTeX. When using them with XeTeX, I could not get the OpenType features to ...
17
votes
3answers
1k views

Starting with TeX (not LaTeX)

I've been using LaTeX for 3 years and I'm decided to switch to (plain) TeX. For the moment I'm reading The TeXbook for the third time (I quietly start to read the double-danger signed paragraphs) and ...
9
votes
3answers
364 views

How do I get the \cancel (strikeout) in Plain TeX?

I've searched both online and in the TexBook, but can not find a command or package. Note, I am pretty new to TeX / LaTeX, but am currently trying to figure out how to do things in Plain TeX. Edit: ...
11
votes
2answers
379 views

Is there any software that converts latex file to tex file?

I was asked to convert a file from LaTeX format to TeX format, so it could be compiled by TeX. I use LaTeX a lot, but I'm quite unfamiliar with TeX. And the file is pretty long. So I was wondering if ...
0
votes
1answer
129 views

Combining \obeyspaces and \read

It seems to be impossible to combine \obeyspaces and \read in the following manner: \newread\myread \openin\myread=myfile.txt \obeyspaces % Deleting this line removes the error \read\myread to ...