Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
6 votes
3 answers
367 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 ...
  • 1,246
3 votes
1 answer
264 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....
  • 149
1 vote
0 answers
96 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
2 answers
78 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
4 answers
178 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 ...
  • 149
4 votes
1 answer
259 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
1 answer
73 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
2 answers
223 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
2 answers
90 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: \...
  • 123
0 votes
1 answer
97 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
0 answers
126 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....
  • 249
3 votes
2 answers
96 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. ...
  • 31
3 votes
2 answers
253 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,296
3 votes
2 answers
219 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
1 answer
38 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{\...
6 votes
3 answers
338 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
1 answer
114 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 ...
  • 2,539
4 votes
1 answer
152 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 \...
  • 231
4 votes
1 answer
126 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 ...
  • 1,246
2 votes
1 answer
83 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
0 answers
113 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,246
3 votes
1 answer
307 views

Plain TeX magnifications

Can I use a magnification like \magnification=2700 in TeX? Or is it restricted to multiples of 500 like \magstephalf, \magstep1 and so forth?
0 votes
0 answers
82 views

LuaTeX's new_(node)inspection function

I was trying to test the piTeX macros on LuaTeX (required), but the base.ptxlua macro file complained about not finding a mysterious "nodeinspector" module, required to setup some french spacing. ...
  • 4,147
1 vote
1 answer
148 views

Polar plot using pgfplots>polaraxis in Plain Tex

I use polaraxis a lot in the pgfplots package. It works well in LaTex. However, in Plain Tex I get an error like the following: ! Undefined control sequence. \pgfplots@environment@polaraxis@ [#1]->\...
  • 37
1 vote
1 answer
128 views

LuaTeX node insert_before in left margin

After playing with the answer the question here, I noticed some differences in insert_after and insert_before. node.insert_after adds contents to right margin, node.insert_before doesn't seem to add ...
  • 1,246
3 votes
1 answer
102 views

combining math accents in plainTeX vs LaTeX

When typesetting math accents, I have the impression that LaTeX does sometimes a better job than plain. My question is, what does LaTeX differently and whether there is an easy fix also for plain. ...
  • 246
4 votes
3 answers
262 views

\vbox append: Insufficient line spacing between last line of first \vbox, and first line of second \vbox

I have two \vbox typeset in different parts of the document, and I intend to append them as if all their contents were typeset only once in one \vbox. So linespacing remains constant going from one \...
  • 1,246
1 vote
1 answer
126 views

Plain tex margin note solution pulls text on preceding lines down (probably by the depth of strut)

For the plain tex margin note solution suggest by 'wipet' here, it seems like all the lines preceding, and including the line at which margin note is positioned are pulled down by some length (...
  • 1,246
4 votes
1 answer
293 views

How to use tikzducks on Plain TeX / ConTeXt?

Is it possible to use/port tikzducks in Plain TeX or ConTeXt? As far as I know, tikzducks.sty has some LaTeX-isms as \begin .. \end environments, so it doesn't work outside LaTeX.
user avatar
0 votes
0 answers
126 views

What application for plainTeX to choose?

I need an application like TeXmaker, for plainTeX, which will be convinient to use and will have text editor, command line interface and real-time viewer for pdf dokument all in one. Maybe there is ...
  • 31
2 votes
2 answers
189 views

How to replace a line in a file written by TeX' \write command

I try to write some content in an external file using TeX' \immediate\write command. \documentclass{scrartcl} \begin{document} \newwrite\tempfile \immediate\openout\tempfile=lists.tex \immediate\...
  • 199
2 votes
0 answers
537 views

Grid typesetting for equations

There were many discussions about grid typesetting in TeX. "Almost impossible"... I want to show that it is possible. I have found a way to make display math obey the grid. In contrast to packages ...
5 votes
3 answers
356 views

How to use the number of arguments in a macro?

I want to use a conditionally have a command produce two types of output in plain tex. I want to show a fraction style derivative with one mandatory option to give the independent variable, and a ...
4 votes
2 answers
399 views

Create a stack of items

In plain TeX, how do I create a stack of items? I need to be able to push items to the end of the list, pop items and output the full list of items. For example \createlist{\mylist} \push{\mylist}{...
  • 1,737
5 votes
1 answer
305 views

What are use-cases for active characters?

The TikZ manual has this little gem of wisdom in its description of the \foreach command (emphasis mine): In the easiest case, ‹variables› is a single TeX command like \x or \point. (If you want to ...
  • 2,813
3 votes
1 answer
86 views

Additional hrule in halign after page break

I try to spread a halign over more than one page. I use \filbreak after every line. \tracingonline=1 \advance\vsize by -15cm \def\tablerule{\noalign{\hrule height .3mm\filbreak}} \newcount\posno\...
  • 579
1 vote
2 answers
94 views

Three identical copies of a page

I need to print one page three times. Is it possible, in plain TeX, to output two exact copies of the last page without incrementing the page number?
  • 579
2 votes
1 answer
117 views

halign to <dimension> does not grow

I would like to set the width of a halign to 400pt: \tracingonline=1 \def\tablerule{\noalign{\hrule}} \newcount\posno\posno=1 \def\pos{\number\posno\global\advance\posno by 1} \tabskip=3pt \halign to ...
  • 579
4 votes
1 answer
137 views

Different vsize for first page

Is it possible to alter the vsize for the first page? I tried this: \vsize=20cm \def\pagebody{% \ifnum\pageno=1% \advance\vsize by -8cm% \vskip13cm\vbox to \vsize{\boxmaxdepth=\maxdepth ...
  • 579
0 votes
1 answer
110 views

How to reserve the right space for bigger headlines and footlines?

I set the headline and footline size to 2cm and reduced the \vsize by 4cm. But the footer does not fit the page. \pdfpagewidth=10cm \pdfpageheight=10cm \hsize=\pdfpagewidth \vsize=\pdfpageheight \...
  • 579
0 votes
1 answer
617 views

How to vertically align two vboxes in a hbox at the top?

I tried this: \hbox{ \vbox{ \hbox{1} \hbox{2} \hbox{3} \vfill } \vbox{ \hbox{A} \hbox{B} \hbox{C} \hbox{D} \hbox{E} } } \bye But the first vbox does not ...
  • 579
4 votes
1 answer
1k views

How to put a vbox in hbox?

I tried this but it does not work: \vbox{ \hbox{ {top-left} {top-right} } \hbox{ \vbox{ {bottom-left-top} {bottom-left-down} } \vbox{ {bottom-right-top} ...
  • 579
2 votes
1 answer
3k views

What does it mean: You can't use `\hrule' here except with leaders

I have the following example, which draws a vertical line at the top of the paper: \def\makeheadline{ \setbox0=\hbox to 0pt{\hskip-1in\hskip15cm \vrule depth 3cm \hss} \ht0=0pt \dp0=0pt \vbox ...
  • 579
1 vote
0 answers
474 views

luaotfload | load : FATAL ERROR (output excerpt on the terminal after the lua run)

On a texlive2019 distribution, tex engine luatex, fonts used recognized by other engines (xetex, pdftex, csplain). Macros of OPmac - plaintex, no latex. Sourcefile: \input opmac ...
  • 41
4 votes
2 answers
504 views

How can I make three horizontal dots on a letter in plain TeX

How can I make three horizontal dots on a letter in plain TeX?
3 votes
1 answer
156 views

Using plain TeX to get text flowing around included images

I'm looking to have a page full of text, with an embedded image aligned left, another embedded image aligned right, the two images not necessarily at the same height. Here is an image showing the ...
2 votes
1 answer
221 views

What is the plain TeX equivalent of \rule in LaTeX?

For various reasons, I have to use TeX rather than LaTeX for a short document. I need to be able to insert a short blank underline within a paragraph. In LaTeX, this would be done easily with \rule{...
  • 1,011
11 votes
1 answer
433 views

How to handle figures and images using MikTeX Plain TeX (not LaTeX) on a 35 year old document

I have a document (my Ph.D. dissertation) that I wrote in 1984-1985 time frame using Plain TeX (not LaTeX). I need to create a PDF out of it. Back in 1985, my figures were generated using Pascal ...
  • 181
0 votes
1 answer
68 views

Compiling lextex example

I am trying to use the lextex macros. For this, I started by taking a look at the example file. I tried to follow the instructions and run tex &plain example1.tex but this gives the message ...
2 votes
1 answer
644 views

Verbatim write in Plain TeX

I am trying to write verbatim text into a file in Plain TeX. In LaTeX I could use the verbatim package. My goal is using Asymptote in Plain TeX. So I need something that works like \verbatim@start ...

1 2 3
4
5
17