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

learn more… | top users | synonyms

0
votes
0answers
36 views

Question about example of alignment in TeXbook

TeXbook has this example in chapter 22: \settabs\+\indent&Horizontal lists\quad&\cr % sample line ... Comment to this example says: A sample line might as well end with &, because ...
7
votes
1answer
63 views

Escaping the escape character

In the TeXbook, Knuth asks: Exercise 7.2 Can you imagine why the designer of plain TeX decided not to make \\ the control sequence for reverse slashes? Is it something to do with the fact ...
9
votes
3answers
279 views

How TeX creates DVI without reading TFM file?

My setup: TeX Live, version 2014.20141024-2 (packaged with Debian 8 Jessie) Consider test.tex A \bye $ tex -ini '\input plain \dump' This is TeX, Version 3.14159265 (INITEX) ...
5
votes
2answers
106 views

Incorrect encoding in PDF outlines

I'm trying to get encoding in PDF outlines right. The problem is that the letter in the outline must be Ъ - the same as on the page - but it is Ú. dvitype shows this: xxx 'pdf: outline 1 << ...
5
votes
2answers
117 views

How can I typeset a blackboard bold number in amstex?

I'm using plain TeX with AmsTeX. I can get blackboard bold capital letters, but not numbers. For example, the command \Bbb A prints a capital blackboard bold letter A, but the command \Bbb 1 ...
11
votes
2answers
84 views

split off function for variable as separator

How/Possible to change this implementation of \xSplit so that the separator is a variable filled in at the time of definition (\edef somehow?) or at the actual use of the command?? %based on the ...
6
votes
3answers
109 views

substitution problem with plain tex

Can anyone please tell me what I did wrong?? I cann't get the second number of tests to work correctly (and the command appears to be the same argument as done manually) \magnification\magstep1 ...
1
vote
0answers
30 views

Problems inputting miniltx when TeX is configured for use of babel [on hold]

When TeX is configured to make use of babel, \input miniltx makes TeX spit out the error ! Illegal parameter number in definition of \@yargdef. <to be read again> \relax ...
4
votes
2answers
43 views

Updating glue after changing width of a box

I need to change the width of a saved box and want it to look as if it was constructed at that width. For example, this centers A in a 4cm wide box: \hbox to 4cm{\hfil A\hfil} But this centers B ...
10
votes
1answer
93 views

assign penalty to one discretionary (not all paragraph)

For a quite complex problem that would be too long to describe, I need to set different penalties for different discretionaries in the same paragraphe. It doesn't seem to be possible with pdfTeX (and ...
9
votes
1answer
191 views

\, does not work outside math mode in plain TeX

I read in several answers here that in LaTeX, \, works just like \thinspace outside math mode. However, that is not the case for plain TeX. $ printf '%s\n' 'a\,b\bye' > example.tex $ pdftex ...
3
votes
1answer
66 views

Multiplication by decimal numbers in TeX macro?

How can i multiple variable by decimal number? I have this code: \newcount\tempArgument \def\headerColor#1{ \tempArgument = #1 \multiply\tempArgument by 0.75 ...
12
votes
3answers
328 views

Explain this macro: double hash with no number, \ialign

This macro is quite old, and I don't know plain TeX very well. MWE: \documentclass{article} \setlength{\unitlength}{0.06em} \newlength{\cellsize} \setlength{\cellsize}{18\unitlength} ...
3
votes
0answers
60 views

plain TeX and paragraphed notes

The TeXbook proposes, p. 398sq, a system to obtain paragraphed note. That is, instead to obtain Footnote. Footnote. Footnote obtain : Footnote 2. Footnote 3. Footnote. In ...
7
votes
1answer
239 views

What is this file and how to compile and tranform it?

I was given some files to update. They were produced in late 1990s and seemed to be related to LaTeX. However, I could not compile them at all. To begin with, there is no \begin{} or \end{}. In ...
3
votes
0answers
62 views

Convert Plain TeX automatic table generation macros to LaTex

I have written code, given at at the end of the post, to typeset exams and quizzes in plain TeX. A typical test would be typeset using: \def\CLASS{Math 111} \def\TERM{Spring 2015} \def\TITLE{Quiz 3} ...
2
votes
1answer
92 views

