Tagged Questions

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

learn more… | top users | synonyms

2
votes
1answer
41 views

How do I change font size in plain TeX tables featuring math (fontch producing unexpected results)

I've been having difficulty with setting the font size in plain-tex tables (i.e. haligns). I want to set the tables to use seven or (preferably) eight point font, including tables which contain math. ...
4
votes
2answers
47 views

eplain TeX footnote spacing

I've been experimenting with the features provided by eplain and for the most part, I quite like them. I'm confused about one thing though. I don't seem to be able to adjust the inter-line space in ...
11
votes
3answers
309 views

Parser for decimal numbers in (plain) TeX

I need help writing a parser for decimal numbers using only TeX and plain TeX. The set of accepted inputs is given by the regular expression: (+-)?(0-9)*(.,)?(0-9)+ The parser need not do anything ...
10
votes
3answers
392 views

How do I make a long underscore in Plain TeX?

I have looked at this question as well as here and here but I cannot figure out how to produce a long underscore in plain TeX, as in the following example. Date _____________________________ The ...
0
votes
0answers
32 views

How to open a plain TeX document in BaKoMaTeX (TeXword)

The question says it all I want to open a plain Tex equation in BaKoMaTeX (TeXWord) This is a Sample File $$ t{\rm{(}}x{\rm{,}}y{\rm{)}} = \left\{ {\matrix{ 1 \cr 0 \cr } } \right.\matrix{ {\quad ...
1
vote
1answer
47 views

Problems with plain tex and ngerman.sty

I tried to typeset a plain TeX document with the ngerman.sty macro set. Unfortunately, I get the following output for a simple test file containing nothing but \input ngerman.sty\end: This is TeX, ...
8
votes
1answer
86 views

Attaching files using plain TeX (pdfTeX)

I am currently in the process of writing a document using plain TeX and would like to be able to attach other relevant files to the resulting pdf. I have experience using the attachfile, attachfile2 ...
7
votes
4answers
305 views

Coloured text in plain tex

Recently I became intrigued by plain TeX because it gives even more flexibility than regular LaTeX. In my document I wish to use grayscales of text. In LaTeX, producing this result is achieved ...
2
votes
2answers
136 views

How to create PDF outline

According to the PDF reference (PDF document, 9.4MB), one can create an outline for the document; a visual table of contents for the viewer application which enables the user to jump to the page for ...
6
votes
1answer
54 views

Unboxing \hrule's?

How do you unbox \hrules such as in this code sample: \setbox0=\vbox{1\hrule2\hfil\break3} \unvbox0 \setbox0=\lastbox % line 3 \unskip % \baselineskip \unpenalty % \break ...
2
votes
1answer
81 views

How to typeset a vbox to a grid in plain TeX?

NOTE: update below I know this is a heavily debated subject, which is almost impossible in plain TeX, but what I want is merely a vbox with a height that's a multiple of baselineskip. Searching the ...
4
votes
2answers
66 views

Breaking up text in a column

When the contents of a column are too long to fit on a single line, how can I have TeX break up the contents across multiple lines if the column has a variable width (such as column 2 in the example ...
3
votes
1answer
59 views

Stretching a column so that table fills up specified area

Using plain TeX how can I make column 2 in the following table take up the remaining space to .5\hsize while preserving the other columns' property to have a variable width dependent on their ...
1
vote
1answer
50 views

How to automatically print line numbers for broken off lines in plain TeX

Before you read on: This question refers to plain TeX only. Thanks! I’m wondering how to add line numbers for lines broken off by TeX’s line-breaking mechanism. (My text does not contain any ...
4
votes
2answers
70 views

How do I control vertical line spacing under \settabs in plain TeX?

Consider the following example. \settabs \+ \hskip 4.5 in & \cr \+ Silahkan masuk & Come in, please! \cr \+ Silahkan duduk & Sit down, please! \cr \+ Silahkan berdiri & Stand up, ...
8
votes
2answers
253 views

Conversion of tex to latex

Quite surprisingly for me, I did not find valuable information on how to convert plain TeX files to LaTeX documents. There is a TeX.SX question, but it was answered with a particular solution. I ...
1
vote
0answers
118 views

List of TeX internal parameters? [closed]

I have come across quite a number of TeX internal parameters, like \clubpenalty, \widowpenalty, \abovedisplayshortskip and so on. Could you provide me with a complete list of them, what they are for ...
1
vote
0answers
42 views

How to get pictures from every \halign line?

I'm trying to get separate images from eqnarray lines. Problem is that I can't properly insert starting/closing image \specials for tex4ht. Lets consider a minimal example (plain tex): ...
4
votes
1answer
125 views

TeX, LaTeX and fractions

I just stumbled upon a Math SE answer which used {num \over den} for fractions. This seems perfectly equivalent to \frac{num}{den}. I'm guessing the former is TeX syntax and the latter is the LaTeX ...
7
votes
2answers
125 views

\hbox spread in plain TeX

I want to learn Plain TeX to understand the underlying mechanics of TeX and friends. I am trying to reproduce the spacing of this dedication from the Spanish music-theory treatise, El porque de la ...
15
votes
2answers
172 views

\expandafter with \uppercase ordering

As I understand it, the behavior of \expandafter is such that if \a and \b are macros, then \expandafter\a\b will first expand \b then \a. But my understanding must be wrong, because I don't ...
9
votes
3answers
360 views

Plain TeX and underscores

We have a bunch of scripts to generate invoices for our customers. It creates plain TeX files from CSV and then PDF files (using the pdftex program). This "black box" was created by one of our former ...
4
votes
1answer
88 views

Using urw-garamond fonts in plain TeX

I am struggling with a font problem that I can't solve by myself. I almost always write my files with pdfLaTeX and the urw-garamond fonts from mathdesign. However I would like to produce the same ...
3
votes
1answer
53 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 ...
6
votes
2answers
150 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 ...
9
votes
1answer
110 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
118 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
62 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
135 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
73 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} ...
5
votes
1answer
112 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) ...
8
votes
3answers
532 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 ...
7
votes
2answers
485 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: ...
1
vote
1answer
78 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)?
5
votes
0answers
46 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
116 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?
2
votes
1answer
32 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 ...
10
votes
1answer
188 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 ...
13
votes
1answer
159 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. ...
2
votes
1answer
60 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 ...
3
votes
1answer
95 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
29 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 ...
2
votes
1answer
34 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 ...
4
votes
1answer
84 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 ...
7
votes
2answers
82 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), ...
4
votes
2answers
137 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
141 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
35 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 ...
6
votes
1answer
82 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 ...
5
votes
2answers
131 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?