Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
1answer
58 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
56 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
77 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
22 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
134 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
215 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
60 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
69 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
41 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
47 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
70 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
191 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
106 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
24 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
votes
0answers
33 views

Where to find list of all PlainTeX macros with basic description? [duplicate]

I'm lookin for a simple list with all macros and primitives in PlainTeX with basic description an maybe tags. It would help me so much. Thanks for any suggestions.
1
vote
2answers
60 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
81 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
46 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
43 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
186 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
73 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 \...
2
votes
2answers
99 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
54 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
62 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
49 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 ...
4
votes
2answers
181 views

Linebreak in centerline

I am using plain TeX. I would like to define a macro \cpar that makes \centerline{A\cpar B} expand to \centerline{A}\centerline{B} I have experiemented with things like \def\cpar{\egroup\...
6
votes
1answer
70 views

\let\newtoks=\relax % this allows plain.tex to be read in twice

\let\newtoks=\relax % this allows plain.tex to be read in twice ... \let\+=\relax % in case this file is being read in twice I came across this when I was studying plain.tex. I have some questions: (...
1
vote
1answer
53 views

French hyphenation in plain TeX - plain TeX for french

I use plain TeX and work in french, how can I load the correct hyphenation patterns? How can I modify INITEX in order to get a stable "french plain TeX"? I would prefer not to go to LaTeX for that and ...
0
votes
1answer
81 views

In traditional TeX how to change size of \footnote font?

I wonder since \footnote works fine in LaTeX when it comes to adapting smaller fontsize, why does the equivalent \footnote{} command in traditional TeX not work accordingly? And how do I go about ...
1
vote
2answers
90 views

how do I use quote or quotation in traditionalTeX

I am trying to use \begin{quote} in traditional TeX and was wondering how this works. I have not been able to find an answer to it. Any suggestions are very welcome.
0
votes
0answers
47 views

how to change color in traditional tex [duplicate]

I want to know how to color in TeX. Unlike LaTeX with its many packages like xcolor etc My question is how do i change font / text color in TeX ? the command \color{blue} doesn't work.
4
votes
1answer
149 views

Problem with \hrulefill

(Note: \parindent is set to 0, for the sake better appearance.) \noindent\hrulefill\par %With one single \hrulefill I get nothing. a\hrulefill b\par %As desired. \noindent\hrulefill b\par %As desired....
4
votes
1answer
112 views

How to align lines in a two-column layout?

I am trying to use a two-column layout in plain TeX (pdftex, to be precise), where the lines of text in the two columns are vertically aligned. Here is what I've got so far (code is below): Normal ...
1
vote
0answers
30 views

Node placement with Tikz `to` and plan TeX [duplicate]

I'm having difficulty with placement of nodes along a path when using TikZ with pdftex. I can control the placement properly using the -- and controls options, but not to. Any advice? \input tikz \...
6
votes
1answer
115 views

plain tex: justify text after raggedright

I have played around with plain tex for a while now and can't figure out how to get back to justified text after e.g. \raggedright. Can it really be that I have to use \raggedright in a group \...
0
votes
0answers
27 views

PDF not created if we use psfig.tex in Plain TeX [duplicate]

I have some old TeX documents and the tags are follow as: \input psfig.tex \psfig{figure=./Figs/Tilt.eps,rheight=0pt}% \bye and I am running PlainTeX using tex filename.tex, compilation doesn't ...
2
votes
1answer
76 views

Nesting \halign

In TeX by Topic, chapter 25.3.2, “Brace counting in preambles”, states that “Alignments can be nested”. Probably because of the braces of the preamble. How can I nest two \halign? This doesn't work: ...
3
votes
1answer
96 views

How can I prevent \ifnum to be ignored?

So I have the following code: \newcount\x\x\i \ifnum\x<3 \advance\x1 \fi \the\x \bye which I call from the command line with pdftex '\def\i{9}\input test.tex' This puts out 10 (or \i + 1), ...
6
votes
2answers
272 views

How to print a line break in a loop in Plain TeX?

Let's say I have this simple loop: \newcount\u\u1 \loop \the\u~ \ifnum\u<2 \advance\u1 \repeat This prints the numbers as 1 2 What I want to achieve is 1 2 To do so I ...
2
votes
0answers
40 views

Double loop in Plain TeX [duplicate]

I want to test double loop in Plain tex but i use latex instead since tex command doesn't work. Here is an example. I want to use TeX to produce something like this: 1+1 1+2 1+3 1+4 2+1 2+2 2+3 2+4 ...
6
votes
1answer
180 views

British hyphenation in plain LuaTeX

In plain LuaTeX, how do I get British rather than American hyphenation? \input eplain \beginpackages \usepackage{showhyphens} \endpackages In plain TeX, how do I get British rather than American ...
2
votes
1answer
118 views

Babel and 'polytonic' Greek in plain LuaTeX

Is it possible to use Babel with 'polytonic' Greek in plain TeX with LuaTeX? I tried \input greek.sty \begindocument hullo \bye but that generated an error.
0
votes
1answer
105 views

unicode with plain xetex [duplicate]

Related to this xelatex question. I get Missing character: There is no π in font cmr10!. So I set the unicode font to cmu (computer modern unicode) as advised by this question for xelatex \font\cmu=...
1
vote
1answer
62 views

How to read a counter register from a file in Plain TeX?

I am a TeX user, and I would like to read a number from an auxiliary file in order to achieve things like: printing at the footing "page number X out of Total". I was trying to use the primitives ...
0
votes
1answer
71 views

parindent changes mysteriously (plain TeX)

The parindent appears to increase slightly starting with the second line of output. Why? \def\arc#1#2{\raise3.5pt\hbox{$\frown\atop\textstyle#1#2$}} $\vec A$\par $\arc AB$\par $\triangle ABC\cong\...
1
vote
1answer
91 views

Unexpected side-effect when including image with epsf in plain TeX document

I have a document written in plain TeX from which I generate a PDF file by means of dvips and ps2pdf. Let version A of this document be the following. \input epsf \newbox\fb \newbox\cb \setbox\fb\...
7
votes
2answers
179 views

Why does tikz produce output in plain tex when it does not in latex?

This simple document testlatex.tex \documentclass{article} \usepackage{tikz} \begin{document} \end{document} when running latex testlatex produces No pages of output. But this document testtex.tex ...
12
votes
4answers
813 views

Optional arguments in plain TeX

This is a turnstile with and without a subscript \def\stile{{|\kern-.225em-}} \def\sstile#1{{|\kern-.225em-}_{\rm #1}} $$\stile \alpha$$ $$\sstile{K} \alpha$$ \bye It would be nice to have just ...
5
votes
1answer
409 views

What is the difference between the two following structures?

First: \def\cs#1#2{00\fi\def\csa{#1}\def\csb{#2} \ifx\csa\csb} \if\cs{...}{...} Second: \def\cs#1#2{\fi\def\csa{#1}\def\csb{#2} \ifx\csa\csb} \if\cs{...}{...} I mean what role does 00 play in this ...
1
vote
1answer
64 views

Is it possible to prevent a page break within a block of TeX in plain tex?

This is equivalent to this question, but I am working in Plain Tex and not LaTeX. As an example, I'd like to allow page breaks only before the \exper{} line in the following block, assuming I have ...