Questions tagged [plain-tex]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
28 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
215 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
35 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
38 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
32 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
23 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
182 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
68 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
27 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
38 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
96 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
70 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
55 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
112 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
44 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
52 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
77 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
64 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
24 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
112 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
98 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
278 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
98 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
56 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
94 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
57 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
65 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
62 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
65 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
46 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
60 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
56 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
160 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
56 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 (...
4
votes
1answer
205 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
47 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
62 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
262 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
291 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
169 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
98 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
58 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
82 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
62 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
86 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
89 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
96 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
163 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
120 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 ...

1
2 3 4 5
14