5

How can I get something like the lesssim symbol in Plain TeX? I found a comprehensive-looking list of Plain TeX codes online, but it didn't include anything that did what lesssim does.

6
  • 2
    Welcome to TeX.SE...
    – MadyYuvi
    Dec 26, 2022 at 6:04
  • what "comprehensive looking list of Plain TeX codes online" did you find? perhaps it is not as "comprehensive" or "updated" as it seems, and needs to be worked on...
    – jarnosc
    Dec 27, 2022 at 5:31
  • @jarnosz, it would have been nwalsh.com/tex/texhelp/Plain.html#math Dec 27, 2022 at 14:36
  • I see: that document is indeed very old (1994: almost 30 yo), and covers only Knuth's Plain canonical definition, so even if autoritative, it is very incomplet. As for your question, I don't think even LaTeX3 covers the full AMSmath fonts without some sort of extension to the "core" math support.
    – jarnosc
    Dec 27, 2022 at 23:35
  • 1
    I fear there is no such a thing, even for LaTeX or ConTeXt, which have a far more larger user base: the problem is that, since the system is designed to be extensible, every user/developer may add their own concocted macro packages; what you found was a listing of the base Plain TeX provided by Knuth's plain.tex format; and that is a good starting point.
    – jarnosc
    Dec 30, 2022 at 20:35

3 Answers 3

11

Hope this may helps you:

\input amssym

$\lesssim$

\bye
1
  • 2
    Well, that was easy! Dec 26, 2022 at 14:10
4

You can use alignment to get something close:

\def\lesssimA#1#2{\mathrel{\vcenter{\offinterlineskip%
    \ialign{\hfil##\hfil\cr$#1<$\cr$#1\sim$\cr}%
}}}

\def\lesssim{\mathpalette\lesssimA{}}

$A\lesssim B$

lesssim example

2
  • This looks good, but the idea of @Mady looks much simpler. Dec 26, 2022 at 14:11
  • 1
    may come in handy if you don't have access to the amsmath fonts.
    – jarnosc
    Dec 27, 2022 at 5:25
1

I use optex for that. Have a look here: https://petr.olsak.net/ftp/olsak/optex/optex-math.pdf at page 11.

$$ a\lesssim b $$

enter image description here

3
  • 3
    Thanks. But this means I have to download/install optex, when what I'd rather do is write some code that will typeset in Plain TeX and give me something close to what lesssim would give me under optex or LaTeX. Dec 26, 2022 at 4:08
  • 1
    @GerryMyerson Do you have a TeX distribution with plain TeX only? I see that typical TeX distributions include plain TeX, LaTeX, OpTeX, you don't need to install it separately.
    – wipet
    Dec 26, 2022 at 6:08
  • 1
    @wipet, I'm using TeXShop 3.62. I see where it includes LaTeX, but I don't see any mention of OpTeX. I'm avoiding LaTeX because the document I'm working on has Plain TeX constructions that would be broken if I tried to typeset them with LaTeX. Dec 26, 2022 at 14:04

You must log in to answer this question.

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