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

learn more… | top users | synonyms

3
votes
2answers
302 views

Vertical line from top margin of page to current positon

I'm struggling with this really simple (vanilla plainTeX) trick, which I'm not able to crack... How does one draw a vertical (i.e. perpendicular to the horizon) line that leads from the top (or top ...
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 ...
5
votes
1answer
156 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 ...
5
votes
2answers
152 views

Name and background information on this space glyph

Given the following plain TeX snippet and it's output: hallo werld {\catcode`\ =12 hallo wereld} {\tt hallo wereld} {\tt\catcode`\ =12 hallo wereld} The command \catcode`\ =12 changes the ...
18
votes
2answers
425 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 ...
10
votes
3answers
1k views

The character ə in Plain TeX?

I'm part of a writing group and we are using Plain TeX (well, pdfTeX). Currently I need to write the symbol ə ("schwa"?), but I have no clue how to do this.
6
votes
3answers
265 views

What's the difference between format and macro language?

From a comment by morbusg depends on what you mean by "plain tex": if you mean "plain tex – the macro language", then yes, LaTeX does provide an interface. If you mean "plain tex – the ...
10
votes
2answers
2k 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 ...
13
votes
2answers
679 views

The revenge of the vboxes

Yes, they're back. With a vengeance. Those pesky little buggers we call \vboxes which I've fought against previously. (And Bruno, too.) \parskip=0pt \def\unquo{\unvbox0\smallskip} ...
15
votes
1answer
576 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, ...
5
votes
1answer
276 views

Outputting a spread at a time

I think I remember Stephan Lehmke writing here somewhere in a comment about outputting a spread at a time instead of page. That got me thinking; does that mean something like: \output={\shipout\vbox ...
9
votes
1answer
698 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 ...
2
votes
1answer
284 views

Plain TeX font cyrillic

I am using XeTeX and love it very much. When I use helatex, I have no problems at all. But I want to try do it «True Way»: plainTex. XeTeX takes all annoyance with unicode from me, but sample like ...
4
votes
1answer
483 views

Asana Math calligraphic capital R with XeTeX

I am having problems getting a calligraphic ‘R’ with Asana Math. This is my minimal: \font\asanacal="Asana Math:script=math;mapping=script;+salt" \font\asanascr="Asana ...
3
votes
2answers
425 views

How can I suppress the header for the first page in a chapter

I'm trying to implement a macro that begins a chapter. I don't want to use latex or fancyhdr but only plain tex (for pedagogical reasons). The code is the following ...
8
votes
1answer
503 views

What are the avaliable font sizes in texlive?

I'm using texlive 2010, and I'm trying to design the layout for a document in plain tex (because I need the document and also I want to learn tex). The input is the following \font\fifteenrm=cmr15 ...
12
votes
1answer
762 views

From LaTeX with pdflatex to plain TeX

I've always wanted to try plain TeX instead of LaTeX. I can use plain but I'm not able to use correctly the fonts and I'm not able to use the french hyphenation. I would to know how to do this with ...
3
votes
1answer
466 views

Learning TeX via the TeXbook

As I most often am not able even to ask the right question, much lesser to understand answers, I have decided to read thoroughly Knuth's TeXbook. But on Appendix B--Control Sequences--I find ...
2
votes
1answer
129 views

How do I adjust the margins just at the beginning of certain sections?

I'm using plain TeX and I'm writing a document that will have multiple sections. Each sections starts a new page (i.e. it's immediately preceded by an \eject). How can I adjust the top margin just on ...
1
vote
1answer
290 views

Unexpected conditional branch with \ifdim

I have a problem with the following code: \newtoks\sectoks \sectoks={\noindent} \newtoks\subsubjectstyle \subsubjectstyle={\emitsectglue 1\the\sectoks} \newtoks\postsectoks ...
38
votes
1answer
5k 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?
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{% ...
7
votes
2answers
422 views

Syntax Highlighting for Plain TeX

I would like to find out what options there are for applying syntax highlighting to Plain TeX, to turn Plain TeX documents into highlighted HTML. The aim is to facilitate sharing tracked changes to ...
4
votes
1answer
279 views

how can I break the rows of an halign nicely across pages?

I'm trying to print large tables for my own consumption (I'm using Plain TeX and eplain). They are tables of publications and I just want to be able to look at them. Each table will have a variable ...
2
votes
1answer
137 views

gensym for TeX?

In other macro systems (notably Lisp's), one often needs to store results into "temporary" variables which shouldn't clash with any variables in the environment where the macro is called. In Lisp, the ...
6
votes
3answers
417 views

Retrieve the current font, scale it, and change the font to that version

I'm using Plain TeX (and eplain, if that matters). I would like to be able to generically scale the current font, no matter how the current font has been set. For example, I want to write a macro ...
10
votes
2answers
818 views

Can TeX/LaTeX draw lines at precise positions?

I need to draw lines at specific distances (in mm). For example: ---- line 0 ---- line 1 at 35.64 mm below line 0 ---- line 2 at 33.64 mm below line 1 The macro I'm using is as follows (I don't ...
9
votes
2answers
676 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 ...
5
votes
1answer
245 views

PGF align plain TeX

I don't get the excepted result with the following code \input tikz \tikzpicture \node[draw,align=center] {Hello \hfil\break World}; \endtikzpicture \bye There is no break after Hello. I don't ...
2
votes
1answer
186 views

Why does tikz change the behavior of \vfil on my first page?

Note the way this renders when using pdftex. \input eplain \beginpackages \usepackage{url} \usepackage{color} \endpackages % comment in the following 4 lines % \input tikz % \enablehyperlinks % ...
9
votes
1answer
815 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
3answers
1k views

Why does TeX not like \usepackage?

My prof writes papers with harvmac, which is apparently incompatible with LaTeX. Fine, I switch to tex. Now TeX gives me Undefined control sequence when I type \usepackage{amsmath}. There's gotta ...
12
votes
2answers
810 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 ...
5
votes
1answer
210 views

TeX4ht and Plain TeX

According to tug.org TeX4ht can be used with Plain TeX. I've tried the commands listed in the site above, but nothing works! All I can have is a simple text file, with .html extension, but without any ...
5
votes
1answer
388 views

Loading fonts in LuaTeX (plain TeX)

I am trying to understand how fonts work with (plain) LuaTeX. I use the standard ConTeXt suite, and I made a luatex-plain format using the file luatex-plain.tex from the distribution: luatex --ini ...
2
votes
1answer
204 views

Can I write a macro for placing a vertical, breakable rule along arbitrary paragraphs without an output routine?

I answered a question last week about creating a continuous but breakable rule next to an arbitrary number of paragraphs in Plain TeX. My solution gathered the paragraphs to rule in a vbox; my output ...
6
votes
3answers
557 views

Controlling text overflow when using \hfill to left- and right-align parts of title

I’m creating a template in plain (Xe)TeX which must have, in the first line, a location and reference number. The location is left-aligned and the reference number is right-aligned. (See example 1, ...
9
votes
1answer
125 views

Why does the list of recent contributions contain exactly two boxes?

In the transcript of \nonstopmode \tenrm \vsize=2cm \output={\shipout\vbox{ \showlists \unvbox255 }} \hbox{blah} \hbox{blah} \hbox{blah} \hbox{blah} \hbox{blah} \hbox{blah} \hbox{blah} ...
5
votes
1answer
117 views

Read manuscript in to output

I want to put my source plain TeX file in the output of the same plain TeX file. As I remember coming through a macro, that can put a file's content in to the output, but only \input comes to mind. ...
3
votes
1answer
365 views

Loading a math font with stylistic set in plain XeTeX

How does one activate a stylistic set in plain XeTeX? I have tried: \font\test="XITS Math:+ss01" % for calligraphic \textfont2=\test $ \fam2 A $ \bye but with no luck.
4
votes
2answers
197 views

How can I get interline spacing to ignore a vbox? [duplicate]

Possible Duplicate: Make an invisible vbox I want to insert a \vbox between paragraphs, but I do not want it to affect interline spacing. I'm using Plain TeX. Here is my MWE: \input plain ...
14
votes
4answers
2k views

Conversion pt to mm or cm

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

Plain TeX vs. LaTeX Macros

I was wondering what's the (advantage) of doing something one way over the other in different systems. For instance, I read that users of plain TEX should use \def whenever they want to create a new ...
6
votes
2answers
210 views

Toggling Phantom In Macros (plain TeX)

I am using plain TeX / pdfTeX. Is there a way to build a set of macros, say \showOn / \showOff, such that I can nest them for a given piece of text, it "looks up the parse tree", find the first ...
4
votes
1answer
140 views

What's special about \def\\ vs. \def\mksp?

In the following definitions, \\ captures a space token but \mksp does not. \documentclass{article} \begin{document} {\def\\{\global\let\sp= } \\ } {\def\mksp{\global\let\spx= } \mksp } \show\sp ...
22
votes
2answers
2k 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 ...
6
votes
2answers
182 views

Executing TeX commands s.t. (1) produces empty boxes (2) and no other output

EDIT: I need plain TeX, not LaTeX. Furthermore, I don't want to use an existing package -- I want to reinvent the wheel. [This is part of a complicated set of TeX macros I have set up; and I need to ...
8
votes
4answers
289 views

Subscript sizing of text in math formulas

I am using Plain TeX, not LaTeX. Right now, I have \def\text#1{\hbox{#1}} This works for things like $$A + \text{foo bar}$$. However, not for things like: $$\Sum_{ \text{foo} = a}$$. How do ...
16
votes
1answer
272 views

Why are \new… defined as \outer in the plain TeX format?

In plain.tex, D.E.Knuth decided to define as \outer all the macros which allocate registers: \newcount, \newdimen, \newskip, \newread, \newwrite. This forbids them from entering the argument of ...