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

learn more… | top users | synonyms

4
votes
1answer
74 views

Always display leaders, even when I have a line break

Consider this code: \def\leaderfill{\leaders\hbox to 1mm{\hss.\hss}\hfill} \vbox{\noindent\hsize 3.4cm Alpha adslf adsf kalsdf\leaderfill 1123} \bye The output is But I'd like to have dots ...
16
votes
3answers
561 views

The "^'' glyph in the TeXBook

TeX, plain TeX, within the source of the Texbook of Don Knuth, there is use of ^ in different command sequences, and in text bites. Is there a special meaning to ^ in TeX primitives, in plain TeX, ...
4
votes
1answer
128 views

Hyperlinks in plain TeX

Hi to all (La)TeX people Here: Plain TeX and different hyperlink styles in dvi and pdf there are some macros (written by Alan U. Kennington) about how to produce hyperlinks and cross-reference-...
2
votes
1answer
66 views

Implementing \luaescapestring in plain e-TeX

I'm trying to implement \luaescapestring in plain e-TeX. My solution needs to be fully expandable, so that \immediate\write\luascript{ local file = "\luaescapestring{\something}" } works. The ...
9
votes
2answers
97 views

Listings for plain tex

Is there a package to produce syntax-colored blocks of source code in plain TeX ? A listings equivalent ? Or (maybe) some macro to produce a colored tex input for some given source code ? Is it ...
2
votes
0answers
44 views

I need to use the fancytooldtips package in a number of plain tex documents

I have been handed down a number of rather long documents, compiled in plain Tex. My task is to implement the fancytooltip package in these documents for various purposes. The package in question is ...
14
votes
2answers
170 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 ...
6
votes
2answers
96 views

Expand control sequence previously written to file

I'm trying to write some macros in plain TeX for cross-references, analogous to LaTeX's \label, \ref and to Eplain's \xrdef, \xref. My definition of \label, called as \label {foo}, defines a control ...
9
votes
2answers
52 views

Does \end command issue a \vfill

Does \end command issue a \vfill command? I notice that in plain TeX, you have a \bye that issues it but after some experimentation I think \end also issues a \vfill, which is rather confusing. ...
6
votes
2answers
98 views

Can two \vtop boxes exist side by side?

