Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
2
votes
3answers
86 views

Tractatus-style paragraph numbering

How can I keep track of a decimal number that indicates the current paragraph's place in a logical hierarchy and print it in the margin of each paragraph? (To yield a numbering in the style of ...
3
votes
2answers
205 views

Why is an empty \line added when \insert is used?

Consider the following example: \tracingonline=1 \tracingoutput=1 \gdef\makefootline{} \gdef\makeheadline{} \insert\topins{\vbox to\vsize{\hrule height \vsize width 300pt}} \end The log file ...
3
votes
1answer
43 views

How \topinsert differs from \pageinsert?

In TeXbook p.116 it is said: ... suppose you make seven topinserts in a row, of respective sizes 1, 2, 3, 9, 3, 2, 1 inches; the 9-inch one is actually a \pageinsert. This wording is very ...
1
vote
0answers
53 views

How to find out why the font search fails?

I migrated my XeTeX PDF generation from a Debian 9 system to the CentOS 7. The Red Hat packages of XeTeX where totally outdated and I had to remove them all, in order to install the latest TeX Live ...
2
votes
2answers
55 views

How to get eth and thorn symbols in Plain tex

Is it possible to create control sequences in plain Tex to produce the (phonetic) symbols for eth and thorn, e.g., as used in the compacted spin-coefficient formalism?
8
votes
2answers
63 views

Using a loop in \halign's preamble

I've been trying to use a macro which abstracts the structure of an \halign object to a number of columns, as mentioned in my previous question "Can I use a macro in \halign's preamble?." For that ...
6
votes
2answers
66 views

Can I use a macro in \halign's preamble?

I'm using Plain TeX and want to be able to abstract away the preamble of an \halign so that I can just call it with a number of columns in a macro like \customalign, and I want to use a macro to make ...
4
votes
3answers
59 views

Overriding control sequences for accessing TeX's integer-/dimension-/glue-/..-parameters

In TeX there are a lot of parameters which you can adjust for changing the behavior of TeX. Example 1: By assigning \baselineskip=... you change distance between lines. Why TeX's breaking-paragraphs-...
1
vote
1answer
64 views

In what ways can one write a parser in plain TeX or packageless LaTeX?

I want to write my own document class as a literate program with as minimal of a dependency tree as possible as an exercise to test my ability. I've implemented a stable foreach loop by shredding an ...
3
votes
1answer
83 views

How is space factor calculated?

In the following example, space factor is 1000 everywhere, so \spaceskip must never be used. But why if we change it to 0pt (after calling \raggedright), the result is different? \hsize=2in \...
5
votes
2answers
168 views

Explanation of TeX’s reading rules in TeXbook

What means the following extract on page 46 of TeXbook? TeX goes into state S in case (c), or in case (b) with respect to a character of category 10 (space) Does it mean that space must be skipped ...
5
votes
2answers
133 views

Question about exercise 20.7 in the TeXbook

To which specific examples from answer to exercise 20.7 in TeXbook refers the following part of the answer? Category codes are not shown, but a character of category 6 always appears twice in ...
2
votes
1answer
81 views

UTF8-based plain TeX

Is there any option among all these LaTeX, XeTeX and so on, that processes input, which is formatted in just the same way, as for Knuth's TeX, but with UTF-8 encoding? I mean, I would like to take a ....
6
votes
1answer
374 views

Emergency stop in plain TeX, pdfTeX, XeTeX and LuaTeX?

I'm using <TeX_Engine> -jobname=TEX_TESTING -halt-on-error -interaction=nonstopmode <my_code> to TeX the one-line code A\bye. It does not work. Here are the logs: Plain TeX: This is TeX, ...
2
votes
1answer
28 views

How to avoid indentation on a markerless footnote in plain TeX