Plain TeX: For every line in a marked chunk of text, put character in right margin

I'd like to wrap certain chunks of text in my Plain TeX document so that, to the right of each line in the chunk, a specific character is printed in the right margin. All of these characters should ...
3
votes
2answers
135 views

Plain Tex: Get cell in table to span multiple rows, and contents to be centered

For PlainTeX (I did find similar questions for latex): Q 1: How to ensure upper left cell is two rows tall? Q 2: How to ensure entry in upper left cell is vertically and horizontally centered? ...
4
votes
2answers
89 views

Endnotes in plain TeX

Are there macros available for creating endnotes in Plain TeX? I am sure I can write these myself but would prefer to free ride on someone else's effort.
3
votes
0answers
55 views

Distributable Tex application

I'm trying to write a very short .tex file which should read some images and text and create a report in pdf. Writing the tex is definitely not the problem. The report will contain some text, and a ...
3
votes
4answers
188 views

Conditional \end or \bye in TeX (plain-tex)

Can someone figure out a conditional \end or \bye in TeX-Code? (plain tex) I want to put in several lines into a TeX-file, each ending with \end , to be compiled before the document is complete, to ...
3
votes
2answers
209 views

Creating a Plain TeX document that's formatted like a LaTeX “report”

Hey I want a report format, how can I spcecify in Plain TeX that it is a report, like in LaTeX we have \documentclass{report} How can this be done for a Plain TeX document? And, how do I add ...
1
vote
3answers
79 views

New line and paragraph in TeX [duplicate]

I have been a writing a simple program using TeX programming like Hello, World! How are you. \bye I want the two sentences to in different lines but they come in same line. Using \\ it gives an ...
4
votes
1answer
70 views

Why is this picture moved to the left when using Minion?

This is a continuation from another question, but the original issue there is (kind of) resolved. For this question you need XeTeX, Minion Pro, which is shipped with Adobe Reader. greybox.png can be ...
7
votes
4answers
165 views

How do I add text above a long underscore in Plain Tex?

This is a follow-up to this question and the requirement for Plain TeX is still in place. I am trying to create the effect of floating a string (date) above the long underscore I create using the ...
0
votes
1answer
53 views

Image inclusion in TeX (not LaTeX) [duplicate]

I am using TeX (not LaTeX). I want to print our company logo in TeX Generated Invoice. Kindly help.
5
votes
1answer
178 views

How to align baselines of picture text and body text?

The following code wraps the body text around a picture and its accompanying text. Set this way (with the \vfills) picture and text are centered vertically in the recess. What I want to achieve is ...
5
votes
1answer
82 views

How can I change the layout of a page (plain TeX)?

I need to change both horizontal and vertical dimensions of the output pages. Is there a simple way to do it in plain TeX?
2
votes
2answers
94 views

How do I change font size in plain TeX tables featuring math (fontch producing unexpected results)

I've been having difficulty with setting the font size in plain-tex tables (i.e. haligns). I want to set the tables to use seven or (preferably) eight point font, including tables which contain math. ...
4
votes
2answers
73 views

eplain TeX footnote spacing

I've been experimenting with the features provided by eplain and for the most part, I quite like them. I'm confused about one thing though. I don't seem to be able to adjust the inter-line space in ...
11
votes
3answers
428 views

Parser for decimal numbers in (plain) TeX

I need help writing a parser for decimal numbers using only TeX and plain TeX. The set of accepted inputs is given by the regular expression: (+-)?(0-9)*(.,)?(0-9)+ The parser need not do anything ...
11
votes
3answers
452 views

How do I make a long underscore in Plain TeX?

I have looked at this question as well as here and here but I cannot figure out how to produce a long underscore in plain TeX, as in the following example. Date _____________________________ The ...
0
votes
1answer
75 views

How to open a plain TeX document in BaKoMaTeX (TeXword)

