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

learn more… | top users | synonyms

7
votes
3answers
185 views

How to scale/resize a box in plain TeX?

How can I resize (anamorphically) the contents of a box in plain TeX, that is, give it new width, height and depth? \setbox0=\hbox{Hello!} \copy0 % output at orig. size % % code which resizes box 0 ...
5
votes
1answer
132 views

Reversing the effect of \nopagenumbers in plain TeX

I'm happy with Plain TeX's page-numbering format, except that I want to turn it off for the first few pages of my book. I can do this with the \nopagenumbers macro, but is there a macro with the ...
10
votes
2answers
140 views

How to rigidly chop long lines in plain TeX

I am using plain TeX and want to typeset an appendix that contains several hundred URLs. When a URL goes past the right margin, I would like TeX to stop printing (i.e. not carry into the margin, not ...
8
votes
1answer
243 views

Math symbols in plain TeX

I would be much obliged if you cold tell me how can I make an arc over a letter (or a group of letters) in TeX. The command in LaTeX is \stackrel{\frown}{AB} but in TeX it proves to be useless. ...
9
votes
2answers
122 views

How to use \pdfcolorstack?

Consider this code: \chardef\Color=\pdfcolorstackinit page direct{0 g} \pdfcolorstack \Color push {1 0 0 rg 1 0 0 RG} red \pdfcolorstack \Color pop {} black \hrule height 1pt width 50pt \bye I try ...
5
votes
1answer
105 views

Break between words when line becomes too full

This example: \font\standard="Arial Unicode MS" at 10pt \standard \newlanguage\nohyphens \language=\nohyphens \hsize = 150mm \parindent = 0pt \vbox{ \setbox2=\hbox{\hskip12pt‣\hskip3dd} ...
7
votes
1answer
237 views

What is the purpose of \crcr in an \halign preamble?

I know that the point of \crcr is to be a kind of "backup \cr" in \halign/\valign, in that it only adds a \cr if it wouldn't result in two in a row. Nonetheless it seems to find its way into the ...
7
votes
1answer
67 views

I need an hrule, but not when at the top of the page

I have a multi-page document that has many small sections split with \hrule lines. Occasionally a section will end immediately before a page break, and so the next section will begin right at the top ...
13
votes
1answer
387 views

How can I achieve having logical page numbers shown in acrobat reader?

I am using (plain) TeX (not LaTeX or any other ...TeX). I want a pdf file made from my TeX-source/output that is able to have acrobat reader shown logical page numbers. My document’s preface page ...
41
votes
7answers
3k views

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 ...
4
votes
1answer
76 views

Penalty inserted by output routine

I am using plain TeX (actually plain e-TeX) processed by a relatively recent version of MiKTeX (pdfTeX). Consider the following fragment of code that can be processed with plain TeX: \noindent A\par ...
6
votes
0answers
58 views

Why importing pgfplots changes behavior of \vfill? [duplicate]

When I import pgfplots, it affects behavior of \vfill. The following code works as expected: This should be at the top of the page. \vfill This should be at the bottom of the page. \eject \end ...
45
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
559 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
218 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
111 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
319 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 ...
14
votes
3answers
602 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
431 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
168 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
86 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
111 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
43 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
81 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
743 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
111 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
391 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
93 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 ...
14
votes
1answer
410 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
126 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
78 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
130 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 ...
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
540 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
161 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
144 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
181 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
276 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
189 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
210 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
131 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
214 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
198 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
315 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: ...
6
votes
5answers
8k 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
189 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, ...