Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
122 views

MiKTeX file location for plain TeX macros using WinEdt

I use plain TeX (not LaTeX) on a Windows 10 PC to create worksheets for my HS math classes. I've been using MiKTeX 2.4 and WinEdt5 (since 2001) but decided to try upgrading to the latest of each (...
9
votes
1answer
243 views

How has plain.tex been updated?

I've noticed that on CTAN there is a new version of the file plain.tex, dating 2021-01-17. But nowehere I see what the changes are. What has changed?
2
votes
2answers
175 views

$\displaystyle{#1}$ versus $\displaystyle#1$

In reading Appendix B of the TeXBook, I've noticed that Knuth consistently defines macros in Plain TeX with style switches of the form $\displaystyle{#1}$ as opposed to simply $\displaystyle#1$ (e.g., ...
1
vote
1answer
65 views

How does \over work?

I don't mean this necessarily in the sense of diving into code, but \over seems to function differently to other commands, which scoop up only following arguments. Instead, 11\over2 gobbles up the ...
1
vote
1answer
60 views

Outline text in plain XeTeX?

I use plain XeTeX. I've been asked to include a shamrock character in a typeset document (which I've found at Unicode 2618), but only in outline. The examples in the excellent PST-Text package (page ...
1
vote
2answers
88 views

Automatically add space after parenthesis in math mode if followed by certain characters

I'm using plain TeX with the luatex engine (actually it is OpTeX, but you can just assume it is the "plain" luatex). For my document I'm using the font EBGaramond. When I have a fomula like ...
4
votes
1answer
71 views

catcode 12 spaces

I would like to understand TeX's behaviour when the catcode of the space character is set to 12. The following two example input files differ in just one position: where the first has the character 4 ...
7
votes
2answers
167 views

Underbrace under square root sign plain TeX

$$ \rlap{$\sqrt{\phantom{\displaystyle\pmatrix{A^{-1} b(x)\cr -1}^T \pmatrix{A & b(x) \cr b(x)^T & \Phi(x,x)} \pmatrix{A^{-1} b(x) \cr -1}}}$} \mskip14mu \...
3
votes
2answers
104 views

TeX primitive for streachability inside a math formula

In a math formula the glue between symbols can stretch or shrink. Which is the TeX primitive which establishes the badness of this kind of stretch/shrink?
0
votes
1answer
57 views

Shading in Tikz not working in Plain Tex

Shading is not working on my Plain Tex code. I use xetex.exe -synctex=1 -interaction=nonstopmode in TexStudio. No error message or warning. However, the code works on LaTex. Could anyone help check ...
2
votes
1answer
36 views

Questions about arguments of tikz macros

I'm a novice at coding. I'm reading the code of the macro \tikz@scan@one@point, but I have lots of troubles: Question 1: How to distinguish the arguments of a macro? For example the definition ...
1
vote
0answers
84 views

How to define a command that takes the word before it as one of its parameters?

I want to define a macro \foo that behaves similarly to \over and \atop, such that the code #1 \foo #2 outputs foo #1 #2
6
votes
3answers
136 views

Strange error when unvboxing in `\hbox`

and merry Christmas! I've encountered a strange error message on TeX level which cost me quite some time to unravel because it was so exceptionally unhelpful... Here's a minimal plain TeX example: \...
2
votes
6answers
150 views

Plain TeX: Problems when \loop to set parameters for \parshape

I was trying to write a macro for wrapping text around a figure. I aware that it is available in Latex and there is another package, figflow for plainTex. I am just learning to write my own. My first ...
1
vote
2answers
73 views

Stretch spaces within a box

Example: \noindent abcd abcd abcd abcd abcd abcd abcd aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa abcd abcd abcd abcd abcd abcd abcd aaaaaaaaaaaaaaaaaaa ...
2
votes
1answer
70 views

Definition of \magstep in Plain TeX

On page 349 of the TeXbook the definition of \magstep is given as \def\magstep#1{\ifcase#1 1000\or 1200\or 1440\or 1728\or 2074\or 2488\fi\relax} But in plain.tex of texlive the line 391 says: \def\...
3
votes
2answers
97 views

Force footnotes to bottom of page in plain TeX

I have a large (~3000 pages) document typeset using plain TeX plus some local macros. The document uses the plain TeX \footnote macro for footnotes. The document also uses \raggedbottom. This means ...
5
votes
1answer
57 views

How to skip horizontally by the negative amount of \hoffset?

I tried the following but nothing seems to work: \hskip -\hoffset \hskip -\the\hoffset \hskip 0pt minus\hoffset \hskip 0pt minus\the\hoffset What is the right syntax to reference hoffset? Update ...
0
votes
1answer
45 views

How can I set a different \topskip for different pages?

I tried to write a letter with a different value for \topskip on the first page because of the the address field. This works fine: \tracingoutput=1% \pdfpagewidth=210mm% \pdfpageheight=297mm% \hsize=\...
6
votes
1answer
73 views

\vbox to 0pt creates small vertical space

I have the following plain TeX file: \tracingoutput=1% \pdfpagewidth=210mm% \pdfpageheight=297mm% \hsize=\pdfpagewidth \advance\hsize by -50mm% \vsize=\pdfpageheight \advance\vsize by -50mm% \advance\...
0
votes
0answers
50 views

Plain Tex and Tikz: pgfsys-dvi.def does not support color

Here it is my little example \magnification 1200 \def\pagetop{792} \def\pgfsysdriver{pgfsys-dvipdfm.def} \input tikz.tex \usepgflibrary{arrows} \tikzpicture \draw[color=red,line width=2pt] plot (...
2
votes
1answer
74 views

eplain packages with plain tex no longer have all needed definitions

If one uses tex rather than pdftex, one gets errors when inputting certain packages with eplain. For example, let test.tex be this file: \input /usr/share/texlive/texmf-dist/tex/eplain/eplain \...
0
votes
1answer
46 views

Plain Tex error using tikz and dvips

Here is my Plain Tex file (example taken from the manual) \input tikz.tex \baselineskip=12pt \hsize=6.3truein \vsize=8.7truein We are working on \tikzpicture \draw (-1.5,0) -- (1.5,0); \draw (0,...
0
votes
1answer
230 views

Plain TeX (MiKTeX) installed Oct 7'20 on Windows 10 is not working as before (of Jan/Feb. 2019)

After a MiKTeX package update on 26.9.2020 Plain TeX (\input ngerman.sty) is no longer working as it used with my previous version MiKTeX 2.9 of January/February 2019, even after a fresh installation ...
1
vote
0answers
47 views

No hyphenation for ngerman with Plain-TeX after a recent MiKTeX package update

German hyphenation worked fine with my MiKTeX installation of February 2019 for Plain TeX input with just ngerman.sty as control sequence. But after I executed a package update on 26 September 2020 I ...
0
votes
0answers
51 views

latex pmatrix without begin

I'm quite new to LaTeX, and I'm wondering why do LaTeX use to \begin notation for environments. Is there a way to use \pmatrix directly in latex documents compiled with pdflatex? I recently dug up ...
2
votes
1answer
45 views

Cannot get small caps with OTF font and XeTeX

I am working on a project which requires me to use plain TeX, which I compile with XeTeX. The font I use is available as the following OTF files: MyFontSerif-{Regular,Bold,Italic,BoldItalic}.otf I am ...
0
votes
1answer
24 views

Centering contents horizontally in \halign

\input luaotfload.sty \catcode`\@=11 \pageheight 23mm \pagewidth 67mm \hoffset -1in \voffset -1in \advance\hoffset 2mm \hsize 63mm \vsize 23mm \topskip\z@ \baselineskip 17.5\p@ \abovedisplayskip\z@ \...
6
votes
3answers
204 views

Tabular edge-to-edge dotted line: suppress overshoot, reduce dotsize, align dots to edges

I am trying to add dotted line from left-edge to right-edge of tabular after rows. There are 3-problems with my best attempt (code & screenshot below): 1) The length of the dotted line equals ...
2
votes
1answer
80 views

\vadjust example on Tug.org

I was on Tug.org reading about some of TeX's primitives. I came across this example usage of \vadjust. 1. \def\strutA#1#2{\vrule height#1 depth#2 width0pt} 2. \def\ta#1% 3. {% 4. \strutA{8.5pt}{3....
1
vote
0answers
31 views

How to also vertically align horizontally aligned image and text **while allowing page-breaks**?

This question is not asking for snippets of code. It is asking for describing general practices with words. In plain TeX I'd like to place an image/a rectangular box at the left of some piece of text ...
1
vote
2answers
43 views

Justify box at the left margin while keeping \parindent glue/obeying \noindent if present

How to define a command which takes two arguments and from the first argument makes a new paragraph where the right margin of a box containing the second argument is justified at the left margin of ...
4
votes
4answers
105 views

Iterating through a list and modifying elements one at a time to construct new list

Long time reader, first time poster. I have a question about creating a macro that iterates through a list. I've read through some questions posted by other users, but all of those have something to ...
4
votes
1answer
74 views

\lowering \leaders

I'm using \leaders to make a flexible width rule, with the statement \leaders 0pt plus 1fil\hrule, but I also want to put text above this line. \rlap{text}\leaders works fine, except that the text is ...
2
votes
1answer
59 views

Question about Appendix E in TeXbook

There is something very strange with letter format example in Appendix E of TeXbook. On p.253 it is said that \voffset should be increased by two lines of text if headlines are used. This explains why ...
2
votes
2answers
132 views

linguistics-style trees in Metapost

I'm trying to find the best way to draw linguistics-style trees in a way which is as agnostic as possible to the variety of TeX which is used (LaTeX, ConTeXt, or plain ol' TeX). Most of the ways to ...
2
votes
2answers
46 views

How to type theorem with automatic number by opmac

It is quite convenient to use the opmac in Plain TeX, but I still do not know how to type a mathematical theorem with automatic number. At this stage, I am only able to type a theorem manually as: \...
0
votes
1answer
62 views

Centering text in a valign without finetuned column width

Currently, I have the following valign output from this code (Plain TeX): \def\make#1{{\hsize1.5in\vfil\centerline{\strut #1}\vfil\hrule}} \valign{\hrule\make{#}&&\make{#}\cr\noalign{\vrule} ...
1
vote
0answers
82 views

Why does the blackboard letters of the amsfont msbm have strange chardx values?

The font msbm which can be found under fonts/source/public/amsfonts/symbols in texlive has strange chardx width values set. If I run mf "\mode=localfont; input msbm10" I get the file msbm10....
3
votes
2answers
68 views

How to put text above other words in plainTeX?

I need to put chord letters above lyrics in plainTeX. The only thing I've managed to do is to place desired chord letter in a \hbox, which than I moved up using '\raise 10 pt \hbox{C}', for instance. ...
0
votes
0answers
29 views

TeXstudio freezes any time there is an error, but it doesn't display it

I'm working with plainTeX on TeXstudio and it works great, until I make any mistake and try to 'Build & View', then it just freezes, doesn't respond until I press 'Stop Compile'. But the worst ...
3
votes
2answers
130 views

Unicode input with plain LuaTeX

grün gr\"un \bye yields grn grün Is it possible to have the Unicode ü correctly rendered with plain LuaTeX? Would it also be possible with plain TeX and a METAFONT font? Or would a METAFONT ...
3
votes
2answers
115 views

Determining the “size” of a font

In Plain TeX (and really as a TeX primitive), \font\myfont=cmr8 at 10pt and \font\myfont\cmr10 both create fonts with "sizes" of 10pt. I want to be able to use this value to generate ...
0
votes
1answer
20 views

Misplaced \noalign following two newlines

Why does a \noalign command produce a ! Misplaced \noalign when it follows at least two newlines. For example, this code works : \documentclass[10pt,letterpaper]{article} \begin{document} \halign{\...
5
votes
3answers
291 views

Conditional \bye?

Editing a huge document is painfully slow. So one splits it into pieces and has a main document that does \input this and \input that. But: While I'm editing this.tex I want a \bye at the end to make ...
5
votes
1answer
101 views

Different behaviour between different TeX engines

Consider this simple piece of code, which is part of a format file I found. \catcode`\@=11 \ch@ck0\insc@unt\count \bye Why does it work fine with both tex and pdftex but issues an error message ...
4
votes
1answer
64 views

Plain TeX and BibTeX on Overleaf

I'm compiling a Plain TeX project on Overleaf with the line $latex = 'tex %O %S'; in the latexmkrc file. This makes most things work swimmingly, except BibTeX. In a file called main.tex I have \...
4
votes
1answer
98 views

luatex hlist node shift direction seems incorrect, what is the cleanest way to achieve pdf object translations (displacement)?

From the description of hlist nodes in luatex manual, its field 'shift' seems to be a vertical shift. But when I change it using post_linebreak_filter, it adds horizontal shift to hlist. This overleaf ...
2
votes
1answer
62 views

Is there a difference between \unvbox and \unvbox inside \output?

By writing an output routine for grid typesetting I discoverd an inconsistency. Look at sequence of spaces in \specialoutput and at the end of the document. The same sequence of spaces obeys the grid ...
0
votes
0answers
69 views

vbox: splittable aligned equations? measuring true height after vsplit

I am learning low-level tex to write my own custom *latex macros. As an experiment I tried to put math equations (multiline or not) inside \vbox/ \hbox, measure their dimensions, and tried to split ...

1
2 3 4 5
14