Plain TeX is Knuth's original default format for TeX documents.
9
votes
1answer
136 views
Is there a “smoking gun” to distinguish between ConTeXt and plain TeX
I'm writing a tool to streamline some typesetting jobs, and I am having trouble distinguishing between plain Tex and ConTeXt.
LaTeX is straightforward to recognise by the \documentclass command (or ...
4
votes
2answers
30 views
plain tex: break \line and \vbox through pages
I'm trying to break the following command
%\hsize=380 true pt
\line{%
1
\hfil\vtop{\hsize 365 truept{%
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ...
11
votes
2answers
235 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
1answer
42 views
amstex: operator definition error
I can't understand why the following code give me an error
\input amstex.tex
$\mathop{\rm arctg}(x)$
\bye
Thus, the input does not work with my macros that include the use of \rm, \mathop, etc., ...
1
vote
0answers
29 views
headlines are not shown with tikz input (plain TeX) [duplicate]
I'm usign plain TeX with custom headlines. If I load Tikz packages with
\input tikz
then headlines are blank. The following are my headlines (some commands don't belong to plain TeX, but I think ...
16
votes
3answers
200 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 ...
7
votes
2answers
139 views
Embedding a flv (or mp4) video using pdfTeX (plain TeX only)
I am attempting to find out how to embed a flv video in a pdf file created using plain TeX and pdfTeX. I was successful at manually (via Adobe Acrobat's menu: Tools->Multimedia->Video Tool) embedding ...
34
votes
2answers
567 views
Electronic version of Knuth's “TeXbook”?
I have a printed copy of the TeXbook (from D.E. Knuth) at home. Now that I travel a lot, I don't want to take my library with me every time. Question:
Is there a legal way to obtain (=purchase) a PDF ...
12
votes
3answers
354 views
How to compile the source code of TeX
I am more and more interested in the system TeX (and LaTeX) and I want to study it more deeply. I am not telling that I want to learn how to use it, but I want to understand its mechanism now.
The ...
7
votes
4answers
146 views
Special macro definition
How can you define a macro \cmd in TeX primitives using two optional arguments (and a mandatory one) that fulfills the property that calling \cmd[opt]{mand} is equivalent to \cmd[][opt]{mand}. Yet, i ...
3
votes
2answers
65 views
How to put some comment-like text in a formula?
I have the following formula:
$$\bot \dashv\vdash \bot \land A /* not derivable */$$
But the phrase /* not derivable */ doesn't show correctly. For example
there is space between / and *, but no ...
12
votes
1answer
98 views
When does TeX execute the \catcode=`\… assignment?
TeX always scans the input and converts it into some tokens, then expands some tokens according to the latest definition of that command ... stomach -> lists -> page
but when does TeX execute the ...
6
votes
1answer
101 views
How to not have widows and orphans without using raggedbottom
I know I can set \clubpenalty and \widowpenalty to 10 000 to make them “really bad”, but then TeX sees it equally bad to cut the page short when there is no vertical stretch (i.e. \parskip=0pt), and ...
4
votes
2answers
61 views
Change display style in xlop package
I recently discovered the package xlop to typeset automatically elementary school calculations. Using this for division for example like this, gives the output below.
\documentclass{article}
...
5
votes
1answer
56 views
Doubts about hbox behavior
Why when I write a hbox at the beginning of a paragraph, TeX puts the next word in the next line, but when the paragraph starts with a 'normal' letter TeX puts all together in a line? i.e. :
...
2
votes
2answers
94 views
Kind of spurious space
I'm trying to write a \spaced macro: it takes a string as parameter, decompose that string and then recompose it spreading avery token from the others according to a given \spreadratio. Here are the ...
9
votes
2answers
64 views
Plain TeX macros contains \par as parameter delimiter, but doesn't work with \obeylines, why?
I just wanted to format a .csv file, so I do a test (1), shown as below:
\global\let\xpar=\par
\def\format#1,#2,#3\par{$#1\times #2=#3$\xpar}
\begingroup
\everypar={\format}\obeylines%
11,2,22
...
3
votes
2answers
1k 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 ...
2
votes
1answer
133 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.
1
vote
1answer
70 views
How to write a parameter-driven macro?
An specific question is as follows:
I hope that I can define a macro that can switch to different typefaces. We assume that this macro is named \myfonts, so, if I type {\myfonts throughout his ...
1
vote
0answers
36 views
Is there an interface to call the Hyphenation Algorithm in plain TeX?
As the title said. Which TeX engine can do that? Knuth TeX, XeTeX, pdfTeX, or LuaTeX?
10
votes
1answer
80 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 ...
4
votes
1answer
63 views
Getting the current page in plain TeX
What was the control sequence to get the current page in plain TeX? I thought it was \thepage, and this works in LaTeX, but it returns a undefined-control-sequence error in plain TeX.
10
votes
2answers
189 views
How to put signature number in footer (derived from page number)?
To make my book easier to bind I'd like to automatically put the signature number with small type in the footer of the first page of each octavo signature (except the first one which is given since it ...
10
votes
1answer
117 views
How to install or replace fonts in old TeX files?
I got interested in a research paper from 1991, which I cannot get an electronic online version of. The author was kind enough to send me his tex sources, but is himself unable to produce a pdf file ...
7
votes
1answer
75 views
Why I can't use \footnote inside \vbox or \hbox in horizontal mode?
The definition of \footnote is as follows in plain TeX
% all from the Appendix B of The TeXbook
\newinsert\footins
\def\footnote#1{\let\@sf=\empty % parameter #2 (the text) is read later
...
8
votes
2answers
88 views
How can we decide a glue or a kern when we are writing a macro?
I don't know if I am right. Let's read the codes :)
\setbox0=\vbox{a\par
\vskip2pt
\kern2pt
b}
\showbox0
the snippet of the log file:
.\glue 2.0
.\kern 2.0
.\glue(\parskip) 0.0 plus 1.0
...
0
votes
0answers
82 views
A strange error with plain TeX and makeindex
I'm typesetting a document with XeTeX and makeindex. The commands are:
xetex adoc.tex
makeindex -s dnd.ist -o adoc.dnd adoc.ddx
makeindex -s und.ist -o adoc.und adoc.udx
makeindex -s chn.ist -o ...
5
votes
2answers
91 views
In plain tex, how to use Small Caps in equations?
In LaTeX, we can write
$T_{\textsc{max}}$
In plain TeX, we can do thing like
\font\scshape=cmcsc10
{\scashape max}.
But this method does not work inside $$. We cannot write
...
11
votes
1answer
136 views
Is it possible to `split a hbox`?
When creating two columns or balancing it, we may use \vsplit to achieve this, but can we split a \hbox in TeX?
Compared with \vsplit, an example may be like this:
\setbox0=\hbox to 6in{ ... }
...
2
votes
2answers
96 views
Align boxes and rotate boxes in plain TeX
When I finish reading the Appendix D: Dirty Tricks in the TeXbook, I rethink a question: is it possible to align some character boxes like this:
The input may be like this:
...
2
votes
5answers
277 views
Real numbers symbol in XeTeX
How can I get the 'real number' sign (something like \mathbb{R} with the amssymb package in LaTeX) in XeTeX?
1
vote
1answer
69 views
Compiling a Plain-TeX file that loads harvmac on TexWorks on windows
I had asked this question and it was suggested that I use plain TeX.
On TeXworks among the compiling options there is no such thing.
When I try running the file through pdfTeX I get the message,
...
4
votes
2answers
170 views
ConTeXt doesn't implement some Knuth TeX primitives?
I try to use new TeX format ConTeXt, but I find that some TeX primitives don't act any more. How sad I am when I find that.
An simple example is that in plain TeX, we can set the spaces between ...
2
votes
1answer
92 views
TeXmaker for plain TeX
Sorry if this has already been asked, but, if there is something similar like this TeXmaker for plain TeX?
2
votes
2answers
192 views
Why use plain TeX exclusively and eschew LaTeX2e entirely, nowadays? [duplicate]
I was surprised to learn that some users, as show in this post, stil insist on working exclusively in plain Tex, as opposed to LaTeX.
I most certainly understand the benefits of occasionally ...
5
votes
2answers
123 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 ...
6
votes
3answers
90 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 ...
5
votes
1answer
124 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
...
13
votes
1answer
160 views
Is there a LaTeX3 approach to \ignorespaces?
The following code works as I would like it to: Given the state of the boolean, certain content is to be printed or not. If it's not printed, then I run the risk of creating extraneous whitespace. ...
13
votes
2answers
255 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 ...
15
votes
3answers
397 views
\string command behavior - Plain TeX
I would like to learn Plain TeX and I'm reading Knuth's "The TeXBook". At Chapter 7, Knuth talks about the \string command and how it converts control sequences into lists of characters tokens.
Why ...
6
votes
1answer
120 views
Multiple vertical rules along text – by using \leaders?
I want to draw individual vertical rules on the left side of consecutive paragraphs/vertical boxes covering the vertical skips. In my case for every paragraph/vertical box, there can be different ...
10
votes
2answers
199 views
TeX equivalent for LaTeX's \boxed
Does anyone have any suggestions for recreating the \boxed{...} function from LaTeX in plain TeX? I'm pretty sure it's part of the amsmath package for LaTeX (not actually sure because I include ...
3
votes
0answers
107 views
Debugging OpenType Feature / Substitution Problems with XeTeX
I have been sent an updated set of fonts from a professionally developed OTF typeface which I am trying to use with plain XeTeX.
When using them with XeTeX, I could not get the OpenType features to ...
8
votes
3answers
159 views
How do I get the \cancel (strikeout) in Plain TeX?
I've searched both online and in the TexBook, but can not find a command or package.
Note, I am pretty new to TeX / LaTeX, but am currently trying to figure out how to do things in Plain TeX.
Edit: ...
11
votes
2answers
323 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 ...
0
votes
1answer
79 views
Combining \obeyspaces and \read
It seems to be impossible to combine \obeyspaces and \read in the following manner:
\newread\myread
\openin\myread=myfile.txt
\obeyspaces % Deleting this line removes the error
\read\myread to ...
6
votes
2answers
98 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}
...
4
votes
1answer
129 views
Bad rendering of OrnementsADF
With the code (typeset with XeTeX)
\font\orn="Ornements ADF" at 12pt
\centerline{\orn\char70\quad\char57\quad\char102}
\centerline{\orn\char102\quad\char57\quad\char70}
...



