summaryrefslogtreecommitdiff
path: root/macros/eplain/tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-07 03:03:15 +0000
committerNorbert Preining <norbert@preining.info>2022-10-07 03:03:15 +0000
commitbbbfa0a90645d4da46b1492f6513b28a01eb78da (patch)
treedcbf82e9f2bd50ac7596114690ad31ca7a6dbf8c /macros/eplain/tex
parent678708e90ffe138885ed8c06b6780d491b80fae5 (diff)
CTAN sync 202210070303
Diffstat (limited to 'macros/eplain/tex')
-rw-r--r--macros/eplain/tex/btxmac.tex37
-rw-r--r--macros/eplain/tex/eplain.tex249
2 files changed, 220 insertions, 66 deletions
diff --git a/macros/eplain/tex/btxmac.tex b/macros/eplain/tex/btxmac.tex
index 9fd3e20415..a402744947 100644
--- a/macros/eplain/tex/btxmac.tex
+++ b/macros/eplain/tex/btxmac.tex
@@ -1,15 +1,15 @@
%% @texfile{
%% author = "Karl Berry and Oren Patashnik",
-%% version = "0.99p",
-%% date = "30 May 2019",
+%% version = "0.99q",
+%% date = "2 October 2022",
%% filename = "btxmac.tex",
%% address = "tex-eplain@tug.org",
%% supported = "yes",
%% docstring = "Defines macros that make BibTeX work with plain TeX",
%% }
% BibTeX-for-TeX macros for BibTeX 0.99c, TeX 3.0 or later.
-% Copyright 1990, 1991, 1992, 1995, 2005, 2007, 2013, 2016, 2019 Karl Berry &
-% Oren Patashnik.
+% Copyright 1990, 1991, 1992, 1995, 2005, 2007, 2013, 2016, 2019, 2022
+% Karl Berry & Oren Patashnik.
%
% Unlimited copying and redistribution of this file are permitted as
% long as this file is not modified. Modifications (and redistribution
@@ -158,7 +158,9 @@
% conflict with Babel's file plain.def.
% 30-May-19 0.99p, one missed rename of \@continuenewcommand to \@btx...,
% that made \providecommand fail.
-%
+% 02-Oct-22 0.99q, avoid using unprefixed control sequence \cs,
+% which conflicts with TUGboat's \cs. Doc updates.
+%
% The LaTeX-related commands defined in this file include
% (a) the four commands that a user types (\bibliography,
% \bibliographystyle, \cite, and \nocite);
@@ -211,10 +213,10 @@
%
% \biblabelwidth
%
-% There are fifteen other control sequences (explained later in more detail)
+% There are sixteen other control sequences (explained later in more detail)
% that the macros of this file will use if you define them---you should
% define them after the \input btxmac command but before the \bibliography
-% command. The first six begin with `\bbl' and affect fonts, spacing,
+% command. The first seven begin with `\bbl' and affect fonts, spacing,
% perhaps other characteristics of the bibliography, and which .bbl files
% get read; the next five begin with `\biblabel' and determine how labels
% are formatted in the bibliography; and the last four begin with `\print'
@@ -223,6 +225,7 @@
% \bblem
% \bblfilebasename
% \bblhook
+% \bblitemhook
% \bblnewblock
% \bblrm
% \bblsc
@@ -275,10 +278,10 @@
%
% Make an outer definition into an inner one (due to Chris Thompson).
% The arguments should be the control sequence to be defined, and the
-% new of the \outer control sequence, as characters; the control
+% name of the \outer control sequence, as characters; the control
% sequence #1 is defined to be just the same as \csname#2\endcsname, but
-% not \outer. For example, \@innerdef\innernewcount{newcount} would
-% define \innernewcount to be a non-outer version of \newcount.
+% not \outer. For example, \@innerdef\innernewcount{newcount}
+% defines \innernewcount to be a non-outer version of \newcountb.
%
\def\@innerdef#1#2{\edef#1{\expandafter\noexpand\csname #2\endcsname}}%
%
@@ -307,11 +310,11 @@
\fi
%
%
-% The following macro \@futurenonspacelet (from the TeXbook) behaves
+% The following macro \@futurenonspacelet (from The TeXbook) behaves
% essentially like \futurelet except that it discards any implicit or
% explicit space tokens that intervene before a nonspace is scanned:
%
-\long\def\@futurenonspacelet#1{\def\cs{#1}%
+\long\def\@futurenonspacelet#1{\def\@btxcs{#1}%
\afterassignment\@stepone\let\@nexttoken=
}%
\begingroup % The grouping here avoids stepping on an outside use of `\\'.
@@ -319,8 +322,8 @@
\\ % now \@stoken is a space token (\\ is a control symbol, so that
% space after it is seen).
\endgroup
-\def\@stepone{\expandafter\futurelet\cs\@steptwo}%
-\def\@steptwo{\expandafter\ifx\cs\@stoken\let\@@next=\@stepthree
+\def\@stepone{\expandafter\futurelet\@btxcs\@steptwo}%
+\def\@steptwo{\expandafter\ifx\@btxcs\@stoken\let\@@next=\@stepthree
\else\let\@@next=\@nexttoken\fi \@@next}%
\def\@stepthree{\afterassignment\@stepone\let\@@next= }%
%
@@ -796,11 +799,11 @@
\def\@btxcommandname{#1}%
%
\expandafter\ifx\@btxcommandname \@undefined
- \let\cs=\@btxcontinuenewcommand % undefined, so we'll define it
+ \let\@btxcs=\@btxcontinuenewcommand % undefined, so we'll define it
\else
- \let\cs=\@gobble % already defined, so ignore it
+ \let\@btxcs=\@gobble % already defined, so ignore it
\fi
- \@getoptionalarg\cs
+ \@getoptionalarg\@btxcs
}%
\fi
%
diff --git a/macros/eplain/tex/eplain.tex b/macros/eplain/tex/eplain.tex
index 6cff16a9eb..4a9a775e0f 100644
--- a/macros/eplain/tex/eplain.tex
+++ b/macros/eplain/tex/eplain.tex
@@ -1,10 +1,10 @@
%% @texfile{
%% author = "Karl Berry, Steven Smith, Oleg Katsitadze, and others",
-%% version = "3.11",
-%% date = "Sat Jul 4 08:41:11 PDT 2020",
+%% version = "3.12",
+%% date = "Wed Oct 5 15:43:01 PDT 2022",
%% filename = "eplain.tex",
-%% email = "bug-eplain@tug.org",
-%% checksum = "4139 9298 134361",
+%% email = "tex-eplain@tug.org",
+%% checksum = "4290 9524 139018",
%% codetable = "ASCII",
%% supported = "yes",
%% docstring = "This file defines macros that extend and expand on
@@ -13,7 +13,7 @@
%% files for author credits, etc. The original sources
%% can be found in Eplain sources in your TeX
%% distribution, on CTAN or on Eplain's home page at
-%% http://tug.org/eplain. Please base diffs or
+%% https://tug.org/eplain. Please base diffs or
%% other contributions on xeplain.tex, not the
%% stripped-down eplain.tex.",
%% }
@@ -23,53 +23,204 @@
\expandafter\let\expandafter\next\csname endinput\endcsname
\fi
\next
+%% iftex TeX engine tests
+%% LaTeX3 Project
%%
-%% This is file `ifpdf.sty',
-%% generated with the docstrip utility.
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version.
%%
-%% The original source files were:
+%% Using ideas from:
%%
-%% ifpdf.dtx (with options: `package')
-%%
-%% Source File: ifpdf.dtx
-%% Copyright 2016 Heiko Oberdiek and LaTeX3 project
-%%
-%% This file may be distributed under the terms of the LPPL.
-%% See README for details.
-\ifx\ProvidesPackage\undefined
-\def\next#1#2[#3]{\wlog{#2 #3}}
-\expandafter\next\fi
-\ProvidesPackage{ifpdf}
-[2016/04/04 v3.0 Provides the ifpdf switch]
-\expandafter\ifx\csname ifpdf\endcsname\relax
- \csname newif\expandafter\endcsname\csname ifpdf\endcsname
+%% ifetex Martin Scharrer
+%% ifxetex Will Robertson
+%% iftex 0.2 Persian TeX Group / Vafa Khalighi
+%% ifluatex ifvtex Heiko Oberdiek
+%% ifptex Takayuki YATO
+%% ifpdf Heiko Oberdiek and LaTeX3 Project
+\csname IFTEX\string @loaded\endcsname
+\catcode123=1
+\catcode125=2
+\catcode35=6
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
+ \ProvidesPackage{iftex}[2022/02/03 v1.0f TeX engine tests]
+\fi
+\expandafter\chardef\csname IFTEX\string @atcatcode\endcsname\catcode64
+\catcode 64 11
+\def\IFTEX@Require#1#2#3{%
+ #1\else
+ \newlinechar 64\relax
+ \errorcontextlines -1\relax
+ \immediate\write20{@
+ ********************************************@
+ * #2 is required to compile this document.@
+ * Sorry!@
+ ********************************************}%
+ \batchmode\read -1 to \@tempa
+ #3%
+}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+ \let\IFTEX@protected\relax
\else
- \ifx\pdftrue\undefined
- \ifx\PackageError\undefined
- \begingroup\def\PackageError#1#2#3{\endgroup\errmessage{#2}}
+ \let\IFTEX@protected\protected
+\fi
+ {
+ \catcode34 12 % "
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode46 12 % .
+ \expandafter\ifx\csname directlua\endcsname\relax\else
+ \directlua{tex.enableprimitives("IFTEX@", {"detokenize","protected"})}
\fi
- \PackageError{ifpdf}{incompatible ifpdf definition}{}
- \expandafter\expandafter\expandafter
- \fi
+ }
+\IFTEX@protected\def\RequireeTeX{\IFTEX@Require\ifetex{eTeX}\fi}
+\IFTEX@protected\def\RequirePDFTeX{\IFTEX@Require\ifpdftex{pdfTeX}\fi}
+\IFTEX@protected\def\RequireXeTeX{\IFTEX@Require\ifxetex{XeTeX}\fi}
+\IFTEX@protected\def\RequireLuaTeX{\IFTEX@Require\ifluatex{LuaTeX}\fi}
+\IFTEX@protected\def\RequireLuaHBTeX{\IFTEX@Require\ifluahbtex{LuaHBTeX}\fi}
+\IFTEX@protected\def\RequirepTeX{\IFTEX@Require\ifptex{pTeX}\fi}
+\IFTEX@protected\def\RequireupTeX{\IFTEX@Require\ifuptex{upTeX}\fi}
+\IFTEX@protected\def\RequirepTeXng{\IFTEX@Require\ifptexng{pTeX-ng}\fi}
+\IFTEX@protected\def\RequireVTeX{\IFTEX@Require\ifvtex{VTeX}\fi}
+\IFTEX@protected\def\RequireAlephTeX{\IFTEX@Require\ifalephtex{Aleph}\fi}
+\IFTEX@protected\def\RequireTUTeX{\IFTEX@Require\iftutex{LuaTeX or XeTeX}\fi}
+\IFTEX@protected\def\RequireTexpadTeX{\IFTEX@Require\iftexpadtex{TexpadTeX}\fi}
+\IFTEX@protected\def\RequireHINT{\IFTEX@Require\ifhint{HINT}\fi}
+\def\IFTEX@let#1#2{%
+ \expandafter\let\csname if#1\expandafter\endcsname
+ \csname if#2\endcsname}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname numexpr\endcsname\relax
+ \IFTEX@let{etex}{false}
+\else
+ \IFTEX@let{etex}{true}
\fi
-\let\ifpdf\iffalse
-\ifx\directlua\undefined
+\IFTEX@let{eTeX}{etex}
\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdfoutput\endcsname\relax
+\expandafter\ifx\csname pdftexversion\endcsname\relax
+ \IFTEX@let{pdftex}{false}
\else
- \ifnum\pdfoutput>0 %
- \pdftrue
+ \IFTEX@let{pdftex}{true}
+\fi
+\IFTEX@let{PDFTeX}{pdftex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname XeTeXrevision\endcsname\relax
+ \IFTEX@let{xetex}{false}
+\else
+ \IFTEX@let{xetex}{true}
+\fi
+\IFTEX@let{XeTeX}{xetex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \IFTEX@let{luatex}{false}
+\else
+ \IFTEX@let{luatex}{true}
+\fi
+\IFTEX@let{LuaTeX}{luatex}
+\IFTEX@let{luahbtex}{false}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+\else
+ \directlua{\IFTEX@detokenize{
+ if(pcall(require, 'luaharfbuzz')) then
+ tex.print("\\let\\ifluahbtex\\iftrue ")
+ end
+ }}
+\fi
+\IFTEX@let{LuaHBTeX}{luahbtex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname kanjiskip\endcsname\relax
+ \IFTEX@let{ptex}{false}
+\else
+ \IFTEX@let{ptex}{true}
+\fi
+\IFTEX@let{pTeX}{ptex}
+\ifx\enablecjktoken \@undefined
+ \IFTEX@let{uptex}{false}
+\else
+ \IFTEX@let{uptex}{true}
+\fi
+\IFTEX@let{upTeX}{uptex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname ngbanner\endcsname\relax
+ \IFTEX@let{ptexng}{false}
+\else
+ \IFTEX@let{ptexng}{true}
+\fi
+\IFTEX@let{pTeXng}{ptexng}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname VTeXversion\endcsname\relax
+ \IFTEX@let{vtex}{false}
+\else
+ \IFTEX@let{vtex}{true}
+\fi
+\IFTEX@let{VTeX}{vtex}
+\IFTEX@let{alephtex}{false}
+\ifptex\else
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname omathchardef\endcsname\relax
+\else
+ \IFTEX@let{alephtex}{true}
+\fi
+\fi
+\IFTEX@let{AlephTeX}{alephtex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname Umathchardef\endcsname\relax
+ \IFTEX@let{tutex}{false}
+\else
+ \IFTEX@let{tutex}{true}
+\fi
+\IFTEX@let{TUTeX}{tutex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname TexpadTeXMode\endcsname\relax
+ \IFTEX@let{texpadtex}{false}
+\else
+ \IFTEX@let{texpadtex}{true}
+ \ifcase\TexpadTeXMode\relax
+ \or
+ \IFTEX@let{tutex}{true}
\fi
\fi
+\IFTEX@let{TexpadTeX}{texpadtex}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname HINTversion\endcsname\relax
+ \IFTEX@let{hint}{false}
\else
-\directlua{%
+ \IFTEX@let{hint}{true}
+\fi
+\IFTEX@let{HINT}{hint}
+\def\pdftrue{\let\ifpdf\iftrue}
+\def\pdffalse{\let\ifpdf\iffalse}
+\pdffalse
+\ifluatex
+\directlua{\IFTEX@detokenize{
if (tex.outputmode or tex.pdfoutput or 0) > 0 then
- tex.print('\string\\pdftrue')
+ tex.print('\\pdftrue')
end
-}
+}}
+\else
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfoutput\endcsname\relax
+\ifvtex
+ \ifnum\OpMode=3 %
+ \pdftrue
+ \fi
+\else
+ \iftexpadtex
+ \pdftrue
+ \fi
\fi
-%%
-%% End of file `ifpdf.sty'.
+\else
+ \ifnum\pdfoutput>0 %
+ \pdftrue
+ \fi
+\fi
+\fi
+\catcode64 \IFTEX@atcatcode
\def\makeactive#1{\catcode`#1 = \active \ignorespaces}%
\chardef\letter = 11
\chardef\other = 12
@@ -102,7 +253,6 @@ end
\def\@emptymarkA{\@emptymarkB}
\def\ifempty#1{\@@ifempty #1\@emptymarkA\@emptymarkB}%
\def\@@ifempty#1#2\@emptymarkB{\ifx #1\@emptymarkA}%
-\def\@gobbleminus#1{\ifx-#1\else#1\fi}%
\def\ifinteger#1{\ifcat_\ifnum9<1\@gobbleminus#1 _\else A\fi}%
\def\isinteger{TT\fi\ifinteger}%
\def\@gobblemeaning#1:->{}%
@@ -184,8 +334,8 @@ end
\fi
%% @texfile{
%% author = "Karl Berry and Oren Patashnik",
-%% version = "0.99p",
-%% date = "30 May 2019",
+%% version = "0.99q",
+%% date = "2 October 2022",
%% filename = "btxmac.tex",
%% address = "tex-eplain@tug.org",
%% supported = "yes",
@@ -207,15 +357,15 @@ end
\else
\def\@linenumber{\the\inputlineno:\space}%
\fi
-\long\def\@futurenonspacelet#1{\def\cs{#1}%
+\long\def\@futurenonspacelet#1{\def\@btxcs{#1}%
\afterassignment\@stepone\let\@nexttoken=
}%
\begingroup % The grouping here avoids stepping on an outside use of `\\'.
\def\\{\global\let\@stoken= }%
\\ % now \@stoken is a space token (\\ is a control symbol, so that
\endgroup
-\def\@stepone{\expandafter\futurelet\cs\@steptwo}%
-\def\@steptwo{\expandafter\ifx\cs\@stoken\let\@@next=\@stepthree
+\def\@stepone{\expandafter\futurelet\@btxcs\@steptwo}%
+\def\@steptwo{\expandafter\ifx\@btxcs\@stoken\let\@@next=\@stepthree
\else\let\@@next=\@nexttoken\fi \@@next}%
\def\@stepthree{\afterassignment\@stepone\let\@@next= }%
\def\@getoptionalarg#1{%
@@ -441,11 +591,11 @@ end
\long\def\providecommand#1{%
\def\@btxcommandname{#1}%
\expandafter\ifx\@btxcommandname \@undefined
- \let\cs=\@btxcontinuenewcommand % undefined, so we'll define it
+ \let\@btxcs=\@btxcontinuenewcommand % undefined, so we'll define it
\else
- \let\cs=\@gobble % already defined, so ignore it
+ \let\@btxcs=\@gobble % already defined, so ignore it
\fi
- \@getoptionalarg\cs
+ \@getoptionalarg\@btxcs
}%
\fi
\def\@btxcontinuenewcommand{%
@@ -665,10 +815,11 @@ end
%%% USA
%%% Tel: (801) 581-5254
%%% FAX: (801) 581-4148",
-%%% checksum = "27723 296 1385 12423",
+%%% checksum = "39776 297 1390 12466",
%%% email = "beebe@magna.math.utah.edu (Internet)",
%%% codetable = "ISO/ASCII",
%%% keywords = "TeX names",
+%%% license = "public domain",
%%% supported = "yes",
%%% docstring = "This style file for AmSTeX, LaTeX, and TeX
%%% defines macros for the names of TeX
@@ -4135,5 +4286,5 @@ end
\def\fmtname{eplain}%
\def\eplain{t}%
{\edef\plainversion{\fmtversion}%
- \xdef\fmtversion{3.11: 4 July 2020 (and plain \plainversion)}%
+ \xdef\fmtversion{3.12: 5 October 2022 (and plain \plainversion)}%
}%