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

learn more… | top users | synonyms

6
votes
1answer
53 views

Adjust spacing between footnotes

I am using a macro for TeX which I have received from my coauthor but she also did not know how to adjust spacing between footnotes. Here is my macro.tex % make the pageheight a bit smaller ...
2
votes
1answer
42 views

Setting font in OPmac

The OPmac manual explains how to set the font size and discusses the style variations \bf, \it, \em etc. but I do not see a way to set the actual font in use. I'm using XeTeX and would like to access ...
2
votes
0answers
33 views

Loading system (OTF/TTF) fonts from plain TeX with LuaTeX [duplicate]

In XeTeX, I can set up a font pretty straightforwardly with: \font\foo="Minion Pro" at 10pt I don't quite see how to do it. This question suggests that the answer is "use luaotfload.sty." Is that ...
2
votes
1answer
63 views

How can branch if I'm in a halign or not?

Edit: It seems that I can use \noalign\bgroup before the \halign. That's fine. But how do I test that I'm inside the halign group? I'm able to write an own if, but it would be better to ask tex for ...
4
votes
1answer
105 views

How to replace CM fonts with ones compatible with XeTeX (in amsppt.sty)?

I would like to try to patch amsppt.sty AMSTeX style file to make it usable with XeTeX and non-Latin languages (Cyrillic). It looks like i need to replace the following CM fonts or font families with ...
7
votes
1answer
90 views

Accent i in plain TeX fails inside array loop

In Plain TeX, when I try to create an array of control sequences (\word0, \word1, etc.) and print it out using a loop, TeX stumbles over the accented-i control sequence \'{\i}. I get this error: ! ...
9
votes
1answer
136 views

Rearranging blocks (poetry) in OTR (Plain TeX)

I have a problem that I think would best be solved by an output routine. It seems like an act of moderate TeX wizardry so before I get stuck in the weeds on a wrong approach I thought I would describe ...
5
votes
1answer
82 views

How to design page layout in plain TeX using OPmac?

I'm trying to create a slideshow in TeX using Opmac. I need a page layout like that: And I try this code: \input opmac \chyph \margins/1 a5l (1,1,1,1.2)cm % page format \input ctimes ...
2
votes
1answer
31 views

Plain TeX `\footline` with rule and content

It seems pretty trivial to replace the footer with either content or a line in Plain TeX: \footline={\centerline{\folio}} % page number in footer \footline={\hrulefill} % rule in footer ...
8
votes
2answers
101 views

Plain TeX section number in margin

I want to typeset the number for the section in the margin. Here's an MWE of what I'm starting from. % --- Fonts ------------------------------------------------ \font\0="Roboto Condensed Light" at ...
5
votes
1answer
60 views

Underline omitting the descenders with Plain TeX

I'm reading this question Underline Omitting the Descenders and wondering if there is a way to do this with Plain TeX and XeTeX.
6
votes
2answers
146 views

Plain TeX: Line up some text boxes

Forgive me for asking what is probably a trivial question. I'm working through the books but always seem to be confused when I sit down at the computer. I'm using plain TeX. I have three ...
9
votes
1answer
110 views

Question about exercise 7.5 in TeXbook

Consider this extract from TeXbook: EXERCISE 7.5 Experiment with TEX to see what \string does when it is followed by an active character like ~. (Active characters behave like control ...
3
votes
2answers
92 views

PNG in Plain TeX [duplicate]

I have been presented with graphic files in the format .png. I need to include them in a Plain TeX document. How is that possible? Is there a way to convert them to .eps?
2
votes
1answer
145 views

Cyrillic letters and Russian hyphenation in Plain XeTeX

What is the simplest method to tell XeTeX (not XeLaTeX) to use a font with Cyrillic letters and to apply Russian hyphenation rules? Ideally i would like to not have to specify anything in the source ...
4
votes
2answers
53 views

How to generate table of content with OPmac macro \kuk without duplicities of pages?

I'm trying to create a slideshow in TeX using Opmac. But when I use macros \kuk and \maketoc, there are duplicities in table of content. Is any possibility to generate the line in the toc only for a ...
8
votes
2answers
89 views

Problem with \setbox

I wrote the following box, which contains my name displayed vertically: \setbox0\vbox{\hbox{M}\hbox{a}\hbox{t}\hbox{t}\hbox{e}\hbox{o}} I'd like to dysplay it twice in a line, so I wrote: ...
36
votes
1answer
2k views

Why does plain TeX have a \bye command?

In plain TeX, \bye marks the end of the TeX document. Yet why is such a command even needed? TeX should be quite able to see for itself that here, the file stops, and there is nothing more to find. I ...
3
votes
2answers
128 views

Easy method to activate cyrplain package (CyrTeX)

I would like to have a Cyrillic version of TeX/AMSTeX. I have installed the cyrplain package, but further instructions are too long and technical for me, sometimes referring to README of other ...
7
votes
1answer
37 views

What's the most plain way to define a parametrized macro within an outer macro definition

I often want to pass some arguments into a macro definition that defines an inner macro with parameters. For example \def\outmac #1,#2.{% \def\argone{#1} \def\argtwo{#2} \def\inmac ...
3
votes
3answers
340 views

Can I use (LaTeX?) packages from CTAN in plain TeX?

I have the following assumptions: TeX is a kind of language Plain TeX is the original environment for this language LaTeX (and other environments) is a set of compiled macros written using TeX ...
18
votes
2answers
268 views

How can I improve my “hands-on”/ “working” knowledge of TeX's low/middle/high/higher -level control sequences?

I am not an experienced TeX/LaTeX user. I know just about enough to write my thesis. As my interest grows, I'd like to continue improving on my TeX/LaTeX knowledge, more specifically, my "working" ...
3
votes
1answer
64 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
91 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
73 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
177 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
29 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
114 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
49 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
74 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
328 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
135 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
154 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
90 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
116 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
37 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
51 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
98 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
209 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
83 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
344 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
67 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
246 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
79 views

Convert Plain TeX automatic table generation macros to LaTex [closed]

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
117 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
176 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
100 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
63 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
211 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
238 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 ...