So I am trying to see if I can put two \vtop boxes side by side. The below is the closest I have gotten. This is a kind of a "plain-tex in latex" example. \documentclass[fontsize=13pt,letterpaper,]{...
4
votes
1answer
64 views

How do I install and--or use opmac using texlive?

I wanted to give opmac a try. It is supposed to be part of csplain, which is supposed to be part of texlive. I am running TeX, Version 3.14159265 (TeX Live 2015) using debian from ubuntu 14.04. But ...
1
vote
0answers
45 views

How to include a .bmp image in XeTex using plain TeX source file

Using XeTeX, I would like to insert a bitmap image file which is in .bmp format, or alternatively, the same image in a .jpg format. I am using plain TeX, not LaTeX. Using PCTeX version 6, \special{...
4
votes
1answer
30 views

How to use control symbols using \expandafter?

Suppose I want to typset P\' olya correctly in TeX but suppose my computer does not have the key invoking the character/symbol ' (This is of purely theoretical interest). Now, TeX lets you use \rq to ...
2
votes
1answer
182 views

Add babel to plain tex [Texlive - Ubuntu 16.04]

To add babel to plain tex in my previous Ubuntu installation I used to do the following: edit the file /etc/texmf/fmt.d/10texlive-base.cnf change the line tex tex - tex.ini into tex tex language.dat ...
1
vote
0answers
70 views

Where to put plain TeX macros so MiKTeX finds them

I have MiKTeX 2.9 working except it can't find the files (.tex macros) when the source file (always plain TeX) refers to them as in \input mac2 I do have a TDS-compliant directory called \...
3
votes
2answers
163 views

“Wedding” font in plain TeX

I have a plain-TeX source file ready to go that makes a nice wedding program. But I need a script font for the headings. Something like Windows Edwardian Script (Open Type) which comes in a file ...
10
votes
3answers
256 views

Why does `\def` not work as TikZ parameters?

I have just started learning some TeX programming and am learning TikZ in plain TeX. My question is why is the following not working as intended; I try to define \sty as the TikZ drawing parameter, ...
4
votes
2answers
68 views

TeX (not LaTeX) tables, lines, and alignments

Note: I use TeX and not LaTeX. So for many years, I have been using this code to create tables with lines: \def\tablerule{\noalign{\vskip1pt\hrule\vskip1pt}} \vtop to 4truein{ \halign{ \strut\...
7
votes
2answers
1k views

Why is the \bye command not used by LaTeX?

Is there a technical reason why the \bye TeX command was replaced in LaTeX by \begin{document} and \end{document}? I suspect there must be a good technical reason behind this, as otherwise it would ...
1
vote
0answers
27 views

how to modify backrefalt with selfmade tex command

I would like to change the way that backref presents the list of backreferences. To do so I made a small TeX command \Combine that reads in a list of backreferences like 1,1,2,3,56 and combines it ...
2
votes
2answers
118 views

How can I write blackboard bold Latin capital letters in Plain TeX?

In LaTeX, you can use commands like \mathbb{C} (in amsfonts) or \mathds{C} (in mathds) to get blackboard bold letters. But how would I get them in plain TeX? I tried {\ds C} and it didn't work.
2
votes
2answers
66 views

Inserting a box with shaded background text, in plain TeX.

I'm using Plain TeX and trying to create a box that has a shaded background, containing a mixture of both mathmode and textmode TeX. It would be great if I could add colour to the background (i.e. ...
2
votes
1answer
41 views

Mark lines like overfull

I apologize if this has been asked before. I have searched and searched to no avail, it seems questions about getting rid of over/underfull boxes drown out any questions about how to produce the marks....
4
votes
2answers
77 views

centered hrule (plain tex)

As my nick suggests, I am just starting out with tex. Using plain tex, I am trying to create a document where certain paragraphs are separated by a centered horizontal line. I would like the ...
4
votes
2answers
66 views

Question about \spacechar in cwebmac.tex

In cwebmac.tex the following construct is used: {\def\\{\global\let\spacechar= }\\ } In cwebmac.tex \spacechar is used only once, in the following code: ... \else\ifx\nxt\spacechar \addF\space ... ...
24
votes
5answers
879 views

What are good resources for a beginner, non-computer genius type of person, to learn Plain TeX?

I noticed that there are a lot of "beginner" resources for LaTeX, lots of novice friendly tutorials etc. Are there similar resources available for Plain TeX that are geared towards beginners? ...
12
votes
3answers
241 views

Trailing space in parameter delimited with \par

I just realized that when I use \par as a macro parameter delimiter the parameter then contains a trailing space. MWE: \def\test #1\par{\def\param{#1}} \test test \hbox{\vrule\param\vrule} % ...
4
votes
1answer
66 views

Redefining eplain’s \numberedfootnote within a plain tex document

eplain provides a macro \numberedfootnote which, as might be inferred from the name, produces a raised number followed by the footnote text with the number increasing by one each time it is called. \...
9
votes
1answer
65 views

Where is it allowed to change \hsize?

In chapter 23 "Output routines" there is a warning: It's best not to monkey with \hsize and \vsize except at the very beginning of a job, or after you have ejected all pages from TeX's memory. ...
12
votes
3answers
593 views

Partially transparent gray chronoevents in my chronosys timeline? Or using any other Plain-TeX, LaTeX, LuaLaTeX, or even a XeLaTex package or method?

While putting together a "traditional" timeline, I kludged together a means of coloring my boxes in chronosys, but I would like the event boxes to be partially transparent. This would allow better ...
4
votes
1answer
26 views

In bplain \`{} is combined with next character when using font \tt

With plain TeX e.g. {\tt\char`\\\`{}\char`\{\char`\}} does display \`{} as expected. With bplain format the grave accent and the left brace is combined. Why bplain differs here? How can a ...
5
votes
4answers
174 views

Spacing after \vtop

There is insufficient spacing between the lines in the MWE, made using an \hbox filled with two \vtop boxes. \parindent=0pt \newdimen\linewidth \linewidth=4in \newdimen\colsep \colsep=1em \...
2
votes
1answer
113 views

Plain TeX plus OPmac macro: setting page (background) color

Synopsis: add macro to set page-background in TeX + OPmac Out of http://petr.olsak.net/opmac-tricks-e.html#coltext ...the OPmac tips and tricks additional macro listing to the core opmac.tex macro ...
18
votes
4answers
596 views

Detect whether running on pdfTeX or Knuth's TeX for conditional include

Does anyone know a way to detect whether one is running in pdfTeX or Knuth's TeX? I want to be able to conditionally include extra features when a document is being built using pdfTex, but also ...
5
votes
0answers
78 views

Can I point Gummi to use TeX instead of LaTeX?

gummi is a great text editor since it has continuous re-fresh. Can I link it to TeX instead of LaTeX? Here is why: Some commands only work with TeX and not LaTeX. me@Lenovo:~/Documents$ latex test....
3
votes
1answer
55 views

What is the effect of \hsize and \vsize in plain TeX?

I was reading the TeXbook. From the instruction I use \hsize=4in and \vsize=4in in the tex program, and generate the output dvi file. There are several problems. Is the \hsize the horizontal size ...
2
votes
1answer
48 views

How to go for Unicode substitution in plain TeX in the code below?

Backdrop : I am trying to generate some fonts. 1) In an .mf file, I have the following assignments. c_a := ASCII "a"; %%\def\odvowela{a} %%\def\...
2
votes
1answer
38 views

Why xdvi does not correct heights from pfb files?

In your working directory: $ tftopl cmr10.tfm > cmr10.pl Change cmr10.pl n order the character A has different width and B has different height: --- cmr10.pl.orig +++ cmr10.pl @@ -466,7 +466,7 @...
4
votes
2answers
112 views

How to type Unicode in plain TeX

In plain TeX, \char<int> produces character with decimal code <int>. Similarly, \char'<oct> \char"<hex> produce character with octal code<oct>, and hexadecimal code <...
0
votes
0answers
61 views

How to limit the width of \halign?

The glues inside my \halign rows don't get reduced when they should. The contents of \halign behave as if they had infinite horizontal space. This is the source code for the first table (it's very ...
3
votes
1answer
60 views

Customize page numbering in plain TeX (not LaTeX)

I would like to change the page numbering from the default 1, 2, ... to the corresponding symbols in my native language. I have the fonts and typesetting ready and just want to replace the page ...
1
vote
2answers
108 views

Tikz curve without control points

Is there a way in Tikz to draw a smooth curve that passes through some specified points without the need of specifying control points, like you can do in Asymptote? For example, in Asymptote I can do ...
4
votes
0answers
157 views

Why cmyk colors are displayed wrong on screen? [closed]

If we compile this with pdftex and open in evince 3.18.2-1 (and other viewers), the color is violet, instead of blue: \pdfliteral{1 1 0 0 k} \vrule height 5cm width 5cm \bye Please somebody share ...
4
votes
1answer
70 views

Reset counter via macro with \ifcase in Plain

I am not able to reset a counter to zero using a macro in Plain TeX. This code uses \ifcase and the counter animalnum to output one of a list of animal names, incrementing the counter each time it is ...
2
votes
1answer
104 views

How to make pdf outlines work correctly in LuaTeX?

cwebmac.tex version 3.67 --- July 2006 The following Lua code converts string from UTF-8 to UTF-16BE with tex.write, which prints all with catcode 12, except space, which is what is needed. We add ...
11
votes
4answers
585 views

How to get old-style ligatures in plain TeX

I would like to typeset text with old-style ligatures like st, ct, is, es etc, but without the use of command sequences, e.g. street or construction instead of \st reet or constru\ct ion in Plain TeX. ...
2
votes
1answer
94 views

Problem in making a custom format for plain xetex

I have lots of macros and so would like to create a format out of them. I am using xetex as engine. Suppose format.ini is a file which looks like this: \input plain [lots of macros] \dump If ...
6
votes
1answer
111 views

How is \obeylines different from \obeyspaces?

Let us look at dirty trick #3 in appendix D of TeXbook. The following code produces space of category 12: \def\uncatcodespecials{\def\do##1{\catcode`##1=12 }\dospecials} \def\setupverbatim{\tt \...
2
votes
1answer
77 views

How to separate pdf annotation from the file resource?

Let's suppose that we have an attached file: \immediate\pdfobj stream file {\jobname.tex} \pdfannot width 10pt height 10pt depth 0pt { /Subtype /FileAttachment /FS << /F (file) /Type /...
3
votes
1answer
86 views

How to attach files in LuaTeX in pdf mode?

I have this code to attach files via dvipdfmx, and it works well: \def\attach#1{% \special{pdf:fstream @file (#1)}% \special{pdf:ann bbox 0 0 10 10 <</Type /Annot /Subtype /FileAttachment ...