Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
4 votes
1 answer
179 views

Defining a vskip that possibly becomes vfill

I hope this is not a duplicate; I tried to search around and didn't find anything, but perhaps I used the wrong keywords. I'm using Plain TeX and have the following defined: \newskip\hugeskipamount \...
5 votes
2 answers
143 views

Section title inside the indentation of a par in plain TeX

I am trying to reproduce in plain TeX the following section style (that is placing text inside the indent of a paragraph): Here is what I have done so far: \font\rm=ecrm10 \font\bf=ecbx10 \rm \llap{\...
5 votes
2 answers
267 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 ...
1 vote
1 answer
28 views

Set AMS Euler as the default maths font (XeTeX)

I am trying to use the AMS Euler fonts in my plain XeTeX document, and by taking inspiration from various sources online (including Knuth's macros for Concrete Mathematics), I thought the following ...
4 votes
2 answers
205 views

How to fix this simple verbatim macro (plain TeX)?

I have written a simple macro to typeset everything enclosed in angle brackets with a special font and to ignore the backslash character. \catcode`\>=\active \def>{\endgroup} \catcode`\<=\...
3 votes
2 answers
142 views

How can I create a plain TeX macro that performs differently depending on whether or not it is called from within an \item?

I'd like to create a macro that behaves differently depending on whether or not it is called from within an \item, such as \def\mymacro{\if<INSIDE_ITEM> do this \else do that\fi} Here is an ...
6 votes
2 answers
102 views

Why should I not use EC fonts with XeTeX?

In the comments on a question I asked earlier today How to define \sc in TeX?, two users said it is not a good idea to use the ec fonts with plain XeTeX. I am curious to know why since I have been ...
6 votes
1 answer
204 views

How to define \sc in TeX?

Taking inspiration from the TeXbook (page 350) I defined: \font\tensc=eccc1000 \font\twelvesc=eccc1200 For example, the following works as expected: \font\tensc=eccc1000 \centerline{Donald {\tensc ...
1 vote
0 answers
73 views

Adding footnotes to columns in Optex

Accorging to this answer, it's possible to add footnotes to columns in Optex. Although I have a vague idea about what the author has in mind, where/how exactly do I add \penalty-10013 and \penalty-...
3 votes
1 answer
71 views

Better interactive TeX shell

I'm using the command-line interactive TeX shell on Linux, accessible via the tex command (Artix, package texlive-bin 2022.62885-3, available at https://tug.org/texlive). I've found it a very helpful ...
0 votes
2 answers
59 views

horizontal centering within \valign cells

I'm trying to use \valign to make an array of items. (See my self-answer to another question.) I'm doing this because I want to specify the items per column instead of per row, and because I want ...
0 votes
1 answer
98 views

Is it possible to redefine a macro's parameter?

I would like to redefine a macro parameter. This is what I have tried so far: \def#1{$#1$} But it throws this nasty error that I don't know how to fix. ! Missing control sequence inserted. <...
0 votes
1 answer
97 views

About pdftex and stockwidth

I use pdfTex and had a file with included graphics, by using \input miniltx.tex \input graphicx.tex and all worked well. Now I get a mistake like ! Forbidden control sequence found while scanning use ...
4 votes
1 answer
150 views

PSTricks broken in Plain TeX?

% Plain LuaTeX or Plain XeTeX \input luaotfload.sty% comment this out for XeTeX \input pst-circ \pspicture(-1, 0)(3.5, 4.5) \circledipole[labeloffset = 0](0, 3)(3, 3){V} \coil[dipolestyle=curved](0, ...
2 votes
2 answers
87 views

Why do these macros not evaluate to the same so that \ifx is true?

I have a document with paragraphs that were transcribed from an interview. Each of the paragraphs is from one author, alternating. Starting with "Author 1" I want to add the author name in ...
0 votes
1 answer
117 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 ...
1 vote
1 answer
137 views

What TeX engine is recommended?

I am a very long-time user of TeXtures, publishing multiple books using PlainTex (figures in Adobe Illustrator) with TeXtures. Since TeXtures will no longer work with Macs (I'm currently using ...
0 votes
1 answer
66 views

hfill using any characters

Not that I badly need this but I thought it could be useful to have: What would be an efficient code for a command like \hfillwith such that, say, \hfillwith{bla} would output blablablablabla... from ...
1 vote
2 answers
99 views

Error while running code

Below my code that I am trying to run. I am getting multiple errors, such as ! Undefined control sequence. \input pictex\magnification and ! I can't find file `pictex=1200'.<to be read again>\...
5 votes
2 answers
136 views

How to use expression to set margins using \hoffset in TeX?

\def\leftmargin{1.25in} % custom margin \hoffset \leftmargin - 1in % subtract 1in from \leftmargin, !Not working \hoffset \leftmargin minus1in % also tried this with no success % In ...
4 votes
1 answer
100 views

Plain TeX floating Figures

I wonder if someone can point me to some macros that effect floating figures. I'd like something along the lines of a footnote. i.e. auto-increment the Figure number and then create a floating box ...
16 votes
2 answers
1k views

Is there any software that converts latex file to tex file?

I was asked to convert a file from LaTeX format to TeX format, so it could be compiled by TeX. I use LaTeX a lot, but I'm quite unfamiliar with TeX. And the file is pretty long. So I was wondering if ...
1 vote
1 answer
65 views

Plain TeX cannot find eplain

I just started using TeX on Linux after using it on macOS successfully for many years. I managed to get it installed, and after adding the following lines to my ~/.zshrc, I can compile documents fine. ...
26 votes
8 answers
9k views

Can I see a plain TeX source file please?

all the LaTeX-tutorials tell me how LaTeX is an extention simplifying the building of TeX documents. Understandably, no one uses plain TeX anymore, right? But I seem to learn better when I grasp the ...
3 votes
3 answers
161 views

How can I use these PostScript fonts on Overleaf with plain TeX?

How can I use these fonts on Overleaf with plain TeX? \font\tenpalatino=Palatino at 10pt \font\bighelvetica=Helvetica at 30pt This is a test. \tenpalatino This is Palatino font at 10pt. \par \...
4 votes
3 answers
318 views

Expandable way to tell apart a character token and an equivalent control sequence

As the title says: is there any completely reliable, expandable method to differentiate between a control sequence that has been made equivalent to a character token and the character token itself? (...
5 votes
3 answers
397 views

How to get lesssim in Plain TeX?

How can I get something like the lesssim symbol in Plain TeX? I found a comprehensive-looking list of Plain TeX codes online, but it didn't include anything that did what lesssim does.
6 votes
2 answers
197 views

two sets of hyphenation patterns without a newlanguage

While reading hymaster.tex, part of hyacc-cm, we find the following statement: It is important to use version 3.xx of TeX, and a version 3.xx of plain.tex. The critical date is autumn 1989, and ...
0 votes
2 answers
304 views

Using space created with \hangafter

In Plain TeX, I'd like to put a box or a picture (with epsf) in the space created with \hangafter=-3 \hangindent=-3cm (i.e. upper-right corner) I got the following MWE, but I'd like to move around ...
1 vote
2 answers
68 views

How can I typeset vDash in plain TeX?

I am working on a model theory document in plain TeX, and I use the vdash and vDash symbols a lot. \vdash is already part of plain TeX, so no problem, but what's the way to get \vDash to look ...
2 votes
2 answers
106 views

How to skip first letters from \jobname in plain Tex

As intentioned in the title I want a macro \skipfirstletters in plain-TeX, that skips the first letters (catcode 11) from the \jobname. For instance if the TeX-file is named Test0xy.tex it should ...
3 votes
2 answers
103 views

PSTricks and color not useable together in Plain TeX?

% Plain LuaTeX \input luaotfload.sty \input pstricks \input pst-circ \input color% destroys everything \pspicture(-1, 0)(3.5, 4.5) \circledipole[labeloffset = 0](0, 3)(3, 3){V} \coil[dipolestyle=...
2 votes
1 answer
119 views

Can I make \directlua understand unicode chars like ≥, ≤, ≠, ∙, and −?

MWE: \directlua{% local abs=math.abs function gcd(x, y) if y \csstring\~= 0 then return gcd(y, x \csstring\% y)% I would like to write "≠" instead of "~=". else ...
2 votes
1 answer
97 views

Two-column macro in PlainTeX

While reading the TeXbook, I became curious to make my own double-column macro. I have tried to split content with \vsplit and boxes, but I have had no success thus far. Using a LaTeX package is a ...
1 vote
1 answer
103 views

How to use sans serif font in math mode?

It is rather common to typeset theories (that is a set of statements) such as ZFC in a sans serif font family. I tried the following: \font\ss=ecss1000 \def\ZFC{\ss ZFC} \ZFC $\ZFC\models\exists X\...
1 vote
1 answer
35 views

Page layout in XeTeX

I want to create a presentation using XeTeX but I am having trouble with the page layout. The expected result show be a pdf with a 4:3 aspect ratio, centered content and margin of 1/8th of the total ...
0 votes
1 answer
67 views

What is the picmac package useful for?

I recently found this package on CTAN by Don: https://ctan.org/pkg/picmac But there does not seem to be any documentation online about it, could someone provide some minimal examples of it? Apparently ...
1 vote
2 answers
135 views

How `rotatebox` could be defined in plain TeX?

I was wondering if it is possible to define rotatebox in plain old TeX (without importing eplain, pstricks, miniltx or what not or using pdfrotate or other pdf-specific commands). The word "...
0 votes
1 answer
81 views

About text floating into columns (vboxes again)

With the help of others, I managed to have text flow smoothly into columns. Finally, I got rid of the overflow, TeX does with limited vboxes. Now,a solution always implies the next question: If I ...
1 vote
1 answer
42 views

Wrong spacing with math mode inside sl in plain TeX

Here is a minimal example of a problem I encounter sometimes: {\sl Let $\cal U$ be} \bye In the output U is much closer to "Let" than to "be". Is there an equivalent to the italic ...
0 votes
1 answer
39 views

How to magnify with a factor < 1 in plain Tex?

I want to reduce the size of everything in a document to read it on a specific device. I tried to use \magnification=833 as 1/1.2 * 1000 = 833 and I think that Knuth uses this kind of formulas to get ...
13 votes
4 answers
2k views

overstruck \diamond and plus in plain TeX?

I need a character in plain TeX that combines a plus with a quadrilateral whose corners are the four endpoints of the plus. Is there a way to create such a thing? I apologize for editing the ...
3 votes
2 answers
193 views

How to create a bibliography in plain TeX?

I know that you can use BibTeX using eplain and btxmac.tex but I am looking for a minimalist solution with at little code as possible. I am almost tempted to do everything by hand (see Appendix B of ...
46 votes
6 answers
17k views

How to compile the source code of TeX

I am more and more interested in the system TeX (and LaTeX) and I want to study it more deeply. I am not telling that I want to learn how to use it, but I want to understand its mechanism now. The ...
4 votes
2 answers
182 views

How to define underleftarrow in plain TeX?

I want to typeset the lim symbol with an arrow under it (pointing to the left or to the right). The following works for putting the arrow over lim \def\limleft{\mathop{\overleftarrow{\rm lim}}} $\...
7 votes
4 answers
1k views

How to display code snippets in plain TeX

Assume we have a source code in C++ like so: void dfs(int p){ if(o[p]) return; o[p]=1; c[p] = t++; for(int i=0; i<s[p].size(); ++i){ dfs(s[p][i]); } } How do we ...
17 votes
2 answers
1k views

Unicode math at TeX primitive level

I am looking for information how to implement Math OTF font in XeTeX or LuaTeX at TeX primitive level (using XeTeX or LuaTeX primitives). There exist a LaTeX package unicode-math. Unfortunatelly, this ...
3 votes
1 answer
76 views

Mixing text and image in Optex

I've tried to mix text and images in Optex, but the solution is far from perfect. It throws an error -- Missing } inserted. Besides, I'm quite unsure about whether the use of \valign and \vtop (...
10 votes
2 answers
210 views

Why changing the catcode of : cause epsfbox to fail?

I have the following very simple TeX file: \input epsf \catcode`\:=\active\def:{\thinspace\string:} a: b \centerline{\epsfbox{test.1}} \bye with test.mp containing beginfig(1); draw (0,0) -- (100,...
4 votes
1 answer
245 views

How to install LuaMetaTeX to MikTeX on Windows 11?

On GitHub you can find the Plain and LaTeX format for LuaMetaTeX. I am a Plain LuaTeX user and would like to switch to Plain LuaMetaTeX for some reasons. Examples: unpacking the contents of \left and \...

1
2 3 4 5
17