The question says it all I want to open a plain Tex equation in BaKoMaTeX (TeXWord) This is a Sample File $$ t{\rm{(}}x{\rm{,}}y{\rm{)}} = \left\{ {\matrix{ 1 \cr 0 \cr } } \right.\matrix{ {\quad ...
1
vote
1answer
73 views

Problems with plain tex and ngerman.sty

I tried to typeset a plain TeX document with the ngerman.sty macro set. Unfortunately, I get the following output for a simple test file containing nothing but \input ngerman.sty\end: This is TeX, ...
8
votes
1answer
112 views

Attaching files using plain TeX (pdfTeX)

I am currently in the process of writing a document using plain TeX and would like to be able to attach other relevant files to the resulting pdf. I have experience using the attachfile, attachfile2 ...
7
votes
4answers
437 views

Coloured text in plain tex

Recently I became intrigued by plain TeX because it gives even more flexibility than regular LaTeX. In my document I wish to use grayscales of text. In LaTeX, producing this result is achieved ...
3
votes
2answers
248 views

How to create PDF outline

According to the PDF reference (PDF document, 9.4MB), one can create an outline for the document; a visual table of contents for the viewer application which enables the user to jump to the page for ...
7
votes
1answer
73 views

Unboxing \hrule's?

How do you unbox \hrules such as in this code sample: \setbox0=\vbox{1\hrule2\hfil\break3} \unvbox0 \setbox0=\lastbox % line 3 \unskip % \baselineskip \unpenalty % \break ...
2
votes
1answer
134 views

How to typeset a vbox to a grid in plain TeX?

NOTE: update below I know this is a heavily debated subject, which is almost impossible in plain TeX, but what I want is merely a vbox with a height that's a multiple of baselineskip. Searching the ...
4
votes
2answers
79 views

Breaking up text in a column

When the contents of a column are too long to fit on a single line, how can I have TeX break up the contents across multiple lines if the column has a variable width (such as column 2 in the example ...
3
votes
1answer
68 views

Stretching a column so that table fills up specified area

Using plain TeX how can I make column 2 in the following table take up the remaining space to .5\hsize while preserving the other columns' property to have a variable width dependent on their ...
1
vote
1answer
72 views

How to automatically print line numbers for broken off lines in plain TeX

Before you read on: This question refers to plain TeX only. Thanks! I’m wondering how to add line numbers for lines broken off by TeX’s line-breaking mechanism. (My text does not contain any ...
4
votes
2answers
121 views

How do I control vertical line spacing under \settabs in plain TeX?

Consider the following example. \settabs \+ \hskip 4.5 in & \cr \+ Silahkan masuk & Come in, please! \cr \+ Silahkan duduk & Sit down, please! \cr \+ Silahkan berdiri & Stand up, ...
8
votes
2answers
288 views

Conversion of tex to latex

Quite surprisingly for me, I did not find valuable information on how to convert plain TeX files to LaTeX documents. There is a TeX.SX question, but it was answered with a particular solution. I ...
1
vote
0answers
141 views

List of TeX internal parameters? [closed]

I have come across quite a number of TeX internal parameters, like \clubpenalty, \widowpenalty, \abovedisplayshortskip and so on. Could you provide me with a complete list of them, what they are for ...
1
vote
0answers
50 views

How to get pictures from every \halign line?

I'm trying to get separate images from eqnarray lines. Problem is that I can't properly insert starting/closing image \specials for tex4ht. Lets consider a minimal example (plain tex): ...
4
votes
1answer
158 views

TeX, LaTeX and fractions

I just stumbled upon a Math SE answer which used {num \over den} for fractions. This seems perfectly equivalent to \frac{num}{den}. I'm guessing the former is TeX syntax and the latter is the LaTeX ...
7
votes
2answers
151 views

\hbox spread in plain TeX

I want to learn Plain TeX to understand the underlying mechanics of TeX and friends. I am trying to reproduce the spacing of this dedication from the Spanish music-theory treatise, El porque de la ...
15
votes
2answers
194 views

\expandafter with \uppercase ordering

As I understand it, the behavior of \expandafter is such that if \a and \b are macros, then \expandafter\a\b will first expand \b then \a. But my understanding must be wrong, because I don't ...
9
votes
3answers
390 views

Plain TeX and underscores

We have a bunch of scripts to generate invoices for our customers. It creates plain TeX files from CSV and then PDF files (using the pdftex program). This "black box" was created by one of our former ...