ho-tex / soul

LaTeX package "soul" for letterspacing, underlining, striking out and other evil things
LaTeX Project Public License v1.3c
5 stars 1 forks source link

plain TeX (re)support #12

Open aminophen opened 6 months ago

aminophen commented 6 months ago

Starting from v3.0 soul.sty cannot compile on plain TeX:

\input soul.sty
\sodef{\so}{}{0.15em}{0.5em}{0.5em}
\end
! Undefined control sequence.
\sodef #1#2#3#4#5->\DeclareRobustCommand 
                                         *#1{\SOUL@sosetup \def \SOUL@preamb...
l.2 \sodef{\so}{}{0.15em}{0.5em}{0.5em}

?

Noticed this on testing the music program 'autosp' test file (quod4.tex) from tl-svn/Build/source/utils/autosp.

u-fischer commented 6 months ago

Hm right. This here in soul.sty destroys the definitions again:

\ifx\documentclass\@undefined 
  \expandafter\ifx\csname SOUL@\endcsname\relax
    \let\SOuL@orgDeclareRobustCommand\DeclareRobustCommand
    \let\SOuL@orgnewcommand          \newcommand
    \let\SOuL@orgDeclareOption       \DeclareOption
    \let\SOuL@orgPackageError        \PackageError
    \def\SOuL@restorelatexcmds{%
      \let\DeclareRobustCommand\SOuL@orgDeclareRobustCommand
      \let\newcommand          \SOuL@orgnewcommand
      \let\DeclareOption       \SOuL@orgDeclareOption
      \let\PackageError        \SOuL@orgPackageError
    }%
    \input soul-ori.sty\relax
    \SOuL@restorelatexcmds
  \fi

That is inherited from soulutf8 and it means that in contradiction to the code documentation soulutf8 never worked with plain. We probably could change soul so that in plain it simply loads soul-ori.sty and then quits.