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

learn more… | top users | synonyms

6
votes
3answers
411 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
741 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
621 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
184 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 % ...
8
votes
1answer
744 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 ...
11
votes
2answers
742 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 ...
4
votes
1answer
186 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
373 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
194 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
498 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
124 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
345 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
189 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
1k views

Conversion pt to mm or cm

Is there any way how to convert pt to mm or cm in plain TeX?
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 ...
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
205 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
137 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 ...
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 ...
6
votes
2answers
180 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
276 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
258 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 ...
5
votes
1answer
845 views

Producing arXiv-submittable documents with figures using plain TeX

I am proficient with TeX but have never used LaTeX and would prefer not to learn it - though perhaps that preference is the sole source of my difficulties. I am trying to figure out how to produce ...
3
votes
1answer
278 views

Create my own NSD

I'm trying to create a set of macro-s for plain [Xe]TeX to be able to create Nassi-Shneidermann Diagrams that produces a table (\halign). (I would note the cases slant lines differently in a way, that ...
16
votes
1answer
282 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 ...
4
votes
1answer
1k views

How do I change font in pgfplots with plain XeTeX?

I have tried: \font\figfn="Myriad Pro:mapping=tex-text" at 8pt \input tikz \tikzset{font=\figfn} \input pgfplots \pgfplotsset{ width=\hsize, compat=1.3, every axis label={font=\figfn}, tick ...
4
votes
3answers
507 views

Verbatim in plain-format with XeTeX

(I'm aware there has been a similar question before, but this one has a twist) I wanted a verbatim macro to use which would use an unlikely character as an end-of-verbatim -marker (unlikely as in it ...
5
votes
1answer
530 views

pitchfork in plain TeX

I was asked the following question: How do I get get \pitchfork in plain TeX? He tried \input mssymb and \input amssymb but neither works. More generally, is it possible to get ams symbols to ...
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 ...
8
votes
1answer
358 views

Execute token after \halign

I like to create a macro which processes a following brace group as "argument" using \halign. After it has been processed a token (a macro) should be executed. With an \hbox I can use ...
2
votes
2answers
306 views

pst-text with plain XeTeX

How, if possible, can I use pst-text with plain XeTeX? I have TeX Live 2011. When I try to run the minimal example: \input pst-text \pscharpath{TeXnik} \bye , I get a bunch of ** WARNING's, ...
7
votes
2answers
978 views

Using hyph-utf8 with plain TeX

I want to use the UTF-8 hyphenation patterns (for Croatian) with plain TeX (pdftex). I've read the documentation on the hyph-utf8 package but I haven't found it very useful. There's mention of a ...
0
votes
2answers
1k views

How to define font size in plain TeX such that it works as font size defined in article?

% gettingstarted.tex \hoffset=-72.27pt \voffset=-72.27pt \hsize=72.27pt \vsize=72.27pt \special{papersize=\the\hsize,\the\vsize} \parindent=0pt \nopagenumbers \input pstricks ...
1
vote
4answers
720 views

How to get started with plain TeX

I am using TeX Live 2010 on Windows 7. I have no experience to compile a plain TeX input file. Is my input file below correct? % gettingstarted.tex \input pstricks \topmargin=-72.27pt ...
4
votes
2answers
264 views

How to obtain PlainTeX in LaTeX environment?

In The TeXbook it is written that \char13 is <return> and \char32 is space. But when I use this symbols I receive fl ligature for \char13 and something like hyphen for \char32. What do I do ...
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, ...
2
votes
1answer
657 views

Plain TeX: running header with section name

I want to create a TeX document with sections and a running header containing the name of the current section. I know I can use \mark{} to mark the section headings and then use \topmark or \firstmark ...
3
votes
1answer
545 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?
6
votes
3answers
221 views

How to define a macro containing a tabbed line (\+…\cr)?

\def\test{\+test\cr} \test \vfill \eject The above gives error: ... Runaway definition? -> ! Forbidden control sequence found while scanning definition of \test. ...
2
votes
1answer
397 views

Scope of catcode change for escape character ?

In the following macro, I change the category code for the escape character (\) to "other" (12): \def\xxA{\begingroup \catcode`\\ = 12 \gdef\xxB ##1z{\tt ##1\endgroup} \xxB} How the heck does ...
5
votes
3answers
825 views

Non-vertically-centered TikZ matrix of nodes cell content

How can you make the matrix cell contents aligned to the top? I am using plain format with XeTeX. \input tikz \usetikzlibrary{matrix} $$\hbox{I'd like for the cells to be top-aligned}\cases{ ...
4
votes
2answers
574 views

IPA characters in plain TeX

Is there a way to type IPA characters in TeX? There is the tipa package for LaTeX, but what about plain TeX? I don't have any experience with installing fonts in TeX and can't find any good resource ...
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 ...
9
votes
3answers
472 views

BibTeX with Plain TeX

The manpage of bibtex says that it can be used with both LaTeX and TeX. However, I did not find any resource how to do it and also no TeX book of mine explains it. Can someone provide a minimalistic ...
2
votes
0answers
379 views

PicTeX files inside a Plain TeX file [closed]

I am using Plain TeX to write my (scientific) texts which usually include many awful equations and graphs (or figures) I am constructing with unsurpassed PicTeX. My big problem is that with my MikTeX ...
2
votes
1answer
538 views

Nassi–Shneiderman diagram with plain TeX

First I was trying to quickly put together a file/package that provides macros for building Nassi-Shneidermann diagrams, but after a while it gave me a head ache – literally. So I decided to seek out ...
5
votes
1answer
284 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 ...