Skip to main content

Questions tagged [optex]

OpTeX is LuaTeX format similar to plain TeX but with much more features.

Filter by
Sorted by
Tagged with
6 votes
2 answers
207 views

Syntax highlighting with lua

I would like to do syntax highlighting with lua but I am struggling with getting the listing content into lua. As far as I understand the \_prepareverbdata macro can be overwritten to inject color ...
pinsl's user avatar
  • 73
1 vote
1 answer
49 views

Decorating verbatim text in OpTeX

I want to decorate listings with a border and background color. Specifically I would like a similar appearance to this: How can this be achieved?
pinsl's user avatar
  • 73
1 vote
1 answer
67 views

Graphics changing alignment in second vbox

I am trying to top-align text next to a bare image in PlainTeX/OpTeX, using the idiom: \hbox to \hsize { \vtop{\hsize=... ...} \hskip... \vtop{\hsize=... ...}} And this seems to work well ...
Michal_Atlas's user avatar
3 votes
1 answer
209 views

Register font family in OpTeX [closed]

I was trying to register the Minion Pro font family in OpTeX, for which I was guided by what was established for the EB Garamond font family, but I have not been successful. When doing so just create ...
juanuni's user avatar
  • 2,029
2 votes
1 answer
70 views

sidenotes `module` affects title page in OpTeX

I was checking out this solution by Max Chernoff https://tex.stackexchange.com/a/689656/14423 about vertical alignment in margin notes with OpTeX and it works perfectly. Now, I've been trying with the ...
juanuni's user avatar
  • 2,029
4 votes
1 answer
242 views

Equation numbers in OpTeX

I am writing a short report with OpTeX, and I have noticed a troublesome behavior which I cannot easily change: each section resets the counter for displayed equations. For this reason I have several ...
Siminore's user avatar
  • 583
4 votes
1 answer
159 views

What's wrong with this chapter head style (OpTeX)?

