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

learn more… | top users | synonyms

3
votes
1answer
40 views

Function and usage of \font command

I have seen the use of the \font. For example \font\Cal=cmsy10 at 25pt I can't find any information about this command. Could anyone tell me what's the function of it, how works and how use it?
5
votes
2answers
72 views

Hyphenation tables not working

Consider scratch.tex: \language0 \hyphenation{ab-cdef} \newlanguage\newlang \newlang \hyphenation{abc-def} \language0 \showhyphens{abcdef} \newlang \showhyphens{abcdef} Why in both cases ...
3
votes
2answers
67 views

Define command to act like \ifvar

I'm trying to manipulate multiple boolean variables which are simply named one, two, three, etc. and since I'm using them with a counter, I have defined some commands to take a numerical input and ...
10
votes
4answers
158 views

How can I check whether two control sequences have the same name?

I'd like to test whether two custom control sequences have the same name, regardless of what they expand to or whether they're actually defined. For instance, \ifsamecsname\Foo\Foo should be ...
4
votes
1answer
24 views

Question about pdftexmagfix.tex

My setup: TL2014 I understand what pdftexmagfix.tex is for, I only don't understand how it works: If we change \begingroup \catcode`P=12 \catcode`T=12 \lowercase{% \endgroup ...
6
votes
2answers
108 views

Why to store a number via chardef?

For example, in plain.tex and in hyrules.tex (package hyplain) we find such code: \chardef\active=13 \catcode`\~=\active \chardef\myh@us@catcode=\the\catcode`\_ ... \catcode`\_=\myh@us@catcode ...
0
votes
0answers
44 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
69 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
306 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
117 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
130 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
86 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
114 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
31 views

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

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
45 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
197 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 ...
4
votes
1answer
71 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
335 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
243 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
66 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
98 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
154 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
90 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
60 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
197 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
217 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
84 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
72 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
174 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
57 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
186 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
86 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
99 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
80 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
430 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
469 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
77 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
76 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
117 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
468 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
285 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
77 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
142 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
80 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
69 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
76 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
129 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
294 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 ...