summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/csplain/opmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-13 22:09:47 +0000
committerKarl Berry <karl@freefriends.org>2020-02-13 22:09:47 +0000
commita577698d46014ac3caa5d673e244c268dac50ab0 (patch)
treea3148f3b7a723ba2d78e8005374419830592d48a /Master/texmf-dist/tex/csplain/opmac
parent65357d7b50fc9ef5ca51ada17c49b3d6778fd8c6 (diff)
csplain (13feb20)
git-svn-id: svn://tug.org/texlive/trunk@53766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/csplain/opmac')
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex5
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac.tex47
2 files changed, 29 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex b/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex
index 1c189d00bb7..d711d2f0788 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex
@@ -53,9 +53,10 @@
% \pdfcolorstack is implemented by \special{color push <text>} and \special{color pop}
-\def\colorstackpush#1{\colorspecialinit \special{color push cmyk #1}}
+\def\formatcmyk#1{cmyk #1} \def\formatrgb#1{rgb #1} \def\pdfblackcolor{gray 0}
+\def\colorstackpush#1{\colorspecialinit \special{color push #1}}
\def\colorstackpop{\special{color pop}}
-\def\colorstackset#1{\colorspecialinit \special{color pop}\special{color push cmyk #1}}
+\def\colorstackset#1{\colorspecialinit \special{color pop}\special{color push #1}}
\def\colorspecialinit{\special{color push gray 0}\gdef\colorspecialinit{}}
%\def\special#1{\message{special:{#1}}}
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