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

learn more… | top users | synonyms

4
votes
2answers
50 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. ...
4
votes
1answer
49 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 ...
2
votes
1answer
72 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
34 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, ...
4
votes
1answer
24 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 ...
1
vote
0answers
64 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
136 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
244 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
56 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{ ...
24
votes
5answers
852 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? ...
50
votes
7answers
5k views

Reasons to use plain TeX

Given the active development in LaTeX and ConTeXt, and how LaTeX insulates the writer from typographical details and ConTeXt gives the user extensive control over formatting thus taking useful ...
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 ...
2
votes
1answer
93 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 ...
1
vote
0answers
22 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
106 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
57 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
38 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 ...
12
votes
3answers
553 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
2answers
55 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
63 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 ... ...
29
votes
5answers
4k views

How to add, subtract, multiply, and divide in plain TeX?

I find many cases where I need to calculate many numbers, using adding, subtracting, multiplying, and dividing, but it would save much time if TeX could simply compute these for me. This is a sample ...
12
votes
3answers
235 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
65 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
60 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. ...
2
votes
1answer
98 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 ...
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
170 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
67 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 ...
2
votes
1answer
93 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
590 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
76 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 ...
4
votes
2answers
650 views

IPA characters in plain TeX

Is there a way to type IPA characters in TeX? There is the tipa package for LaTeX, but what about plain TeX? I don't have any experience with installing fonts in TeX and can't find any good resource ...
2
votes
1answer
36 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 ...
3
votes
1answer
45 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 ...
4
votes
2answers
95 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 ...
2
votes
1answer
44 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} ...
6
votes
2answers
217 views

Style/macros for outlines in Plain TeX

I'm seeking a style file or other macros for creating an outline in Plain TeX, of the traditional indented style, eg. I. Big Idea A. Sub idea B. Sub idea 1. Thought ...
0
votes
0answers
55 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 ...
6
votes
3answers
2k views

Plain TeX vs. LaTeX Macros

I was wondering what's the (advantage) of doing something one way over the other in different systems. For instance, I read that users of plain TEX should use \def whenever they want to create a new ...
3
votes
1answer
55 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
101 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
125 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
68 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 ...
3
votes
1answer
79 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 ...
11
votes
4answers
556 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. ...
4
votes
4answers
283 views

How to properly change page offsets?

Suppose that we need to change margins. This cannot be done only by changing \hsize and \vsize, because of the default offset of 1in. There is a possibility to change \hoffset and \voffset directly, ...
13
votes
2answers
790 views

How to input accents in PlainTeX with UTF-8 encoding?

I'm using TeX with the plain format. On my keyboard there is the 'è' character (as well as é, ò, à, ù, ì). I'd like to make it work so that, when put è in the input file, TeX transforms it into \`e, ...
6
votes
1answer
86 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
2answers
74 views

How to change character code in Type1 font?

I needed to make spaces at the beginning of line copyable in pdf, and came up with the following trick. In lm-rmtt.enc I change /tilde to /nbspace and then use this code: \font\myfont=rm-lmtt10 ...
4
votes
2answers
80 views

Adding crop marks to legacy document

I have a legacy book written in Plain TeX which contains code that centers the page in A4 paper. I need to add crop marks to these A4 pages at the correct positions for the target book size. I have ...