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

learn more… | top users | synonyms

3
votes
1answer
42 views

Line with a \hbox is overflowing right margin, why?

Let's say I have a hbox inside a paragraph like this: Do you like me? \hfill\hbox{\quad$\bigcirc$ Yes\quad$\bigcirc$ No}. If the text of the question is longer than this "Do you like me?", the line ...
5
votes
1answer
201 views

TeX4ht and Plain TeX

According to tug.org TeX4ht can be used with Plain TeX. I've tried the commands listed in the site above, but nothing works! All I can have is a simple text file, with .html extension, but without any ...
6
votes
2answers
133 views

Delimited arguments and using a macro inside of itself

I wanted to play with delimiter sizing without using the \delimiterfactor, -shortfall, etc. and made the following: \newdimen\bigdim \bigdim = 1.9743ex \newdimen\Bigdim \Bigdim = 2.671ex ...
11
votes
7answers
2k 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 ...
9
votes
1answer
88 views

List of all control sequences let to primitives in common formats

I would like to know a list of all control sequences which are let equal to primitives in common formats. For plain TeX for instance, we would get the list \endgraf % = \par \endline % = \cr \repeat ...
6
votes
1answer
115 views

Stopping the accidental absorption of digits into literals

I recall that I was once writing some TeX code, and I encountered something like this \count\foo \foo=2\otherMacro [\the\foo] If \otherMacro was defined as something like \def\otherMacro{9 cats is ...
3
votes
1answer
51 views

OpenType MPlib labels with luatex-plain

I am trying to get the luamplib to work with the luatex-plain -format. I installed BasicTeX2014, and then did tlmgr install context. Then I did luatex --ini ...
9
votes
1answer
124 views

vbox disappearing inside hbox

I don't understand why a vbox disappears when it's surrounded by two \hss, for instance in: \hbox to 0pt{\hss abc\hss} \hbox to 0pt{\hss\vtop{def}\hss}% doesn't work \hbox to 0pt{\vtop{ghi}\hss}% ...
4
votes
2answers
52 views

LaTeX graphic[sx] package with eplain fails with driver dvipdfmx

According to UK TeX FAQ, in order to get bounding box support (with .xbb and .bb files) with dvipdfm[x] and non-eps graphics files, one must specify the driver as in: \usepackage[dvipdfmx]{graphicx} ...
4
votes
1answer
95 views

csplain and url package not working with pdftex

MWE (test.tex): \input miniltx \input url.sty \url{http://www.google.com} \bye Commands: pdftex -fmt=csplain test.tex -- fails This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) ...
7
votes
4answers
326 views

Vertically aligned table in plainTeX / LaTeX / Context etc

My last answer about vertically aligned table inspired me to write my first question at this site. How to create the following table in various TeX approaches: plainTeX, LaTeX, Context, eplain, OPmac ...
8
votes
3answers
523 views

Without any built-in looping macro, can we just use a recursive macro to get a-b-c-d-e?

Without any built-in looping macro, can we just use a recursive macro to get an output of a-b-c-d-e? \def\aaa #1{#1-\aaa} \aaa abcde % expected result : a-b-c-d-e \bye Edit: Probably the best way ...
2
votes
1answer
30 views

How to add an arbitrary item to the TOC in OPmac

While trying to customize my TOC for a book project, I wanted to add some vertical space between two items in the TOC. From reading the OPmac source, it seems that the TOC is generated from the .ref ...
1
vote
1answer
68 views

How to derive one TeX-Format from another

Let's say I want to write my own TeX-format for learning purpose, how can I easily derive from plain.fmt (or better xetex.fmt)?
7
votes
2answers
481 views

Infinitely shrinkable glue except if surrounded by text?

Say \a and \b are two macros that expand to some text and either one may be \empty but not both. I want two put \a and \b in a line, centered and separated by a \quad. \hfil\a\quad\b\hfil Problem: ...
5
votes
0answers
38 views

CSplain support for English quotes

In CSplain, there is a lot of multi-language support (including UTF-8 input in 8-bit TeX engines) but one curiously missing thing was support for UTF-8 English quote glyphs. From reading the CSplain ...
7
votes
1answer
109 views

TeX definitions of `` and '' [duplicate]

Where and how does TeX define the character sequence `` and '' ? From the TeX * prompt, how does one "show" the definition?
12
votes
1answer
131 views

Thoughts on turning this DropCap/Lettrine code into a macro

I am aware there are some packages available for Dropped Capitals, esp. the lettrine.sty package for LaTeX. However, I'm learning TeX from fundamentals and decided to figure out how to do it myself. ...
10
votes
1answer
152 views

Why use \spaceskip and \xspaceskip here?

Plain TeX provides \centerline for centering, well, lines of text, but nothing to center a paragraph. LaTeX has \centering and the \center environment. Looking at the LaTeX code, it appears very ...
8
votes
2answers
235 views

How can I use times fonts in Plain TeX?

I'd like to use Times fonts in Plain TeX. What would be the Plain-TeX equivalent of the LaTeX command \renewcommand{\rmdefault}{ptm}?
2
votes
1answer
51 views

Creating a “Last Name, First Name” entry in the index for OPmac

I'm trying to create an index entry that looks like: Knuth, Donald E. 4 Where Donald is the first name of a person and Knuth is his last and E. his middle initial. From what I can tell, the comma ...
4
votes
1answer
55 views

OPmac use of \pageno instead of \folio in footline

I've noticed that OPmac is using the \pageno counter to output the \footline instead of Knuth's use of \folio (which itself uses \pageno) as in standard plainTeX. \folio of course conveniently ...
3
votes
1answer
68 views

Place text on left margin

Maybe I'm just not searching for the right thing, because this seems to be something that TeX would just 'have something' for. Is there any way to simply return to the left margin (or originating ...
2
votes
1answer
26 views

“Top Level” category for indexes in OPmac

Is there a way to create a "top level" index entry in OPmac without a page number? I'd like it to look something like this: figs -- green 1 -- newtons 3 -- red 2 Notice, there is no page number ...
2
votes
1answer
23 views

Why does `\iid` macro in OPmac only support “,” or “.”

To create an index entry in OPmac one enters something like this: Oh, how I like \ii figs figs. Notice the repetition there? As a convenience OPmac provides \iid: Oh, how I like \iid figs . In ...
7
votes
2answers
79 views

OPmac mnote with hyperlink bug?

When typesetting the following (using pdfTeX or luaTeX) the rightmost bracket of the cross reference in the marginal note is colored as if part of the hyperlink (though not actually part of the link), ...
5
votes
2answers
83 views

Implicit \hfil at the end of each paragraph?

Why do Alpha \hfil\ Omega\par and Alpha \hfil\ Omega not flush "Omega" to the right?
4
votes
2answers
104 views

Proclaim command with multiple paragraphs

In page 131 of "TeX for the Impatient", it says the followings for proclaim command: \proclaim ⟨argument⟩.␣⟨general text⟩\par This command ``proclaims'' a theorem, lemma, hypothesis, etc. It sets ...
2
votes
3answers
118 views

Left margin wider than right one

Why is the left margin wider than the right one? Each of them should be 1 inch wide: If you run TEX without modifying the plain TEX format, you get pages that are numbered at the bottom; and each ...
0
votes
1answer
28 views

White marks around leaders in PDF

Why are there white bars between the leaders and each of the rules in this code when compiled with LuaTeX to a PDF file? When compiled (with LuaTeX) to a DVI file no white bars can be seen. a \vrule ...
5
votes
1answer
75 views

Overlapping hboxes

How can I change the following macro to get a rule in hbox 2 that is just as wide as the text in hbox 1 and remove parameter #2? \def\m#1#2{ \leavevmode \hbox to#2{ \hbox ...
7
votes
2answers
219 views

Breakable fill-in blanks

What is a good way to create blank space (preferably, underlined -- it is to be filled in by hand when document is printed) that takes up all the remaining space on a line. The blank space may appear ...
2
votes
0answers
54 views

Sublime Text 2 for Plain TeX?

I'm currently working on a project that requires plain TeX, not LaTeX. Is it possible to configure Sublime Text 2 to compile plain TeX?
2
votes
2answers
72 views

Simulating directly typed text with \input

I currently have the following code written in Plain TeX: \loadtoks\END int main(void) { printf("Hello World! %!@#$%&*&^\n"); } \END {\tt\the\toks0} \bye The macro \loadtoks is ...
4
votes
2answers
118 views

Define a special verbatim commmand

To learn more about Plain TeX, I try to define a special verbatim command \verb{code}, which puts code inside braces. When there is no braces in code, It's easy. But when there are some balanced ...
4
votes
2answers
293 views

Is there a both bold and slanted Computer Modern typeface?

Note: the font has to be loaded in plain TeX with \font\bs=<nome_font>
8
votes
5answers
223 views

Vertical alignment of text within a table cell

How can I move the text in the following table closer to the upper rule (or closer to the lower rule) without changing row height: {\halign {#\cr \hrulefill\cr \font\f=cmr8\f(bla bla bla)\cr ...
3
votes
4answers
175 views

Table-like layout in plain TeX

Below image shows part of a document prepared with a word processor. Gray lines mark table borders and are only visible in edit mode (they will not be visible when document is printed but have been ...
8
votes
5answers
268 views

Typesetting URL/URI/IRI in plain TeX

I would like to be able to allow line breaking on /'s, ?, and &'s. I understand I should change the \catcode's of those letters, but I don't want them to be global, but instead restricted to ...
3
votes
1answer
69 views

Is there any horizontal skip after which the space character `\ ` is removed automatically?

Let's consider the following TeX macro: \def\theorem#1{Theorem (#1).\enspace} Try to use it: \theorem{Dirac} A simple graph with $n$ vertices\dots Then TeX produces two spaces after "Theorem ...
2
votes
2answers
196 views

Can I have a list of all fonts available in plain TeX?

I need a list such as: cmr, cmss, cmsl, cmtt, ... Where can I find it? (Do the available fonts depend on the TeX installation or are the same everywhere?)
3
votes
2answers
173 views
4
votes
1answer
152 views

Non-latin characters with plain TeX

What would it take to output non-latin letters (e.g. cyrillic letters) to a document using just plain TeX (i.e. without using "third-party" macro packages such as LaTeX)?
2
votes
2answers
117 views

Cite a range of references

I have a very long list of citations in my TeX file. Rather than each bibliographic key appearing in the list, I would like a range of values, e.g. given \cite{ref1,ref2,ref3,ref4} I get [1,2,3,4] ...
3
votes
1answer
90 views

Changing Math Fonts with luaotfload in Plain TeX

Changing Math Fonts with luaotfload in Plain LuaTeX Without a major exposition on all the options tried, here is the short of it: Using Tex Live 2013, LuaTeX, plain.fmt and luaotfload.sty, ...
6
votes
2answers
319 views

How to not have widows and orphans without using raggedbottom

I know I can set \clubpenalty and \widowpenalty to 10 000 to make them “really bad”, but then TeX sees it equally bad to cut the page short when there is no vertical stretch (i.e. \parskip=0pt), and ...
5
votes
1answer
166 views

Learning Plain TeX via ConTeXt's LuaTeX-plain Format

Succinctly as I can: Want to learn Plain TeX (but with modern conveniences such as UTF-8, mplib, TiKz, etc.) Have much respect for the ConTeXt group of people. Liked the idea, when I stumbled upon ...
4
votes
1answer
93 views

How to include a programming language source code file in a plain TeX document?

I have some Java and C source codes and I want to include them in my .tex document. I can't simply copy and paste them into my document: In fact, doing this way, the code won't appear with the right ...
3
votes
1answer
53 views

Vector arrow running into brackets

This looks really horrible when I typeset it in Plain TeX: $$[\vec r]$$ \bye The vector arrow bleeds into the bracket on the right, it's not pretty at all. Is there a standard fix for this sort of ...
17
votes
3answers
331 views

Is there an “Appending \let”?

After \def\MyText{\textbf{My Text}} \let\MySaved\MyText \MySaved and \MyText have the same \meaning. What I would like to have further down in the document is % \MyText = \textbf{My Text} ...