Suppose person A writes a short bit of TeX code, and sends it to person B for inclusion as part of a larger document. The snippet written by A doesn't use anything fancy: no cross-references, citations, sectioning, footnotes, etc. etc. But it has math, of course, and minimal text formatting commands like bold, italics, enumerated lists, maybe tables, etc.
The problem is that A and B use different flavors of TeX. I believe that A uses Plain TeX and B uses LaTeX, then usually B can just paste A's code in and it will work, since most of the text-formatting commands in Plain TeX (e.g. {\bf bold}) are actually TeX primitives and hence also available in LaTeX even if not the "recommended" style.
If A uses LaTeX and B uses Plain TeX there is more of a problem, since for instance \textbf{bold} doesn't exist in Plain TeX. But of course in this case, B can just define a simple version of it herself. My question is whether I can save B this work? Where can I find a short, quick and dirty collection of macro definitions that a Plain TeX user can paste at the top of her document that will enable her to paste in simple fragments of LaTeX, using no more than basic text formatting commands and (say) list and tabular environments, and have them come out looking at least vaguely reasonable? Obviously if the LaTeX code uses anything fairly complicated, then there is no answer to this (short of pasting in or reimplementing all of LaTeX), but it seems that for very simple code it should be possible, and maybe someone has done it before.




\rmfamily \sffamily \ttfamily \mdseries \bfseries \upshape \itshape \slshape \scshape \normalfont \textrm \textsf \texttt \textmd \textbf \textup \textit \textsl \textsc \rm \sf \tt \md \bf \up \it \sl \scWhat is missing?:- size commands:
- scaling
- math support is poor
– jarnosc Sep 14 '17 at 22:36\large, \hugeetc. Use\fontsize{20pt}instead.\bfis not a tex primitive (and not defined by default in latex) so even using plain in latex is not always guaranteed. The other direction is just as hard as you want to make it,\mathbfis easy to define, an ams alignment less so. – David Carlisle Sep 14 '17 at 22:54amsmathis derived from ams-tex there might be some hope there, but the thought of trying to implementtabularin plain tex strikes terror in me. there are some list-like features in ams-tex (roster), but no automatic numbering. i'm not familiar enough with eplain to know whether that holds promise. – barbara beeton Sep 15 '17 at 02:53\bf, thanks for the information. I guess it's just that all the standard LaTeX documentclasses define it then? I've never seen an example where it doesn't work in LaTeX. – Mike Shulman Sep 15 '17 at 10:12enumeratefor instance), but not necessarily its output: as I said, the output only needs to look "vaguely reasonable" (e.g. in the case ofenumerateto produce an enumerated list of some sort). – Mike Shulman Sep 18 '17 at 04:05