It runs ok, but there are error warnings: there is a "missing number, treated as zero" and "Illegal unit of measure (pt inserted)." on line 94 (log). \fontfam[Garamond] \typosize[...
user574859's user avatar
6 votes
3 answers
316 views

How can I use \mark in a multicolumn environment in OpTeX?

OpTeX has the macros \begmultiand \endmulti to split a text into multiple column, but since it becomes inner vertical mode, the \mark command does not have any effect anymore. Compare \headline={\...
user avatar
4 votes
1 answer
298 views

French spacing in plain tex / optex

I've seen the answer here for Latex. How can I adapt this to plain TeX or OPTeX? \frlang \fontfam[Times] { \catcode`\:=\active \catcode`\;=\active \catcode`\?=\active \catcode`\!=\...
user574859's user avatar
5 votes
1 answer
134 views

How do I apply a command to all OpTeX slides?

OpTeX has a built-in set of macros for slideshows. I like the API a lot, but not so much the design of it. In particular, I am trying to: use blue for hyperlinks, Use a different colour (say red) for ...
user avatar
4 votes
1 answer
127 views

Vertical dashed lines (inside and outside of tables) in PlainTex / OpTex

Taking an idea from this question, what if I want to make a vertical dashed line in PlainTex or (preferably) Optex? I know I can use \dotfill in the text (horizontally), but how can I use it ...
user574859's user avatar
6 votes
1 answer
112 views

Number direction in Arabic using (plain) Luatex

Following the question here, I managed to write in Arabic using Luatex (plain/Optex), but all numbers are also written from the right to the left (and in Western numbers, not Arabic). It seems that ...
user574859's user avatar
2 votes
1 answer
197 views

Automatic vertical skip in margin notes in Optex

The image below shows the result for the second page of the following code: \fontfam[Myriad] \margins/2 a4 (2,6,2,2)cm \mnotesize=4.5cm \newcount\notenum %\fixmnotes\right \def\note#1{\global\...
user574859's user avatar
0 votes
0 answers
183 views

book cover with tikz + Optex

I would like a frame around the page, but somehow the right and bottom frames don't appear. (Any more elegant overall solutions, with Tikz or otherwise, are welcome, too.) \load[tikz] \usetikzlibrary{...
user574859's user avatar
1 vote
0 answers
60 views

Endnotes on same line in PlainTex/Optex by chapter

Both answers here and here provide solutions for endnotes in plain/optex. However, the latter solution cannot restart every chapter, whereas the former aren't sequential/one-line. Is there any way to ...
user574859's user avatar
5 votes
1 answer
146 views

sequential (one-line) endnotes in optex

Inspired by the question here, I'd like to style entnotes thus (plain/optex): 1. First endnote, endnote number same as text size, not superscript, bold, with a dot after it. 2. Second entnote on same ...
user574859's user avatar
2 votes
1 answer
68 views

Numbered boxes to "List of Boxes" in Optex

I'm trying to make a "List of Boxes" in Optex like the one offered by tcolorbox. I used two tricks for "round frames" and "new list of X" and "new caption" from ...
user574859's user avatar
3 votes
1 answer
146 views

Mixing text and image in Optex

I've tried to mix text and images in Optex, but the solution is far from perfect. It throws an error -- Missing } inserted. Besides, I'm quite unsure about whether the use of \valign and \vtop (...
user574859's user avatar
4 votes
1 answer
111 views

Fullcite with Optex bibliography system

I've been searching in the documentation, but haven't found a way to print, in the text, the complete reference of an entry. It would work just like the \fullcite command from Biblatex, which prints ...
user574859's user avatar
3 votes
2 answers
116 views

Epigraph / flush right macro for Optex

Using Optex, I wanted to make a flush right (epigraph) macro/environment. I tried using e-plain defs for flush left/flush right, but they didn't work. They should look like this, but this \hskip 10cm ...
user574859's user avatar
0 votes
2 answers
68 views

Vertically align first image in a 3 image combination [optex]

Following the tip from the answer here, I could align three (sub)figures: \def\figure#1#2{\vbox{\hbox{\picw=.45\hsize \inspic{#1.jpg}}\medskip\hbox{\qquad#2}}} \hbox to\hsize{\figure{S10} {(a) Bird}\...
user574859's user avatar
4 votes
1 answer
96 views

Need help wih \expandafter

In OpTeX there is a macro \addto which adds some text to the definition of another macro. It is defined like this: \long\def \addto #1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}. Why are all ...
horro's user avatar
  • 171
1 vote
1 answer
137 views

Adding footnotes to columns in Optex

Accorging to this answer, it's possible to add footnotes to columns in Optex. Although I have a vague idea about what the author has in mind, where/how exactly do I add \penalty-10013 and \penalty-...
user574859's user avatar
4 votes
2 answers
554 views

How to use mlmodern fonts with Plain TeX or OpTeX?

I would like to systematically use mlmodern fonts with Plain TeX and even OpTeX, but I am unable to convert the code of mlmodern.sty into a code which could be understood by the tex or optex ...
Siminore's user avatar
  • 583
0 votes
0 answers
63 views

Running headers in Optex

I've tried to adapt running heads from Opmac, and also from the ctustyle, but it didn't work. I've successfully adapted some macros from the above thus: \_def\_printchap #1{\_vfill\_supereject \_vglue\...
user574859's user avatar
0 votes
1 answer
57 views

Print full bibliography citation entries in text (optex iso style)

Sometimes it is nice to print the full reference "on the spot", instead of in a reference section, like the fullcite command (or the verbose style) in biblatex: \fullcite[knuth] --> Knuth,...
user574859's user avatar
3 votes
1 answer
149 views

Optex: How to repeat hyphen on next line when hyphenating prehyphenated words automatically?

In Czech, many words (e.g. compound adjectives like modro-zelený) contain a hyphen. When these words are hyphenated, the hyphen is supposed to repeat on the next line to distinguish the meaning of ...
winety's user avatar
  • 33
3 votes
2 answers
205 views

Line numbers for Optex

I tried to run this answer (using edmac) with optex but it failed. I know that Optex has the \ttline macro, but still couldn't find out how to number text lines. I started creating a simple macro that ...
user574859's user avatar
4 votes
1 answer
148 views

Modify footnote properties in optex

How do I modify the behavior of the footnote line and text with optex? I'd like to change the width and height of the rule, and the footnotes to hang thus: ¹ Text text text text text text text ...
user574859's user avatar
10 votes
2 answers
1k views

Why doesn't LaTeX implement single pass references?

Example: \documentclass{article} \begin{document} \section{Power series}\label{ps} \begin{equation} \label{eq} \sum_{i=0}^\infty a_i x^i. \end{equation} The equation \ref{eq} is a typical power ...
User's user avatar
  • 2,530
1 vote
2 answers
169 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 ...
User's user avatar
  • 2,530
1 vote
1 answer
579 views

Font extensions and conversion

In the mtpro2 font package there are various kinds of font related files: under type1 there are *.pfm and *.pfb files; under tfm some *.tfm files (TeX font metrics?). There is a also a TeX file ...
User's user avatar
  • 2,530