Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
33 views

Where is the reference point of a VBOX?

From the TeXbook, Therefore, the actual rules for the depth of a constructed vbox a somewhat TeXnical. Here they are: Given a vertical list that is being wrapped up via \vbox, the problem is to ...
user avatar
  • 2,599
2 votes
1 answer
202 views

Why double curly brackets in `\long\def\bold#1{{\bf#1}}`

I'm reading The TeXbook by Knuth. Page 205 has If you actually want a control sequence to allow arguments with \par tokens, you can define it to be a “long” macro by saying ‘\long’ just before ‘\def’. ...
user avatar
  • 449
2 votes
2 answers
95 views

Plain TeX simple horizontal alignment in table

Beginner's question: Why doesn't horizontal alignment work as I expect in this simple table? I just have a set of variables with values in the left column which I want to align under the heading "...
user avatar
1 vote
0 answers
15 views

adding footnotes to columns in plain-tex / optex

Accorging to this answer, it's possible to add footnotes to columns in optex/plain tex. Although I have a vague idea about what the author has in mind, where/how exactly do I add \penalty-10013 and \...
user avatar
0 votes
1 answer
39 views

Under what circumstances does TeX produce a series of tokens with space after a control sequence?

On page 39 of The TeXbook, Knuth said, Furthermore, spaces are not ignored after control sequences inside a token list; the ignore-space rule applies only in an input file, during the time that ...
user avatar
  • 2,599
0 votes
2 answers
62 views

How to use mlmodern fonts with Plain TeX or OpTeX?

I would like to systematically use mlmodern fonts with Plain TeX and even OpTeX, but I am unable to convert the code of mlmodern.sty into a code which could be understood by the tex or optex ...
user avatar
  • 501
3 votes
1 answer
129 views

\if compares text literal?

Knuth's tex book introduced \if<token1><token2>. I wrote the following to test it \def\tOne{abc} \def\tTwo{abc} \ifx\tOne\tTwo True \else False \fi \if\tOne{abc} True \else False \fi \...
user avatar
  • 449
0 votes
0 answers
81 views

How to align = symbol of several equations vertically?

I want to do something quite particular with PlainTeX, though I'm not one hundred percent sure it's possible. Say I have a few equations, each on a separate line, which represent the simplification of ...
user avatar
  • 1
4 votes
2 answers
80 views

How to typeset the numero sign in Plain TeX?

I want to typeset the numero sign № in Plain TeX. My first guess is to use \def\numero{$\rm N^{\underline o}$} but the line under the o is too long and I don't really want to mess up with arbitrary ...
user avatar
1 vote
1 answer
33 views

Table column spacing in Plain TeX with \settabs

In Plain TeX I need to reduce the space between 2 columns in a 2 column table. How to do this? I am simply using \settabs 2 \columns, but one column is at the left of the page, but the second is on ...
user avatar
4 votes
2 answers
220 views

How to define a math bold font in Plain TeX?

Consider the following code: \font\rm=ecrm1000\rm \font\bf=ecbx1000 R{\bf R} $R{\bf R}$ \bye The result I get is RR RR. However I was expecting RR RR Why the second R in the math formula not ...
user avatar
-4 votes
3 answers
119 views

Left \mapsto arrow

I am looking for a way to make a command for left version of \mapsto arrow with (AMS)TeX . This is what I tried to do: \mathchardef\mapstochar="322F \def\leftmapsto{\leftarrow\mapstochar} \def\...
user avatar
  • 215
4 votes
1 answer
96 views

Is this way of defining \section in Plain TeX correct?

I am relatively new to Plain TEX and I wanted to define a \section command to typeset a bold and centered text with some spacing around it. Here is what I came up with. \def\section#1{\bigbreak\...
user avatar
0 votes
0 answers
48 views

Why doesn't \hfil work to right align?

I don't understand why {\bf Title}\hfil A.\ Uthor \bye and {\bf Title}\hfill A.\ Uthor \bye do not give the same result. Only \hfill works to right align text but there is not other infinity, I ...
user avatar
1 vote
1 answer
61 views

Upper-case programmatic data with expl3 in TeX Live 2019

I use the following expl3 code to upper-case the first character of a programmatic string. The code is from the body of a control sequence definition and is not supposed to be fully expandable. \...
user avatar
  • 1,017
0 votes
1 answer
53 views

Breaking lines of TikZ pictures

Doing a lot of pictures sequentially with TikZ, I would like a break line behavior, resulting in more uniform lines. But I couldn't. \input{tikz} \def\maxangle{30} \pgfmathsetseed{7} \foreach \...
user avatar
0 votes
0 answers
49 views

How to use plain XeTeX for emoji and words of non-English alphabet?

