[tex-eplain] Thank you Laurence for glyph_test example; eplain won't load compatible packages

Laurence.Finston at gmx.net Laurence.Finston at gmx.net
Wed Oct 11 18:05:47 CEST 2023


> ASIDE: Thanks again, Laurence! Though your glyph test isn't very long, there are several plain-TeX techniques which are exactly some of the things I wish to learn (custom paper size, font-loading). [You said you don't use LaTeX, so FYI, \Blue is defined in the package *color*, too.]

You're welcome.  There's not much more to learn about custom paper size and font-loading.  You set the dimensions you want in the \special command and you set the same values for \vsize and \hsize.  It is important to remember that \voffset and \hoffset are both set to 1in by default, so I usually write \advance\hoffset by -1in and \advance\voffset by -1in to get them to be 0 first.  For some reason, it doesn't seem to work to just reset their values.  I haven't tested this in a while, and I don't know why this should be so, but I seem to remember that it still didn't work the last time I tested it.

To load a font, say cmr17, you write this:  \font\largerm=cmr1 
To find the names of the fonts, you look in the directory where there are files with those names.  They can be the METAFONT sources or TFM files or PK files.  I usually look for the MF sources.  On my system, the MF sources for the Computer Modern fonts are here:  /usr/share/texlive/texmf-dist/fonts/source/public/cm

Then, you can use this font in your document like this:  {\largerm abc}

It makes sense that the boxes around the links aren't blue by default.  If I remember correctly, if I use \Blue to make the links blue, then the boxes are also blue.  I'm pretty certain that they are just rules, i.e., made using \vrule or \hrule.  I can't think of what else they could be.  Since it is not usual for links to be surrounded by rules anywhere else, I just turned them off and if you hadn't brought them up, would never have thought about them again.

One thing to consider is that I don't think the authors of LaTeX packages necessarily test changes to make sure that they are still compatible with eplain, so what worked in the past may not work in the present.  I also don't think that compatibility with LaTeX packages is necessarily a goal of eplain, but that would be for Karl to say.

\protected is definitely not defined in plain tex and my guess would be that it is intended to restrict the scope of definitions.  In my opinion, this wouldn't really fit in with the concept of plain TeX, where definitions are either local or global.  However, maybe it does something else.

Again, in my opinion, generally speaking, the concepts of plain TeX and LaTeX are not compatible.  LaTeX offers a lot of functionality but there are a lot of restrictions whereas TeX has very few restrictions and gives you the tools to implement functionality, but by itself and with the plain format, doesn't predefine nearly as much functionality as LaTeX does.  
If one wants a "plug-and-play" solution, I would say go with LaTeX.  If one wants a powerful tool for implementing one's own ideas, which does however require a certain amount of effort to learn, I would say go with plain TeX.  It's possible that not everybody will agree with this.

Calling it "plain TeX" is a little awkward.  Of course, the program behind LaTeX is also TeX and just "TeX" alone would mean just using the primitives, which wouldn't really be practical.  What I mean is TeX with the plain format, with or without some macro packages such as eplain and/or macros of my own.


> Gesendet: Mittwoch, 11. Oktober 2023 um 15:59 Uhr
> Von: terry.s at Safe-mail.net
> An: tex-eplain at tug.org
> Betreff: [tex-eplain] Thank you Laurence for glyph_test example; eplain won't load compatible packages
>
> Hi Laurence and Karl,
> 
> \enablehyperlinks[dvipdfm] (by itself):
>      a) turned the borders created by *eplain* around links from blue to black.
>      b) allowed me to use  \hlopts{bwidth=0} to remove link borders entirely.
>      c) lets me create a manual hyperlink with \hlstart ... \hlend.
> 
> Per the *eplain* manual and a 2005 article in TUGboat, *eplain* "uses" (which I took to mean "loads") "miniltx.tex" + *color*
>  ... that's a (partial) misunderstanding on my part; it does load "miniltx.tex". So I tried to load *color*. To quote the article:
> 
> "The following LATEX packages (all on CTAN) are known to work under Eplain:
> • autopict (LATEX picture mode);
> • color (color support);
> • graphics, graphicx (graphics inclusion);
> • psfrag (overlay LATEX onto EPS figures);
> • url (smart line breaking for URLs).
> 
> It makes sense *color* may load by default because link borders are blue by default (but it doesn't). There's color support it graphics, too (again if I understand correctly). So under the theory that the 'dvipdfm' option clashes, I removed it. With or without that option, I cannot load *color*, *graphics* or *graphicx* without error. ("miniltx.tex" is loaded by *eplain*.) *url* loaded fine all along. I have no need for *autopict* nor *psfrag* at the moment.
> 
> I visited the 3DLDF page at https://www.gnu.org/software/3dldf/glyphs.html# (and downloaded "glyph_test.tex")
> I skimmed it and played with some link/color stuff (dvi-- vs. eplain). \input colordvi allows me to use \Blue as described. (So I'll be able to create a shortcut to \url to add the \Blue tag there, too.) \Blue would alternatively be defined by *color* if I could load it.
> 
> ASIDE: Thanks again, Laurence! Though your glyph test isn't very long, there are several plain-TeX techniques which are exactly some of the things I wish to learn (custom paper size, font-loading). [You said you don't use LaTeX, so FYI, \Blue is defined in the package *color*, too.]
> 
> *-*-*-*
> Here is the manually-coded hyperlink (we can continue to use "btxmac-tex-test.tex"):
>      \hlstart{}{bwidth=0}{https://tug.org/pracjourn/}\Blue{https://tug.org/pracjourn/}\hlend
> 
> As to the packages compatible with *eplain* here are the errors:
> 
> •   (TO BE EXPECED) With neither *color* nor "colordvi.tex" loaded:
> ! Undefined control sequence.
> l.32 ...bwidth=0}{https://tug.org/pracjourn/}\Blue
>                                                   {https://tug.org/pracjourn..
> 
> •   (NO ERROR) If I load "colordvi.tex" it works fine. \Blue works fine and clickable link text is blue.
> 
> •   If I load *color* (whether I attempt to use \Blue or not, just caused by loading):
> ! Undefined control sequence.
> l.103 \protected
>                 \def\textcolor#1#{\@textcolor{#1}}
> 
> •   If I load either *graphics* or *graphicx* (my document has no graphics or drawings, this is merely caused by loading):
> ! Undefined control sequence.
> l.120 \protected
>                 \def\includegraphics{%
> 
> I need sleep!
> Terry S.
> 
>



More information about the tex-eplain mailing list.