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

learn more… | top users | synonyms

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 ...
6
votes
1answer
503 views

Page Layout in plain tex

I'm trying to start using plain tex (in fact, the pdftex that comes with texlive2010) to write a document but I'm having some trouble with the page layout. My question is at which point is it decided ...
15
votes
1answer
215 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
107 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 ...
17
votes
2answers
316 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 ...
13
votes
3answers
593 views

Is there a printable version of a reference manual for all TeX primitives?

Everywhere in the TeX community, I see suggestions like \parskip, \obeylines, \parindent, etc. I'd be surprised not to find them even in the most basic LaTeX packages. So I figured they must be deeper ...
9
votes
2answers
411 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 ...
20
votes
4answers
2k views

Now that I can run TeX on my iPad, what shall I TeX?

I have just learnt that there is a TeX implementation now on the iPad (original source this answer to Is there a (La)TeX distribution running on iPad?). As the author of the blog post I TeX therefore ...
13
votes
2answers
161 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
103 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 ...
11
votes
3answers
2k views

Is there a good plain TeX tutorial that explains about doing automation and making layout?

I am interested in learning plain TeX especially in automation: looping, conditional branching, jumping, iterating, etc. layout: creating custom smart tables and boxes that can span cross pages. ...
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 ...
4
votes
2answers
73 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 ...
11
votes
2answers
692 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: ...
6
votes
1answer
106 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 ...
20
votes
3answers
376 views

Strange behaviour with PGF/TikZ and Plain TeX output routine

I noticed a strange behavior when running PGF/tikZ with pdfTeX on my Debian box : a simple session without tikz: pdftex **\relax *Hello World *\bye do output the page number on the page footer. On ...
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 ...
13
votes
1answer
388 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 ...
4
votes
2answers
115 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
125 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
134 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 ...
3
votes
2answers
2k views

Template for cheat sheet

I have been working with LaTeX for a couple of years but I don't know anything about pure TeX. I find this LaTeX cheat sheet useful to remember some commands. So I'd like to have a LaTeX template for ...
2
votes
1answer
503 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
157 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
140 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
172 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
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 ...
10
votes
1answer
181 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 ...
8
votes
2answers
126 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
206 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 ...
13
votes
1answer
195 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
291 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?
1
vote
1answer
182 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, ...
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 ...
2
votes
1answer
206 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
184 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
169 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 ...
5
votes
1answer
150 views

Style/macros for outlines in Plain TeX

I'm seeking a style file or other macros for creating an outline in Plain TeX, of the traditional indented style, eg. I. Big Idea A. Sub idea B. Sub idea 1. Thought ...
14
votes
1answer
330 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
389 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
437 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 ...