I am trying to create documents with emojis and words of non-English alphabet (Farsi, Chinese, Korean etc), but I heard that plain TeX does not support this, but plain XeTeX does offer support. ...
user avatar
  • 339
0 votes
1 answer
61 views

Plain TeX input Tikz package not found

I ran \input tikz.tex \bye and the Tikz package is not found This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_2) (preloaded format=pdftex) restricted \write18 ...
user avatar
  • 339
3 votes
1 answer
62 views

Why do log files show only the first letter of a word?

If I create hello.tex thus: \tracingcommands 1 Hello world then hello.log contains This is TeX, [etc] **hello.tex (./hello.tex {vertical mode: the letter H} {horizontal mode: the letter H} {blank ...
user avatar
3 votes
2 answers
89 views

Bad positioning of slanted (italic) math accents

The math accents are usually taken from textfonts (only \vec from the math italic font). I would like to have an italic accent over an italic letter also in math mode. To present the problem quickly I ...
user avatar
1 vote
1 answer
52 views

Question about TeXBook Exercise 8.6

In exercise 8.6 the characters ^^A, ^^B, ^^C, ^^M are defined to belong to categories 0, 7, 10, and 11 respectively. The question ist what tokens are produced from the input line ‘^^B^^BM^^A^^B^^C^^M^^...
user avatar
  • 47
0 votes
1 answer
47 views

How to AMSTeX in TeXMaker

I am trying to TeX the following on texmaker in linux, however I'm running into errors, mainly for the first line. However I have pictex already downloaded. I used the default Quick Build in texmaker. ...
user avatar
2 votes
2 answers
77 views

Line numbers for Optex

I tried to run this answer (using edmac) with optex but it failed. I know that Optex has the \ttline macro, but still couldn't find out how to number text lines. I started creating a simple macro that ...
user avatar
3 votes
1 answer
70 views

Modify footnote properties in optex

How do I modify the behavior of the footnote line and text with optex? I'd like to change the width and height of the rule, and the footnotes to hang thus: ¹ Text text text text text text text ...
user avatar
3 votes
1 answer
119 views

macros from plain TeX fail to work in xelatex

I find some macros from plain TeX fail to work in XeLaTeX. The following MWE for example. Why? \documentclass[a4paper]{article} \usepackage{geometry} \geometry{showframe} \geometry{left=1cm,right=1cm,...
user avatar
  • 2,189
0 votes
1 answer
38 views

Change rules for spacing in formulas

The following note is given in Donald Knuth 's TeXbook (page 170): How can I change these rules? More specifically, I am interested in changing the Punct line from (1) (1) * (1) ... to 1 1 * 1 .... ...
user avatar
3 votes
2 answers
90 views

Detect end of \input-file (not \read-file) in Knuthian TeX?

In Knuthian-TeX I'd like to have a macro which switches to verbatim-category-code-régime and then calls another macro which processes characters from the current input-file one by one until reaching ...
user avatar
5 votes
3 answers
165 views

Testing "sequentiality" of \expandafter (plain Tex) - weird results

Trying to have a better understanding/controlling over \expandafter, I wrote this code. \count100 = 0 \count101 = 1 \def\c{% \the \count100 \advance \count100 by \count101\relax}% % \everypar{\...
user avatar
1 vote
1 answer
48 views

What is causing punctuation to appear around my matrices?

I have an input file called mathchar.tex, which I rely on pretty heavily: \mathchardef\Gamma="7400 \mathchardef\Delta="7401 \mathchardef\Theta="7402 \mathchardef\Lambda="7403 \...
user avatar
  • 257
3 votes
1 answer
129 views

why is latex's ltluatex.sty required for plain luaotfload?

I tried (successfully) to compile a sober Plain LuaTeX format and discovered, with some surprise, that loading the standard luaotfloader in Plain requires a piece of code, ltluatex.tex which requires ...
user avatar
  • 3,983
2 votes
1 answer
156 views

How to create a time line in plain TeX or ConTeXt?

I need to create a time line like this: <----*----*----*--------*----> 1991 1992 1993 1995 It will sometimes skip numbers, e.g. it could go from 1993 to 1995 without having a mark at ...
user avatar
  • 12.4k
0 votes
3 answers
57 views

How to place an optional break with second line flushed to right?

I wrote a table of the \advance operator. If the line is too long, I want a break, and the second line flushed to right. I tried to get inspiration from the macro \signed presented in the TeXbook, ...
user avatar
  • 113
3 votes
6 answers
152 views

How are conditionals expanded in TeX?

I am typesetting a collection of mathematical problems, solutions and notes to them in Plain TeX. The simplified document is: \def\problem{Problem. } \def\solution{Solution. } \def\note{Note. } \...
user avatar
  • 33
8 votes
2 answers
111 views

How does \expandafter interact with } and \toks?

I know \expandafter can skip the token immediately after it, therefore I try to use it with some combinations of } , \toks and definitions with \def and \let. The main question the puzzles me is why ...
user avatar
8 votes
3 answers
549 views

When to use \nolimits when defining a math operator?

In plain TeX, \cos is defined as \mathop {\rm cos}\nolimits but \gcd as \mathop {\rm gcd}. In what case to use \nolimits when defining a math operator to be typeset in roman?
user avatar
4 votes
2 answers
266 views

How can I use a roman font for capital letters in math mode when using plain TeX?

The French style (see the frenchstyle option of the LaTeX kpfonts package) is to typeset capital letters in math mode in roman rather than in italic. How can I achieve that in plain TeX without having ...
user avatar
1 vote
1 answer
101 views

LuaTeX compiling

May someone can explain me how to compile the LuaTeX source files available here : http://michel.quercia.free.fr/cours-MP.tgz together with the macro's files http://michel.quercia.free.fr/montchapet....
user avatar
  • 516
2 votes
2 answers
101 views

How to define a \bigplus operator in plain TeX?

How to define a big plus operator that behaves exactly like bigsum but uses the plus symbol instead of a capital sigma? I know that the best option (or at least the way Don would do it) is probably to ...
user avatar
1 vote
1 answer
79 views

How to write Arabic in plain luatex

I tried to write Arabic in plain Luatex but all letters in isolted mode \input luaotfload.sty \font\amiri={file:amiri-regular.ttf:mode=harf;script=arabic} at 12pt \pagedir TRT \bodydir TRT \textdir ...
user avatar
5 votes
1 answer
140 views

How can I use the AMS Euler font in plain TeX?

I want to use the AMS Euler font designed by Zapf in my document. I looked for packages on CTAN (e.g., the euler package), but they are specifically designed for LaTeX. I took a look at the gkpmac.tex ...
user avatar
3 votes
1 answer
96 views

What is the difference between using `\edef` with `\noexpand` and simply `\def`?

In this question: Automatically adding space before punctuation in old-style English texts, the accepted answer uses the following definition \edef!{\unskip\noexpand\,\string!} What is the difference ...
user avatar
7 votes
1 answer
218 views

Does $$...$$ produces wrong spacing in plain TeX?

In the ConTeXt FAQ, one can read Does $$...$$ work for display math, like in (La)TeX? No; the spacing above and below the equation will be wrong, and maybe other aspects too. Moreover in LaTeX, a ...
user avatar
2 votes
3 answers
189 views

Macro working over a whole word (plain TeX)

I have spend a good time searching in references and forums for a answer to the question I'm raising here. I would like to write a macro that gets a word as a parameter without needing to using braces ...
user avatar
3 votes
1 answer
197 views

How to use the OldStandard fonts with plain TeX?

The CTAN fonts/oldstandard repository contains files for the OldStandard (OS) fonts but are intended to be used with LaTeX. How could I define \tenrm, \tenbf, \tenit and same with other font sizes for ...
user avatar
4 votes
2 answers
181 views

Are Donald Knuth's music sheets written in TeX? [closed]

Donald Knuth composed a work for pipe organ “Fantasia Apocalyptica” He has published the sheets on his website but I was wondering if they were typesetted using TEX or some other software (lilypond or ...
user avatar
3 votes
3 answers
537 views

How to typeset French quotation marks in plain TeX?

How to typeset French quotation marks in plain TeX? <<~This is the {\LaTeX} way.~>> I might need to use European Computer Modern (or Latin Modern?) but I'm not sure how to do so.
user avatar
3 votes
1 answer
187 views

\let and \def differentiation in D. Knuth's commentary (plain TeX)

In the The TeX Book, in apendix B, I read \def\obeyspaces{\catcode`\ =\active} {\obeyspaces\global\let =\space} {% \catcode`\^^M=\active % these lines must end with ‘%’ \gdef\obeylines{\catcode`\^^M=\...
user avatar
0 votes
0 answers
45 views

Before LaTeX editors were invented, how did plain TeX authors output their code? [duplicate]

"Output" doesn't just mean PDF files. It could also mean PostScript or plain paper (made from trees). This might seem like a goofy question, but I couldn't find the answer with a search ...
user avatar
10 votes
1 answer
475 views

What tools/advice/methods should I utlize to practice "The TeXbook by Donald Knuth"?

The short question is: How do I progress with this book? What tools should I download? A step by step explanation would be deeply appreciated .. The experience I had: Am a computer science student and ...
user avatar
  • 101
0 votes
1 answer
81 views

Plain LuaTeX unicode letters with PiTeX

I'm trying to isolate fonts.ptxlua from pitex to access Open/True-Type fonts with the YaX interface. I can load the font correctly; however, as I tried to typeset some proofs, I found that now LuaTeX ...
user avatar
  • 3,983

1
2 3 4 5
16