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

learn more… | top users | synonyms

2
votes
0answers
39 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
154 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
91 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
51 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
83 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
59 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
38 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
29 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
115 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
151 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
254 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
59 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{ ...
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
24 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
111 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
63 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
39 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 ...
4
votes
2answers
60 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
64 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
869 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
237 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
62 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
564 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
173 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
97 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
592 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
77 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 ...
3
votes
1answer
48 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
47 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} ...
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 ...
4
votes
2answers
101 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
58 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
57 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
104 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
134 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
99 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
568 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
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 ...
6
votes
1answer
95 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
70 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
81 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 ...
2
votes
2answers
76 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 ...
9
votes
1answer
70 views

Why does unboxing lose margin kerning in pdfTeX?

Consider the following code: \showboxdepth=20 \showboxbreadth=200 \hsize=5.33333in \pdfoutput=0 \pdfprotrudechars=1 \input protcode.tex \setprotcode\tenrm \vbox{\noindent Test. Test. Test. Test. ...
4
votes
2answers
83 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 ...
0
votes
0answers
19 views

Slight variation of plain \topinsert [duplicate]

I would like to use \topinsert for placing figures at the top of the pages. But I don't want to insert figures at the top of the first page of a chapter. So I was thinking about creating a macro ...
3
votes
1answer
53 views

\leaders when at the start of the line

I'm encountering an issue where I have \leaders that occasionally fall at the beginning of the line and as a result, there are no leaders appearing. I have for example: \hsize 9.2cm Lorem ipsum ...