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

learn more… | top users | synonyms

20
votes
2answers
1k views

The mysteries of \mathpalette

I would like to make a macro, \vfrac, which output would look like: $$\displaylines{ \displaystyle\raise.25ex\hbox{$\displaystyle1$}\!/\!\lower.5ex\hbox{$\displaystyle2$} \cr ...
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 ...
19
votes
3answers
1k views

How to make continuous (but breakable) vertical rule along left side of paragraph?

I'm looking for a way in Plain TeX to make a continuous vertical rule along the left side of a paragraph (or arbitrary block of text), such that it observes normal page-break rules. I started with the ...
36
votes
1answer
4k views

\setbox vs. \sbox and \savebox - What are the differences I need to know about?

What's the difference between using TeX's \setbox and LaTeX's \sbox and \savebox?
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 ...
9
votes
2answers
1k views

Inserting an image in plain TeX

I used the OzTeX implementation of TeX, also I used to typeset my docs in plain TeX, not LaTeX for me, so I had no problem to insert an image using the OzTeX, now I'm back to TeX docs, am using the ...
14
votes
4answers
1k views

Conversion pt to mm or cm

Is there any way how to convert pt to mm or cm in plain TeX?
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 ...
4
votes
1answer
3k views

Make an invisible vbox

I'm placing a PDF meta information in a \vbox in a plain XeTeX document, and I would like it to behave as if there were no box at all (so any additional \vskip after the \vbox will appear). Right now, ...
11
votes
2answers
742 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
2answers
859 views

Create my own mapping for XeTeX fonts

I'm trying to create mapping files, to make use of Cambria Math italic calligraphic and double stroke letters in Plain XeTeX. However, I'm unable to do so. This is what I tried to create for the ...
11
votes
7answers
2k views

Can I see a plain TeX source file please?

all the LaTeX-tutorials tell me how LaTeX is an extention simplifying the building of TeX documents. Understandably, no one uses plain TeX anymore, right? But I seem to learn better when I grasp the ...
11
votes
2answers
760 views

Background baseline grid with output routine

I am trying to get a baseline grid in the background of every page. I am using the plain format with XeTeX. This is what I have tried: \baselineskip=13pt \topskip=0pt \parskip=0pt \newbox\gridbox ...
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 ...
7
votes
4answers
327 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 ...
5
votes
1answer
864 views

Is it a bad practice to declare variables locally inside macros or environments?

For me, declaring variables globally will clutter the project. Especially when there are many variables to be declared. In addition, declaring variables locally will save our time because we don't ...
11
votes
2answers
264 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, ...
9
votes
2answers
641 views

overstruck \diamond and plus in plain TeX?

I need a character in plain TeX that combines a plus with a quadrilateral whose corners are the four endpoints of the plus. Is there a way to create such a thing? I apologize for editing the ...
8
votes
1answer
760 views

Can \usepackage{color} and \input tikz work together in Plain TeX/eplain?

I use Plain TeX and Eplain. In my document I'm using both the color and url packages inside the \beginpackages..\endpackages block. Just now I tried adding \input tikz.tex (as the TikZ manual states) ...
5
votes
1answer
157 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 ...
5
votes
1answer
286 views

Sectioning macros with Plain

Plain is awesome up until you'd want to make some structure for your document(s), because getting the sectioning macros right seems to be painfully difficult. Plain comes with a single sectioning ...
4
votes
2answers
695 views

How to get hanging hyphenation?

I am using XeTeX from TeXLive-2010-Basic in OSX with plain-format. My try was to follow the TeXbooks setup for commas et such (which I already have working nicely): \defaulthyphenchar=`‐% it is ...
3
votes
1answer
560 views

Convert from LaTeX to Plain TeX

Is there a way to convert a LaTeX document, which uses a lot of packages and macros, into Plain TeX, such that all macros are expanded and all dependencies on external packages are gone?
2
votes
3answers
118 views

Left margin wider than right one

Why is the left margin wider than the right one? Each of them should be 1 inch wide: If you run TEX without modifying the plain TEX format, you get pages that are numbered at the bottom; and each ...
0
votes
0answers
276 views

Why do some people still use TeX instead of LaTeX? [duplicate]

Possible Duplicate: Reasons to use plain TeX Is it still worth it to learn TeX? I'm utterly curious to know why some people still use TeX instead of full featured LaTeX?
15
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. ...
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 ...
5
votes
2answers
410 views

Wrapping \obeylines with \halign into a macro

In the TeXbook, Knuth gives an example: Are you tired of typing \cr? You can get plain TEX to insert an automatic \cr at the end of each input line in the following way: \begingroup \let\par=\cr ...
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: ...
13
votes
4answers
2k views

Hard whitespace

I am using plainTeX and would like to typeset some (python) code examples. Switching to \tt gets me partway there, but I (obviously) need the whitespace respected. Is there a trick for doing this? The ...
11
votes
1answer
271 views

No indent in the first paragraph in a section in Plain TeX

I have checked no indent in the first paragraph in a section? but I think my question warrants a new thread, because my question is about Plain TeX. I am using Plain TeX. I would like to write a ...
5
votes
2answers
84 views

Implicit \hfil at the end of each paragraph?

Why do Alpha \hfil\ Omega\par and Alpha \hfil\ Omega not flush "Omega" to the right?
2
votes
2answers
166 views

Extracting content of .tex files

Is there any GUI fast way for extracting content of .tex files? (Stripping all tags and meta-data) Among TeX editors which one support export content to plain .txt file? (I found some command-line ...
25
votes
4answers
2k views

Is it actually illegal to TeX `texbook.tex`? [closed]

At the top of texbook.tex, it is written: % This manual is copyright (C) 1984 by the American Mathematical Society. % All rights are reserved! % The file is distributed only for people to see its ...
17
votes
2answers
395 views

plain TeX theory, \afterassignment

Is there a real difference between \newcount\acounter \def\dosomething{\afterassignment\dosomesecret\acounter=} \def\dosomesecret{I do something with \the\acounter} and \newcount\acounter ...
16
votes
1answer
289 views

What does `\ ` exactly do?

In the The Not So Short Introduction to LATEX2e - Version 5.01, April 06, 2011 it is suggested that: A backslash in front of a space generates a space that will not be enlarged. (page 39) It ...
15
votes
1answer
409 views

A center environment for plain TeX

In TeX, one can center a single line of text with \centerline. How would one implement a center justification environment for a single long line of text in plain TeX without the addition of any ...
15
votes
1answer
546 views

Transition from LaTeX to Plain TeX

For several reasons I need to typeset in Plain TeX, however I have always worked with LaTeX. So how hard will this be? I basically need something like the book or report documentclass (with toc, ...
11
votes
2answers
385 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 ...
7
votes
3answers
174 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 ...
6
votes
2answers
134 views

Delimited arguments and using a macro inside of itself

I wanted to play with delimiter sizing without using the \delimiterfactor, -shortfall, etc. and made the following: \newdimen\bigdim \bigdim = 1.9743ex \newdimen\Bigdim \Bigdim = 2.671ex ...
5
votes
2answers
276 views

%& magic line has no effect

I am using the %&format magic line in a plain TeX file. On older versions of TeX the result produces the expected results. On TeXLive 2009 (under Gentoo), however, this line has no effect. When I ...
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.
13
votes
1answer
128 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 ...
13
votes
2answers
404 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 ...
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 ...
9
votes
1answer
639 views

Is there a counterpart/antidote for \obeylines?

The \obeylines command tells TeX to preserve line endings, which is useful for poetry and various other things. I can limit the effect of \obeylines by wrapping it in a scope, like so: {\obeylines ...
7
votes
2answers
120 views

Match number sign inside plain TeX loop

In order to strip comments from code I would like to input from a file into TeX, I am using the following loop \documentclass{article} \def\getfirst#1#2\relax{#1} \begin{document} ...
6
votes
1answer
3k views

“Missing \cr inserted”, but it looks to me like it's already there!

I'm trying to create a Plain TeX macro for typesetting two-column proofs with automatic step-numbering and step cross-referencing; currently, the "best" I have is: \newcount\stepno \def\twocols#1{% ...
5
votes
1answer
191 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 ...