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

learn more… | top users | synonyms

2
votes
1answer
80 views

Sublime Text 2 for Plain TeX?

I'm currently working on a project that requires plain TeX, not LaTeX. Is it possible to configure Sublime Text 2 to compile plain TeX?
7
votes
4answers
425 views

Vertically aligned table in plainTeX / LaTeX / Context etc

My last answer about vertically aligned table inspired me to write my first question at this site. How to create the following table in various TeX approaches: plainTeX, LaTeX, Context, eplain, OPmac ...
4
votes
2answers
132 views

Define a special verbatim commmand

To learn more about Plain TeX, I try to define a special verbatim command \verb{code}, which puts code inside braces. When there is no braces in code, It's easy. But when there are some balanced ...
4
votes
2answers
300 views

Is there a both bold and slanted Computer Modern typeface?

Note: the font has to be loaded in plain TeX with \font\bs=<nome_font>
8
votes
5answers
262 views

Vertical alignment of text within a table cell

How can I move the text in the following table closer to the upper rule (or closer to the lower rule) without changing row height: {\halign {#\cr \hrulefill\cr \font\f=cmr8\f(bla bla bla)\cr ...
3
votes
1answer
76 views

Is there any horizontal skip after which the space character `\ ` is removed automatically?

Let's consider the following TeX macro: \def\theorem#1{Theorem (#1).\enspace} Try to use it: \theorem{Dirac} A simple graph with $n$ vertices\dots Then TeX produces two spaces after "Theorem ...
3
votes
4answers
220 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
243 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
182 views

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

I need something like the following ...
4
votes
1answer
162 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
237 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
114 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, ...
6
votes
1answer
206 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
285 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
62 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
112 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
79 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
65 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
175 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
66 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?
19
votes
3answers
372 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
83 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
173 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
77 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
63 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
87 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
64 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
298 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
221 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
137 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
105 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. ...
9
votes
2answers
278 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
77 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
234 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
120 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
105 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
355 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
124 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
136 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
368 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
287 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
84 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
81 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
151 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
133 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
152 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
159 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
152 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
248 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 ...