Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plain-tex]

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

5
votes
2answers
146 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
127 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
65 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
362 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
25 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
213 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
78 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
23 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
189 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
51 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
48 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
296 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
66 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
375 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 \...
6
votes
3answers
155 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
37 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
202 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
33 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
65 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
59 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 ...
6
votes
3answers
88 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
60 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
465 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
116 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 ...
2
votes
1answer
118 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
149 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
64 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
41 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
165 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
234 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
85 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
90 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
45 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
57 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
93 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
206 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 \...
7
votes
2answers
116 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
49 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 ...
1
vote
2answers
110 views

How to remove the space after \hbox and \vbox in PlainTeX?

I'm trying to remove the space after \hbox or \vbox. Example: \def\w#1{% \vbox{% \hbox to #1{% \vrule width 1pt \kern -1pt \vbox to #1 {% ...
3
votes
2answers
91 views

How to stretch a vbox to fit it's parent PlainTeX?

I'm trying to create a white square that has 1pt wide black border. This is my code so far: \def\blankbox#1{ \hbox to #1{ \vrule \vbox to #1 { \hrule \vfil ...
0
votes
1answer
49 views

How to type and “arrow” with a stop on both ends in PlainTeX?

I'm trying to insert a line segment symbol but I'm unable to find the correct "arrow" to use with \buildrel \SEGMENT_ARROW \over AB. I'm trying to achieve something like this Thanks in advance.
2
votes
1answer
49 views

How to type \measuredangle in PlainTeX?

I'm trying to do some geometry problem in PlainTex but I've found just \angle for angle representation. But I need \measuredangle that works in LaTeX. Thanks for help.
6
votes
1answer
260 views

How to use packages in Plain TeX?

How to use packages in Plain TeX? Are there any packages for Plain TeX at all or are packages a feature only for LaTeX?
1
vote
1answer
100 views

TeX macro/primitive vs Plain TeX macro

I know there are TeX primitives and Plain TeX macros created (directly/indirectly) by TeX primitives. My question is are there TeX macro? E. g. I can use \break in pdfTeX without defining it and \...
3
votes
2answers
130 views

Luatex paper size

I am looking into plain luatex (no latex). The following definitions change the size of the paper, but don't change the physical paper size. What am I missing \newdimen\pagewidth \newdimen\pageheight ...
2
votes
2answers
61 views

How to put multiple paragraphs in single \loop … \repeat

I wanted to create list of n Fibonaci numbers. This is my code so far: \newcount\n \n=5 \newcount\a \newcount\b \newcount\i \a = 1 \b = 1 \i = 0 $a = \the\a$ \par $b = \the\b$ \par $i = \the\i$ \...
2
votes
1answer
89 views

How to \input using relative or absolute path (in plain TeX)

I'd like to have my personal library of macros but I do not know how to import them from different directories other than the current one. And It feels super ugly to have symlinks to all files in my ...
2
votes
1answer
54 views

If I were to type the output of `\showlists` into a TeX file, would I get the exact same thing as what I started with?

Suppose I create a TeX file, and right before closing, I run \showlists. Then, I look at my log file, and (roughly) copy and paste everything from \showlists into a new TeX file. Will the two .dvi ...