Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
5
votes
3answers
258 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
92 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
43 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
83 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
vote
0answers
41 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
56 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 ...
3
votes
1answer
46 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
0answers
60 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. ...
0
votes
0answers
32 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]-...
1
vote
1answer
49 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 ...
3
votes
1answer
49 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. ...
4
votes
3answers
144 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 \...
0
votes
1answer
46 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 (...
2
votes
1answer
147 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.
0
votes
0answers
37 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 ...
2
votes
2answers
52 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\...
2
votes
0answers
235 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
3answers
261 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
2answers
149 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}{...
4
votes
1answer
92 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
votes
1answer
54 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\...
1
vote
2answers
80 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?
2
votes
1answer
54 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 ...
4
votes
1answer
75 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 ...
0
votes
1answer
82 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 \...
0
votes
1answer
47 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 ...
4
votes
1answer
105 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} ...
2
votes
1answer
66 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 ...
0
votes
0answers
96 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 ...
4
votes
2answers
401 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?
1
vote
1answer
90 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 ...
1
vote
1answer
68 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{...
10
votes
1answer
147 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 ...
1
vote
1answer
42 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 ...
1
vote
1answer
99 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 ...
5
votes
1answer
279 views

Plain TeX vs. ,,primitive`` TeX

I'm using LaTeX for my day-to-day needs, but in order to avoid cargo-cult document creation, I'm trying to gain a better understanding of the TeX engine itself. As part of this I'm experimenting with ...
3
votes
2answers
74 views

How to generate error on assignment to \count register if value being assigned contains decimal point?

Please, if possible, plain TeX + eTeX commands only (I compile in XeLaTeX but use TeX commands). I need parameter value to be an integer value, not a decimal. In this example, parameter is being ...
0
votes
2answers
91 views

How to shift hrule to the right (or insert horizontal space before hrule) using plain-TeX commands?

I can't seem to shift an \hrule to the right so that it starts some distance after the left margin. \documentclass[margin=1mm,varwidth]{standalone} \begin{document} \hrule width5pt hello \end{...
2
votes
3answers
100 views

How can use \sec and \secc from inside another macro definition in Opmac

Can anyone point me in the right direction? I need to wrap up basically the entire content of an article in a macro definition(this is how user passes it into my template), which contains references \...
3
votes
1answer
36 views

make4ht for plain tex

I want to convert a plain tex document to html using make4ht. If I use this command line make4ht document.tex the program calls the compiler "latex" and blocks the compilation. The make4ht --help ...
3
votes
1answer
277 views

How to \copy contents of a box without copying the box itself?

Self-describing sample % pdfTeX \newbox\thbx \newbox\thhbx \setbox\thbx\hbox{abc} % HOW TO COPY THE CONTENTS OF THE BOX % WITHOUT ACTUALLY COPYING THE BOX % ITSELF ALONG WITH THOSE CONTENTS? \...
2
votes
1answer
36 views

Why is etc. added at the end of a \vbox, and what does it mean?

A short sample code % pdfTeX \newbox\thbx \setbox\thbx\hbox{abc} \newbox\tvbx \setbox\tvbx\vbox{\unhbox\thbx} \showbox\tvbx \bye would output \thbx=\box16 \tvbx=\box17 > \box17= \vbox(6.94444+0....
63
votes
4answers
8k views

When is TeX better than LaTeX? [duplicate]

Is there any situation where it is preferable to use TeX (or perhaps plain TeX) rather than LaTeX to write a document?
2
votes
3answers
235 views

Scale text (\scalebox) in Plain TeX/XeTeX to make it narrower

I've been looking up stuff and searching through the Internet for a few hours now. Basically, I need to do something like this, which I can do in LaTeX with the graphicx package: \scalebox{.7}[1.0]{...
14
votes
4answers
777 views

How to get the sum, difference, product, and quotient from a macro in ConTeXt or Plain TeX?

I want to create a set of macros like this: \addnumbers{2}{5} \subtractnumbers{3}{5} \multiplynumbers{2}{-2} \dividenumbers{2}{8} The first will display the number 7, adding #1 and #2. The ...
4
votes
2answers
70 views

What does the comment-pln code actually do?

The comment-pln code on CTAN (link) defines the plain TeX macros \begincomment and \endcomment, that ignore everything typed in between. The entire code base is included below: % Comment.tex % ...
0
votes
1answer
48 views

What is the effect of {} in \eqalign?

$$\eqalign{&{}+7=b\cr}$$ and $$\eqalign{&+7=b\cr}$$ are the same; but $$\eqalign{{}+7=b\cr}$$ and $$\eqalign{+7=b\cr}$$ differ from each other (the first has more space between + and 7)....
3
votes
1answer
212 views

\includegraphics not working in Plain TeX after update

I have been using \includegraphics with plain TeX without problems until yesterday, when I updated TeXLive and wrote (minimal) \input miniltx \input graphicx.sty \includegraphics{espec.png} \bye The ...
1
vote
2answers
48 views

Redefining the length-related commands to have a decimal coefficient

The macro of \! is defined as: \def\!{\mskip-\thinmuskip} and the command of \thinmuskip is initialized as being \thinmuskip = 3mu (Appendix B: p.349, The TeXBook). I couldn't have found the ...
2
votes
1answer
100 views

In plain TeX, How to make a part of text in two(or multi) columns?

To put it simple, I would like to make a little part of my document appears to be in two columns. However, As most of that should be in a single column, I have a little doubt that whether tangling ...

1
2 3 4 5
14