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

learn more… | top users | synonyms

3
votes
4answers
198 views

Table-like layout in plain TeX

Below image shows part of a document prepared with a word processor. Gray lines mark table borders and are only visible in edit mode (they will not be visible when document is printed but have been ...
2
votes
2answers
232 views

Can I have a list of all fonts available in plain TeX?

I need a list such as: cmr, cmss, cmsl, cmtt, ... Where can I find it? (Do the available fonts depend on the TeX installation or are the same everywhere?)
3
votes
2answers
181 views

How to print a row of points (or any other character) in plain TeX?

I need something like the following ...
4
votes
1answer
159 views

Non-latin characters with plain TeX

What would it take to output non-latin letters (e.g. cyrillic letters) to a document using just plain TeX (i.e. without using "third-party" macro packages such as LaTeX)?
7
votes
2answers
233 views

Breakable fill-in blanks

What is a good way to create blank space (preferably, underlined -- it is to be filled in by hand when document is printed) that takes up all the remaining space on a line. The blank space may appear ...
3
votes
1answer
103 views

Changing Math Fonts with luaotfload in Plain TeX

Changing Math Fonts with luaotfload in Plain LuaTeX Without a major exposition on all the options tried, here is the short of it: Using Tex Live 2013, LuaTeX, plain.fmt and luaotfload.sty, ...
5
votes
1answer
196 views

Learning Plain TeX via ConTeXt's LuaTeX-plain Format

Succinctly as I can: Want to learn Plain TeX (but with modern conveniences such as UTF-8, mplib, TiKz, etc.) Have much respect for the ConTeXt group of people. Liked the idea, when I stumbled upon ...
8
votes
5answers
280 views

Typesetting URL/URI/IRI in plain TeX

I would like to be able to allow line breaking on /'s, ?, and &'s. I understand I should change the \catcode's of those letters, but I don't want them to be global, but instead restricted to ...
3
votes
1answer
61 views

Vector arrow running into brackets

This looks really horrible when I typeset it in Plain TeX: $$[\vec r]$$ \bye The vector arrow bleeds into the bracket on the right, it's not pretty at all. Is there a standard fix for this sort of ...
4
votes
1answer
107 views

How to include a programming language source code file in a plain TeX document?

I have some Java and C source codes and I want to include them in my .tex document. I can't simply copy and paste them into my document: In fact, doing this way, the code won't appear with the right ...
2
votes
2answers
76 views

Simulating directly typed text with \input

I currently have the following code written in Plain TeX: \loadtoks\END int main(void) { printf("Hello World! %!@#$%&*&^\n"); } \END {\tt\the\toks0} \bye The macro \loadtoks is ...
8
votes
1answer
64 views

Testing for macros by name

I'm curious to know how I would go about testing for macros by name. I need to do something that would be the logical equivalent of the following: \def\doit#1{% \if#1==\foo I got a foo\fi \if#1==\bar ...
10
votes
2answers
169 views

Why is \newcount declared \outer?

I'm a user primarily of Plain TeX. Lately I get annoyed about the \outer nature of \newcount, especially when I write macros which require temporary internal variables, variables which really need not ...
6
votes
1answer
65 views

Is it possible to know the actual length of a rubber length

The MWE is A \hskip 0pt plus 2pt \foo B \end Then macro \foo will tell me the actual length of the previous \hskip in the log file. Is it possible to write such macro \foo? How?
18
votes
3answers
343 views

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

Difference between measures of \vskip in plain TeX and LaTeX

I have recently heard the argument that "plain TeX is superior to LaTeX because TeX gets the measures right". The example given was that a \vskip 2 cm, when run in tex, would measure exactly 2 cm from ...
8
votes
1answer
166 views

Problems understanding definition of \newif

Reading http://profs.sci.univr.it/~gregorio/introtex.pdf, I have come across the definition of \newif on page 75: \def\newif#1{\@ifdefinable{#1}{\@newif#1}} \def\@newif#1{\count@\escapechar ...
4
votes
1answer
72 views

How to type argmin over a variable in plain TeX

I am forced to use plain TeX instead of LaTeX and I don't know what is the proper way to type argmin with some variable under it. I know $$ \min_b. $$ And I would like to do someething similar, ...
1
vote
0answers
62 views

How can I make TeX find tikz's files without moving all of them?

I'm trying to recreate my file system on a cloud server so I can SSH into it from my new tablet. So I have def.tex, my main list of custom macros, which accesses tikz.tex: \input ...
1
vote
2answers
86 views

amsmath, vec and if not working together

I am trying to define some macros in which I need an "if" which test contains an argument of the macro. The issue arises when this argument is \vec{<arg>} and the amsmath package is loaded. Here ...
4
votes
1answer
57 views

Using \multispan in plain tex to give a caption to an array

I am trying to modify some code that WeBWorK uses to generate pdf hard copies of students' online math assignments. My aim is to improve WeBWorK's accessibility. My task at the moment is to endow ...
11
votes
2answers
284 views

How to make the character è “work” in PlainTeX?

I'm using TeX with the plain format. On my keyboard there is the 'è' character (as well as é, ò, à, ù, ì). I'd like to make it work so that, when put è in the input file, TeX transforms it into \`e, ...
5
votes
3answers
213 views

Greek capital letters with Latin Modern and TeX

Copying the plain TeX format, my formatting file contains the lines \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text" \textfont0=\tenrm \def\rm{\fam0 \tenrm} to load a unicode font. However, ...
13
votes
1answer
135 views

How can we detect that we are right after display math mode? (for vertical spacing)

I need a "\smartmedskip" feature/macro in plain TeX which is in usual identical to \medskip, however, if we are right after display math mode, then it should be just "disabled", i.e. it should then ...
1
vote
0answers
100 views

Reference of Latex/Plain Tex control sequences [closed]

I'm looking for a reference of the control sequences defined in Latex and plain Tex similar to this one for the build-in primitives. The Texbook states that there are about 600 macros in plain Tex. ...
8
votes
2answers
266 views

How can I use times fonts in Plain TeX?

I'd like to use Times fonts in Plain TeX. What would be the Plain-TeX equivalent of the LaTeX command \renewcommand{\rmdefault}{ptm}?
1
vote
0answers
74 views

Is there a version of pdfTex that does not ignore non-pdf special commands?

To make hyperlinks to theorems in plaintex one can use commands that are available in a file called Hyperbasics. When running pdftex instead of tex on the file, Miktex ignores some of the special ...
8
votes
2answers
226 views

Matrix column spacing

I am using a matrix in Plain TeX, and the spacing between columns is too large. Since I'm also changing the paper size, the matrix runs off the side of the page. A minimal example is \input eplain ...
2
votes
2answers
119 views

Cite a range of references

I have a very long list of citations in my TeX file. Rather than each bibliographic key appearing in the list, I would like a range of values, e.g. given \cite{ref1,ref2,ref3,ref4} I get [1,2,3,4] ...
7
votes
1answer
101 views

Formatting Eplain Table of Contents Entry

I need to define a macro for formatting an entry in a list of tables: \def\toctableentry#1#2#3{...} where the first argument is the table caption, the second is the table number, and the third is ...
6
votes
3answers
315 views

Creating my own \tableofcontents in plain TeX

I'd like to define my own table of contents in TeX (not LaTeX, so without packages) to have a fine control on what goes there, how the numbers are displayed, etc. Basically what I would like is to ...
1
vote
1answer
114 views

Harvmac, Amstex

I am writing a file with Plain TeX using the harvmac macro. I have always used LaTeX until now. Two related questions about harvmac Vs. mathematical fonts: I tried adding \input amstex to get the ...
13
votes
1answer
132 views

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 ...
18
votes
1answer
365 views

How to check if a variable contains a word in plain TeX?

I have a variable that contains a long list of keywords, e.g.: \keywords{computers, business, biology, fine art, literature, zoology} I need to make an if-then statement that checks for the ...
5
votes
1answer
273 views

Changing page margins in {pdf-,Xe-}TeX

In TeX, changing the \hsize and the \vsize changes the main text size and the page size of the dvi output. When I compile a document with pdftex or xetex, the page size remains at A4. How can I change ...
2
votes
1answer
82 views

Left aligning a displayed equation in plain TeX

This one seems to be a rather simple question but right now I just run out of ideas. I simply want to left align a displayed equation using plain TeX, that is, I want the equation to start from the ...
6
votes
1answer
78 views

Getting the page breaks right for a \beginsection macro

I've found this code in the question No indent in the first paragraph in a section in Plain TeX \def\mysection#1{% \goodbreak \vskip2\baselineskip \noindent #1\par \nobreak ...
9
votes
1answer
147 views

Multilevel bullets

I want to write something that I could use for multilevel bullets, for example: I. Title Subtitle a. sub-subtitle ... In LaTex I got \def\startitems { \begingroup \parindent\z@ ...
7
votes
2answers
127 views

Append a token list to \everymath

I've mimicked Donald Knuth by setting | as a verbatim delimiter. To give it its normal meaning in math mode, I've set \everymath{\catcode`\|=12} \everydisplay{\catcode`\|=12} However I'd like to ...
7
votes
1answer
150 views

TeX question: how to switch between languages?

I am using TeX, with the macro package AmS-TeX. I'd like to use it with the Italian language, so that words are hyphenated the right way (e.g. the Italian word 'distante' should be broken as ...
3
votes
1answer
49 views

help about macro \uparrowfill

Is there in plain TeX a macro similar to \leftarrowfill but vertically oriented, something like \uparrowfill? I know it exists in LaTeX, but I'm interested only in plain TeX.
4
votes
1answer
154 views

Plain TeX macro to read a document in Pig Latin

Say I have a file eng.tex: \def\encounter (#1){Hello, #1!} \encounter (World) \bye I convert it to Pig Latin and save it as pig.tex: \efday\encounterway (#1){Ellohay, #1!} \encounterway (Orldway) ...
11
votes
1answer
151 views

XeTeXpicfile in vertical mode

Given a minimal like \line{% \vtop{\hsize=.6\hsize Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor lectus sit amet laoreet convallis. Quisque at est lacinia, porttitor ...
6
votes
2answers
227 views

\hrule with indents in Plain TeX

I am trying to learn the 'metal' of TeX after 20 years of using higher level packages, such as LaTeX. In my test document I have an indented block representing simple recipes. I've created this with ...
5
votes
1answer
123 views

Plain TeX: missing symbol

I've tried to compile (both pdfTeX and XeTeX) simple code: ☺ \bye But in result I have a plain page, without anything. What's wrong?
10
votes
1answer
117 views

TeX doesn't recognize built-in control sequences?

I'm trying to learn to build things from the ground-up with TeX (not LaTeX---I've used LaTeX before, so I know how easy a solution "\usepackage{amsthm}+\begin{theorem}" is) and I'm trying to build my ...
6
votes
4answers
154 views

How to write a TeX macro that accepts a number or a \count register as argument?

What's the most simple way, in plain TeX, to define a \macro that can be used as: \macro{10} \macro{\mycount} such that I can then assign the number to a \count and manipulate it? Note: ...
5
votes
1answer
156 views

Using \show in nonstopmode causes TeXmaker to raise false alarms. Any fix?

I'm currently reading the TeXbook, and I use \show a lot to see how Knuth defined plain-TeX macros in terms of TeX primitives. For instance, to have access to the definition of \centerline, I would ...
5
votes
1answer
170 views

Separating a decimal in any format into integer and fractional parts in basic LaTeX

Note: I've separated this question from what was becoming a very tangled discussion. I know egreg already has a solution, so I'll just wait until he posts it here. Question: The solution has to take ...
9
votes
2answers
215 views

Still having difficulty with use of `\expandafter`

Firstly, my apologies for any previous confusion, I've separated out various questions onto distinct pages. This problem came up in the context of trying to split a decimal number. Good solutions to ...