diff options
Diffstat (limited to 'Master/texmf-dist/tex/csplain/opmac/opmac.tex')
-rw-r--r-- | Master/texmf-dist/tex/csplain/opmac/opmac.tex | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac.tex b/Master/texmf-dist/tex/csplain/opmac/opmac.tex index 263d8ed0a83..9bcdea6a2ea 100644 --- a/Master/texmf-dist/tex/csplain/opmac/opmac.tex +++ b/Master/texmf-dist/tex/csplain/opmac/opmac.tex @@ -5,7 +5,7 @@ %% The history of versions is at the end of this file, after \endpinput \ifx\OPmacversion\undefined \else \endinput \fi -\def\OPmacversion{Jun. 2019} +\def\OPmacversion{Jul. 2019} \immediate\write16{This is OPmac (Olsak's Plain macros), version <\OPmacversion>} %%%%%%%%%%%%%% Basic macros, sec. 3.1 in opmac-d.pdf @@ -861,32 +861,38 @@ \def\White{\setcmykcolor{0 0 0 0}} \def\Grey{\setcmykcolor{0 0 0 0.5}} \def\LightGrey{\setcmykcolor{0 0 0 0.2}} -\def\Black{\setcmykcolor{0 0 0 1}} +\def\Black{\setcolor{\pdfblackcolor}} -\def\setcmykcolor#1{\global\let\ensureblacko=\ensureblackoA +\def\setcmykcolor#1{\setcolor{\formatcmyk{#1}}} +\def\setrgbcolor#1{\setcolor{\formatrgb{#1}}} +\def\formatcmyk#1{#1 k #1 K} +\def\formatrgb#1{#1 rg #1 RG} + +\def\setcolor#1{\global\let\ensureblacko=\ensureblackoA \iflocalcolor \edef\currentcolor{#1}\colorstackpush\currentcolor \aftergroup\colorstackpop \else \xdef\currentcolor{#1}\colorstackset\currentcolor \fi } -\def\pdfblackcolor{0 0 0 1} -\xdef\currentcolor{\pdfblackcolor} + +\def\pdfblackcolor{0 g 0 G} +\edef\currentcolor{\pdfblackcolor} \def\ensureblacko#1{#1} \def\ensureblackoA#1{\colorstackpush\pdfblackcolor #1\colorstackpop} \ifx\pdfcolorstackinit\undefined - \def\colorstackpush#1{\pdfliteral{#1 k #1 K}} + \def\colorstackpush#1{\pdfliteral{#1}} \def\colorstackpop{\colorstackpush\currentcolor} \let\colorstackset=\colorstackpush \else - \mathchardef\colorstackcnt=\pdfcolorstackinit page {0 g 0 G} - \def\colorstackpush#1{\pdfcolorstack\colorstackcnt push{#1 k #1 K}} + \mathchardef\colorstackcnt=0 % Implicit stack usage + \def\colorstackpush#1{\pdfcolorstack\colorstackcnt push{#1}} \def\colorstackpop{\pdfcolorstack\colorstackcnt pop} - \def\colorstackset#1{\pdfcolorstack\colorstackcnt set{#1 k #1 K}} + \def\colorstackset#1{\pdfcolorstack\colorstackcnt set{#1}} \fi -\addprotect\setcmykcolor \addprotect\localcolor \addprotect\longlocalcolor +\addprotect\setcolor \addprotect\localcolor \addprotect\longlocalcolor \ifpdftex\else - \def\setcmykcolor#1{} \def\pdfliteral#1{} + \def\setcolor#1{} \def\pdfliteral#1{} \fi \def\draft{\addto\prepghook{\draftbox{\tenbf DRAFT}\nointerlineskip}} @@ -1307,19 +1313,17 @@ \newcount\fnotenumlocal \newif\iflocfnum \locfnumtrue -\long\def\fnote#1{\global\advance \fnotenum by1 \leavevmode +\long\def\fnoteG#1#2{\global\advance \fnotenum by1 + \ifx\relax#1\relax\else\leavevmode\fi \iflocfnum \openref\wref\Xfnote{}% \isdefined{fn:\the\fnotenum}\iftrue \else\opwarning{unknown \noexpand\fnote mark. TeX me again}\fi\fi - \fnmarkx{\fnotehook\typobase\typoscale[800/800]\vfootnote\fnmarkx{#1}}% -} -\def\fnotemark#1{{\advance\fnotenum by#1\relax - \isdefined{fn:\the\fnotenum}\iftrue\thefnote - \else$^?$\opwarning{unknown \string\fnotemark. TeX me again}\fi}% -} -\long\def\fnotetext#1{\global\advance \fnotenum by1 \openref\wref\Xfnote{}% - {\everypar={}\fnotehook\typobase\typoscale[800/800]\vfootnote\fnmarkx{#1}}% + #1{\everypar={}\fnotehook\typobase\typoscale[800/800]\vfootnote\fnmarkx{#2}}% } +\def\fnote{\fnoteG\fnmarkx} +\def\fnotetext{\fnoteG{}} + +\def\fnotemark#1{{\advance\fnotenum by#1\relax \fnmarkx}} \def\fnmarkx{\isdefined{fn:\the\fnotenum}\iftrue\thefnote\else$^?$\fi} \def\thefnote{$^{\locfnum}$} \def\locfnum{\csname fn:\the\fnotenum\endcsname} @@ -1855,7 +1859,8 @@ Mar. 2019 Style declarations \report and \letter added. \fnote corrected: \iflocfnum\openref. May 2019 \table declarator () added. Jun. 2019 \mspan improved. - +Jul. 2019 \fnoteG introduced, \fnotemark bug fixed (if \runningfnotes). + \colorstackcnt=0 used, \setrgbcolor, \formatcmyk, \formatrgb introduced. %%%%%%%%%%%%%% End of opmac.tex |