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

learn more… | top users | synonyms

0
votes
0answers
10 views

Setting headlines with widths which differ from the width of the body text

Using (plain) TeX, I'm trying to set the headline to a different width from that of the body of the text (i.e. hang page numbers to the outside of the text, as seen in the TeX Book).
0
votes
0answers
17 views

Short footnotes on same line or centered in plain TeX

Is there in plain TeX a way to print two short footnotes on the same line (spaced as if in columns) or a single footnote centered?
2
votes
2answers
84 views

How to align vertically by right border?

Consider this example: \hsize.1in \noindent \parfillskip=0pt \leftskip=0pt plus 1fil \hfuzz=2em hello world \bye The result is: The expected result is: Why the example does not produce the ...
8
votes
0answers
79 views

Question about exercise 23.3 in TeXbook

This is exercise 23.3: Explain how to change the output routine of plain TeX so that it will produce twice as many pages. The material that would ordinarily go on pages 1, 2, 3, etc., should go ...
3
votes
1answer
61 views

How much space is occupied by footline?

This is said in TeXbook about page dimensions: Plain TEX sets \vsize=8.9in (not 9in, since \vsize doesn't include the space for page numbers at the bottom of each page)... According to ...
6
votes
1answer
67 views

Weird error after \showthe

I'm trying to understand the meaning of \p@ from plain.tex: \newdimen\p@ \p@=1pt % this saves macro space and time While trying to figure it out, I stumbled upon strange behavior. Consider this: ...
5
votes
1answer
62 views

How is a page produced in the output routine?

Compare this \nonstopmode \tracingonline=1 \showboxdepth=\maxdimen \showboxbreadth=\maxdimen \output={\shipout\vbox{ \unvbox255 \showlists }} \nopagenumbers \noindent A \bye and this ...
5
votes
1answer
70 views

How to draw borders around page contents

During learning, while conducting different experiments, it's useful to see actual page borders. So I wrote the code which does this and would like to know whether it is the proper way to accomplish ...
15
votes
1answer
210 views

What is the equivalent of \usepackage[T1]{fontenc} in plain TeX?

I have inherited a semi-small TeX project in which I, after syncing across various computers and OS'es, had some problems with encodings of special characters like åäö. My initial approach for fixing ...
4
votes
1answer
35 views

Description list in plain TeX with optional break after tag

I'd like to have a desription list in plain TeX where there is only a line break after the item tag if the tag width exceeds a certain value. Lets say the indentation of the tags is zero and the ...
4
votes
0answers
47 views

Editing ligature table

It is suggested in TeXbook (p. 46) that in adapting TeX to type Norwegian, You can arrange the font metric file so that TeX will interpret ae, o/, aa, AE, O/, and AA as ligatures that produce ...
3
votes
1answer
74 views

Plain TeX: Wrong \folio for heading at top of page

I have the following chapter macro (uses code from Heiko Oberdiek): \def\ChaptTocEntry#1#2{% \line{\hbox to1em{\hfil\bf#1}\hskip1em#2\leaderfill\folio}} \def\ChaptWr#1{{% \let\folio\relax ...
5
votes
1answer
65 views

two column footnotes, Plain TeX

I’m trying to get footnotes set in two columns in Plain TeX. This is my minimum working example: %!TEX TS-program = pdftex \output{\ifvoid\footins\else\vskip\skip\footins\rigidbalance\footins 2 7pt ...
5
votes
2answers
53 views

How to expand a register value in a \write argument (plain TeX)?

I am using \write to output table of contents information. While the correct heading counter information apears in the headings itself, the TOC headings have the number of the last heading of a page. ...
0
votes
0answers
31 views

Is there an equivalent to roff's .ns (no-space mode) in plain TeX?

Is there something like roff's .ns in plain TeX (or something even better)? E.g. a command which says that the directly following vskips are ignored or (additional) a special "vskip" which makes all ...
0
votes
1answer
46 views

Plain TeX pdf2ps page numbering offset for front matter in PDF viewer [duplicate]

The good: When I use plain TeX, and then run dvips to get the Postscript output, I see negative page numbers for the front matter in the thumbnail pages on the left in evince and gv (ghostview), ...
3
votes
2answers
85 views

Does the concatenation of two text files, which compile under tex, always compile under tex?

In other words, does the set of all text files that compile under tex form a monoid under concatenation? I have recently dabbled a bit in plain tex and my algebraic spider senses were immediately ...
4
votes
1answer
36 views

Prevent \topinsert on chapter page (Plain TeX)

How to define chapter to prevent insertion of floating figures and tables (\topinsert) on chapter page. I would like to place an object at the top of the next page. \def\chap#1{\vfil\break \vglue1cm ...
8
votes
1answer
78 views

supporting both \"u and ü

I maintain musixtex extension package musixtmr.tex that enables times text fonts. I thought I could enable accented glyphs like ü by using ptmr8r instead of ptmr7t. But this has the effect of ...
4
votes
1answer
69 views

How to use txfont in plain TeX

I'm trying to insert one font from txfont package in my plain TeX file, but I cannot understand some aspects of this font distribution. The font I would use is the txmi1; so, how can TeX use this ...
1
vote
1answer
49 views

babel/plain.def : ! Illegal parameter number in definition of \@yargdef

I tried to generate plain TeX cyrillic format files using makefmts.sh script from cyrplain package, here is the content of this script: #!/bin/sh tex -ini -fmt=cyrtex -progname=tex cyrtex.ini tex ...
6
votes
1answer
65 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
2answers
98 views

Setting font in OPmac or other Plain macros

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
35 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
88 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
115 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
100 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
144 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
90 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
40 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
126 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 ...
6
votes
1answer
69 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
158 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
120 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
119 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
165 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
58 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
125 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
163 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
40 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
364 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
284 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
94 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
100 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
76 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
203 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
30 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
121 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
50 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 ...