I'd like to create a markerless footnote in plain TeX with several lines and no indentation. The closest I've gotten is: \footnote{}{ \kern -2.3em Line 1\hfil\break \noindent Line 2\hfil\break \...
4
votes
4answers
255 views

Where can I find how to tex symbols for different fonts?

I'm aware of fonts such as cmr10, cmex10 and cmsy10. Right now I would like to know how to use TeX to produce symbols in the character tables such as http://www.math.union.edu/~dpvc/jsmath/symbols/...
1
vote
2answers
82 views

verbatim listing with trailing spaces

I'm trying to redefine \verb just for fun. It should act like the LaTeX starred version: \verb<some-char><arbitrary chain of chars not containing it><same char again> should yield ...
2
votes
1answer
24 views

How to stop output generation after the first page?

I need to render labels. My labels are 102mm * 152mm. When the input is too long, TeX creates two pages. But I can not print on two labels. So I would like to throw away everything but the first page. ...
8
votes
1answer
236 views

How to select CMU Sans Serif Bold in XeTeX?

I have the bold font installed: fc-list | grep CMU | grep Sans | grep Bold /usr/share/fonts/truetype/cmu/cmunso.ttf: CMU Sans Serif:style=BoldOblique /usr/share/fonts/truetype/cmu/cmunsx.ttf: CMU ...
1
vote
0answers
58 views

sorting text file in plain TeX

I have seen Latex sort macros (for an index, which is precisely what I want, the index having several thousand entries); but I haven't seen one in plain (or AmS-TeX, for that matter; either is OK). ...
1
vote
1answer
49 views

right aligned \hrule, size based on text above (and below) in Plain TeX

I need an \hrule which is right aligned and the size is exactly equal to the text above it. And the same for text below it. Is such a thing possible outside of LuaTeX? I am using XeTeX. EDIT: For ...
2
votes
2answers
300 views

How to fill page vertically?

I tried to print labels with UTF-8 input. I have read, that this requires xetex. So I wrote the following example to write 1€ in the four corners of a 102mm x 152mm label: \pdfpagewidth=102mm \...
0
votes
1answer
67 views

practical use of `\noexpand` outside`\edef`(`\xdef`) and `\write`(`\messge`)?

After reading (and searching through) TeXbyTopic.pdf I have the impression that practical use of \noexpand falls into one of the following three cases, Inside \edef or \xdef, including the cases ...
7
votes
2answers
380 views

How to write a macro that is braces sensitive?

In the xparse package, there is the g type of argument which captures things inside a pair of TeX group tokens. This makes it possible to define commands \foo that behaves differently for \foo{a} and \...
5
votes
3answers
158 views

How to write a definition with variants?

In TeX I can define, say \def\1#1 is #2.{#1 & is & #2.\\} and \def\2#1 has #2.{#1 & has & #2.\\} with an easy usage: \1 Jim Jones is a fictional character. and \2 Tim Smith has ...
0
votes
0answers
38 views

Condensed font showing badly in Firefox

I am using a slightly condensed version of Lucida Typewriter for code listings, obtained with the fontmap line lbtn LucidaTypewriter "0.85 ExtendFont TeXnANSIEncoding ReEncodeFont" <texnansi....
5
votes
2answers
206 views

TikZ plot too verbose

I was wondering if there was a more succinct way to express the following plot (I'm using the plain format): \input tikz \tikzpicture \draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15); \draw[-&...
0
votes
1answer
35 views

How to access `\ninerm` (and some others) font in pdfTeX?

I can only use \tenrm\, \sevenrm, and \fiverm fonts; there are no \ninerm or \sixrm. I would appreciate if you share how to make ALL of those font sequences work.
2
votes
3answers
68 views

Quotes ignored by pdftex

I'm reading the TeXBook by Donald Knuth, exercise 2.1. I have the following input: Alice said, ‘‘I always use an en-dash instead of a hyphen when specifying page numbers like ‘480--491’ in a bibliog ...
1
vote
1answer
65 views

TeX and how to not output the footline/headline on specific page

The title page, any page, no head/footline using plain+etex+opmac, on a per page basis. Is there a manual coding solution to a page macro to relax the foot/headline for the page. Below the "idea" not ...
5
votes
3answers
93 views

CWEB, Plain TeX: how to switch from cmr8 to another font that supports foreign language characters?

I'm using egreg's code to use UTF-8 in Plain TeX so I can use Donald Knuth and Silvio Levy's CWEB. However, not every TeX font supports foreign language characters such as \"{y} or ç or ã. So this ...
0
votes
0answers
61 views

What combination of engine, format and packages can provide for arbitrary single page layout of precise regions of different attributes?

What combination of TeX engine, format and packages can provide for arbitrary single page layout of precise regions of different attributes? Is this reasonably achievable? Secondarily, if more than ...
0
votes
0answers
37 views

Suppress page number in TeX, NOT LaTeX [duplicate]

I am new to TeX family and I sincerely thank everyone for reading and replying this question. I know in LaTeX this can be done by "\pagestyle{empty}", but this does not work on original TeX. What is ...
16
votes
1answer
491 views

Why is pgf 3.1 not compatible with tex?

The release of pgf 3.1 on Jan the 6th broke a nightly build I'm running. Updating the package locally allowed me to reproduce the error, so I'm certain that's what caused it. Here is a broken MWE: \...
1
vote
2answers
125 views

How to set paragraph width as the width of the longest line

I have a paragraph with several lines ended using \break. I would like to set the width of the whole paragraph to the width of the longest line. How to achieve this? I have a macro like this where I ...
1
vote
1answer
131 views

How to vertically center a piece of text on a page?

I've been searching how to center a piece of text vertically on a page, since I wanted to create a cover for my reports with the Title centered both vertically and horizontally. I first tried the ...
1
vote
1answer
180 views

How to use other fonts in plain tex using MikTeX?

I've been reading Donald Knuth's Computers & Typesetting and in chapter 4 the author says that one can specify a font using \font\cs=<external font name>. What I would like to know is how ...
2
votes
1answer
66 views

1. Stray `space' in KNUTH's `\primes` macro 2. Formatting macros for logical clarity

The \primes macro in Knuth's TeXBook (Version 3.0 1996) in Chapter 20: Definitions (also called Macros) page 218, produces a stray space after the 3, as in 2, 3 , 5, 7, 11, .... I have given up ...
1
vote
0answers
86 views

How to integrate my macros in ProTEXT

I installed ProTEXT from the TeXLive 2017 CD on a Windows 10 system  and am using TeXWorks. I use plain TeX coding and the XeTeX format. I have it working except that I have to include my macros and ...
0
votes
0answers
46 views

How to add my own directory to TexWorks search list

I am using TeXWorks as the front end for the XeTeX format. Just installed this from the TeXLive 2017 CD. I have a directory of my own plain-Tex macro files. I want my plain-TeX coded documents to ...
2
votes
2answers
170 views

How to include the current font name in the document

Using plain TeX coding, how to I include the current font name in the document? I know it involves \the\font but can't recall the exact method. This is for use in a font-sampler, so that before each ...
12
votes
3answers
235 views

How to preserve parskip in vsplit?

If I box something with non-zero \parskip and split it using \vsplit, the resulting split box will have the exact requested height. This is ususally more than I want, so I \unvbox the split box and ...
0
votes
1answer
92 views

How to save a bmp image from the internet for use in XeTeX

I found a bmp image file online, right clicked on it, saved it as bmp format in a local directory. Using MS Paint, I could open and view the file. Paint says the picture-file is 42.2K bytes, 240 dpi, ...
1
vote
1answer
95 views

Using Xetex to Include bmp file into document using Plain TeX

I just installed TeX Live 2017 and am using XeTeX, Version 3.14159265-2.6-0.99998 (MiKTeX 2.9.6300 64-bit) (preloaded format=xetex 2018.12.4) 4 DEC 2018 22:30 I have a bmp file named nh-seal_3.bmp ...
0
votes
1answer
46 views

Can `showlists` display the page number at the bottom?

In Plain TeX, the canonical showlists primitive is extremely useful for understanding what's going on under the hood. However, I haven't been able to get it to display the page number Plain TeX puts ...
2
votes
1answer
58 views

How do I type script characters in plain TeX?

LaTeX has the canonical \mathcal for typing script characters in math mode. Does Plain TeX have a similar ability?
1
vote
2answers
100 views

How to draw a line with absolute coordinates in Plain TeX?

How can I draw a vertical line, which is 3cm long and 15cm apart from the left side of the paper at the top of the page?
6
votes
1answer
210 views

Wide figure in twocolumn output in Plain TeX

I try to get something which looks like a figure* in LaTeX. I have defined \widetopinsert and \endwiedeinsert. This works but the text on the second column goes into the bottom margin. \catcode`@=11 \...
8
votes
2answers
122 views

How to keep the order of floats in Plain TeX?

When I mix \topinserts and \midinserts in Plain TeX, the floats are out of order: \def\bsptext{% Das ist ein Test. Das ist ein guter Test. Das ist ein langer Test. Mal sehen, ob alles funktioniert. ...
3
votes
1answer
53 views

Overfull in vbox inside hbox with hsize of the same width

While learning with Plain TeX, I am trying to create a framed paragraph. I have started with the following code, which is supposed to limit the paragraph width but still enable the line breaking ...