Is there code to make the microtypography primitives, particularly font expansion, usable with the plain TeX format running with native PDF-output engines (namely pdfTeX and LuaTeX)?

I don't think the microtype package could feasibly be made to work with plain, since it's necessarily tied to the LaTeX font setup, in my understanding.

I'm not looking for a general solution. I basically just want cmr to be microtype-ized to reduce editing of TUGboat articles purely to deal with overfull boxes. (The nicer output is a pleasant side effect.)

XeTeX's lack of support for font expansion makes it uninteresting to me. (As far as I know, there isn't any feasible way to support font expansion with DVI output, but if someone is up for that major development effort, great. :).

Maybe it's been done and I don't know about it? Maybe it's simple and I'm being too scared off by the loads of definitions necessary?

  • 4
    Serious question: why does anybody bother with plain TeX in this day and age?
    – Ingmar
    Jun 5, 2022 at 17:45
  • 6
    @Ingmar Because somebody can feel that LaTeX is too complicated and bad designed.
    – wipet
    Jun 5, 2022 at 17:54
  • Sure, they can feel that way. But even if it were true (reserving judgement here), I still think Lamports macros make things much easier. But to each his own, obviously; the same has been said about Word, after all.
    – Ingmar
    Jun 5, 2022 at 17:57
  • 6
    As one of the TUGboat editors, I have to accept what authors send me. And a few authors still use plain TeX. For example, when writing articles about how TeX "really" works (Udo Wermuth's series of articles), it would be completely infeasible to use LaTeX for handling the highly TeXnical examples.
    – Karl Berry
    Jun 5, 2022 at 20:58
  • 2
    @Ingmar, I used to think like that for more than a decade. Latex is easier if you don't need to tweak things by yourself, which most people I know do need, and if everything goes according to plan. Otherwise, you add a package, learn how the package works by reading a long doc... even for elementary stuff like margins you need the geometry package. Then Optex came out -- easier to type basic stuff, uses otf fonts etc. Comparing beamer with optex shows how simple and clean it is. Anyone has his preferences, though.
    – user574859
    Jun 6, 2022 at 12:40

2 Answers 2


If you're only in interested in expansion, then there's actually no reason to be scared. All you need to do is something like this:

\input iftex.sty
    \expandglyphsinfont#1 20 20 1\relax}
    \pdffontexpand#1 20 20 1 autoexpand\relax}
\input story

For protrusion, there used to be Thanh's protcode.tex, which provided some settings. It was removed (unjustly, IMO) from texlive in 2016, but still can be found in an unrelated package.

Letterspacing is available with the letterspace package (part of microtype), which also works with plain tex.

  • Thank you Robert! That is exactly what I was looking for. I just couldn't discern the recipe well enough.
    – Karl Berry
    Jun 5, 2022 at 20:58
  • 1
    As for protcode, I'll get Thanh's ok and restore it to TeX Live. Thanks for mentioning it.
    – Karl Berry
    Jun 5, 2022 at 20:59

You can see the OpTeX trick http://petr.olsak.net/optex/optex-tricks.html#fontexpand where the general idea is presented as an example. The font must be loaded before the settings, \_tenrm in this example.

The problem is that you must set parameters to many characters individually which cannot be done simply at few lines of the code. This was done in the package mte.opm (for OpTeX) linked from the mentioned OpTeX trick.

I don't know about existence of pure solution for Plain TeX only, but you can inspire from the mte.opm package if you want.

  • 1
    Thanks Petr (if that's you). I remembered from editing your article about supporting microtype stuff, but the whole "set parameters to many characters individually" stuff is a barrier.
    – Karl Berry
    Jun 5, 2022 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .