summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/eplain
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/eplain')
-rw-r--r--Master/texmf-dist/tex/eplain/eplain.tex242
1 files changed, 218 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/eplain/eplain.tex b/Master/texmf-dist/tex/eplain/eplain.tex
index 6881f08f038..93bc3df91c0 100644
--- a/Master/texmf-dist/tex/eplain/eplain.tex
+++ b/Master/texmf-dist/tex/eplain/eplain.tex
@@ -1,17 +1,20 @@
%% @texfile{
%% author = "Karl Berry, Steven Smith, Oleg Katsitadze, and others",
-%% version = "3.2",
-%% date = "Mon Nov 26 01:34:44 EET 2007",
+%% version = "3.3",
+%% date = "Tue Jul 21 21:57:33 PDT 2009",
%% filename = "eplain.tex",
%% email = "bug-eplain@tug.org",
-%% checksum = "4056 8707 129859",
+%% checksum = "4250 9190 134946",
%% codetable = "ASCII",
%% supported = "yes",
%% docstring = "This file defines macros that extend and expand on
%% plain TeX. eplain.tex is xeplain.tex and the other
%% source files with comments stripped; see the original
-%% files for author credits, etc. And please base diffs
-%% or other contributions on xeplain.tex, not the
+%% files for author credits, etc. The original sources
+%% can be found in Eplain source zip archive in your TeX
+%% distribution, on CTAN or on Eplain's home page at
+%% http://tug.org/eplain. And please base diffs or
+%% other contributions on xeplain.tex, not the
%% stripped-down eplain.tex.",
%% }
\ifx\eplain\undefined
@@ -20,7 +23,41 @@
\expandafter\let\expandafter\next\csname endinput\endcsname
\fi
\next
+%%
+%% This is file `ifpdf.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ifpdf.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2001, 2005-2009 by
+%% Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% This work consists of the main source file ifpdf.dtx
+%% and the derived files
+%% ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv, ifpdf-test1.tex.
+%%
\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
\expandafter\let\expandafter\x\csname ver@ifpdf.sty\endcsname
\ifcase 0%
\ifx\x\relax % plain
@@ -31,6 +68,9 @@
\fi
\fi
\else
+ \catcode35 6 % #
+ \catcode123 1 % {
+ \catcode125 2 % }
\expandafter\ifx\csname PackageInfo\endcsname\relax
\def\x#1#2{%
\immediate\write-1{Package #1 Info: #2.}%
@@ -43,13 +83,27 @@
\fi
\endgroup
\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \def\x#1#2#3[#4]{\endgroup
- \xdef#1{#4}%
- }%
+ \def\x#1#2#3[#4]{\endgroup
+ \xdef#1{#4}%
+ }%
\else
\def\x#1#2[#3]{\endgroup
- #2[#3]%
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
\ifx#1\relax
\xdef#1{#3}%
\fi
@@ -57,8 +111,43 @@
\fi
\expandafter\x\csname ver@ifpdf.sty\endcsname
\ProvidesPackage{ifpdf}%
- [2005/07/22 v1.3 %
- Providing \expandafter\string\csname ifpdf\endcsname\space (HO)]
+ [2009/04/10 v2.0 Provides the ifpdf switch (HO)]
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname ifpdf@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\ifpdf@AtEnd{%
+ \ifpdf@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{10}{12}% ^^J
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{94}{7}% ^
+\TMP@EnsureCode{96}{12}% `
\begingroup
\expandafter\ifx\csname ifpdf\endcsname\relax
\else
@@ -70,7 +159,7 @@
\errmessage{Package ifpdf Error: #1}%
}%
\def\y{^^J}%
- \newlinechar=10
+ \newlinechar=10 %
\else
\def\x#1#2{%
\PackageError{ifpdf}{#1}{#2}%
@@ -82,19 +171,66 @@
therefore package loading is aborted.%
}%
\endgroup
+ \ifpdf@AtEnd
+ \fi
+\endgroup
+\begingroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax
+ \else
+ \def\skip#1\relax\endgroup{\csname fi\endcsname\endgroup}%
+ \skip
+ \fi
+ \expandafter\ifx\csname directlua\endcsname\relax
+ \def\skip#1\endgroup{\csname fi\endcsname\endgroup}%
+ \skip
+ \fi
+ \expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ifluatex.sty\relax
+ \else
+ \RequirePackage{ifluatex}[2009/04/10]%
+ \fi
+ \ifluatex
+ \ifnum\luatexversion<36 %
+ \else
+ \directlua{tex.enableprimitives('ifpdf', {'pdfoutput'})}%
+ \global\let\pdfoutput\ifpdfpdfoutput
+ \fi
\fi
+ \relax
\endgroup
\newif\ifpdf
-\ifx\pdfoutput\undefined
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdfoutput\endcsname\relax
\else
- \ifx\pdfoutput\relax
+ \ifnum\pdfoutput<1 %
+ \else
+ \pdftrue
+ \fi
+\fi
+\begingroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax
\else
- \ifnum\pdfoutput<1 %
+ \escapechar=-1 %
+ \edef\m{\meaning\pdfoutput}%
+ \edef\p{%
+ \string p\string d\string f%
+ \string o\string u\string t\string p\string u\string t%
+ }%
+ \ifx\m\p
\else
- \pdftrue
+ \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
+ \def\PackageWarningNoLine#1#2{%
+ \immediate\write16{%
+ Package `#1' Warning: #2.%
+ }%
+ }%
+ \fi
+ \PackageWarningNoLine{ifpdf}{%
+ Someone has redefined \string\\pdfoutput%
+ }%
\fi
\fi
-\fi
+\endgroup
\begingroup
\expandafter\ifx\csname PackageInfo\endcsname\relax
\def\x#1#2{%
@@ -105,6 +241,9 @@
\fi
\x{ifpdf}{pdfTeX in pdf mode \ifpdf\else not \fi detected}%
\endgroup
+\ifpdf@AtEnd
+%%
+%% End of file `ifpdf.sty'.
\def\makeactive#1{\catcode`#1 = \active \ignorespaces}%
\chardef\letter = 11
\chardef\other = 12
@@ -1008,6 +1147,35 @@
}%
\catcode `\@ = \@oldatcatcode
\discretionaries |~!@$%^&*()_+`-=#{}[]:";'<>,.?\/|%
+\ifx\eTeX\undefined
+ \def\eTeX{\hbox{\mathsurround=0pt $\varepsilon$-\kern-.125em\TeX}}%
+\fi
+\ifx\ExTeX\undefined
+ \def\ExTeX{\hbox{\mathsurround=0pt
+ $\textstyle\varepsilon_{\kern-0.15em\cal{X}}$\kern-.2em\TeX}}%
+\fi
+\def\eplain@Xe@reflect#1{%
+ \ifx\reflectbox\undefined
+ \errmessage{A graphics package must be loaded for \string\XeTeX}%
+ \else
+ \ifdim \fontdimen1\font>0pt
+ \raise 1.75ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em
+ \else
+ \reflectbox{#1}%
+ \fi
+ \fi
+}%
+\def\eplain@Xe#1{\leavevmode
+ \smash{\hbox{X%
+ \setbox0=\hbox{\TeX}\setbox2=\hbox{E}%
+ \lower\dp0\hbox{\raise\dp2\hbox{\kern-.125em\eplain@Xe@reflect{E}}}%
+ \kern-.1667em #1}}}%
+\ifx\XeTeX\undefined
+ \def\XeTeX{\eplain@Xe\TeX}%
+\fi
+\ifx\XeLaTeX\undefined
+ \def\XeLaTeX{\eplain@Xe{\thinspace\LaTeX}}%
+\fi
\def\blackbox{\vrule height .8ex width .6ex depth -.2ex \relax}% square bullet
\def\makeblankbox#1#2{%
\ifvoid0
@@ -1526,6 +1694,7 @@
##1\crcr}}}%
\def\eqalignno##1{%
\def\eqno{&}%
+ \def\leqno{&}%
\global\setbox\@lignbox\vbox{%
\prevdepth = \disprevdepth
\displ@y
@@ -1538,6 +1707,7 @@
##1\crcr}}}%
\def\leqalignno##1{%
\def\eqno{&}%
+ \def\leqno{&}%
\global\setbox\@lignbox\vbox{%
\prevdepth = \disprevdepth
\displ@y
@@ -2031,7 +2201,7 @@
\def\eqsubdef{\@eqdef\eqsubdefn}%
\def\@eqdef#1#2{%
\@maybedisableeqno
- \eqno #1{#2}% Define the label and hyperlink destination.
+ \eqnum #1{#2}% Define the label and hyperlink destination.
\let\@optionalarg\empty % \@fineqref will examine \@optionalarg.
{\@@hloff\@fineqref{#2}}% Print the text without a hyperlink.
\@mayberestoreeqno
@@ -2041,14 +2211,26 @@
\def\@maybedisableeqno{%
\ifinner
\global\let\eqno = \relax
+ \global\let\leqno = \relax
\global\let\@mayberestoreeqno = \@restoreeqno
\fi
}%
\let\@primitiveeqno = \eqno
+\let\@primitiveleqno = \leqno
\def\@restoreeqno{%
\global\let\eqno = \@primitiveeqno
+ \global\let\leqno = \@primitiveleqno
\global\let\@mayberestoreeqno = \empty
}%
+\def\righteqnumbers{%
+ \def\eqnum{\eqno}%
+ \def\eqalignnum{\eqalignno}%
+}%
+\def\lefteqnumbers{%
+ \def\eqnum{\leqno}%
+ \def\eqalignnum{\leqalignno}%
+}%
+\righteqnumbers
\def\eqrefn{\@getoptionalarg\@fineqrefn}%
\def\@fineqrefn#1{%
\eqref@start{#1}%
@@ -2125,7 +2307,14 @@
\else
\write-1{}%
\fi
- \ifindexproofing \insert\@indexproof{\indexproofterm{#1}}\ifhmode\allowhyphens\fi\fi
+ \ifindexproofing
+ \def\temp{#1}%
+ \edef\temp{%
+ \insert\@indexproof{\noexpand\indexproofterm{\sanitize\temp}}%
+ }%
+ \temp
+ \ifhmode\allowhyphens\fi
+ \fi
\hookrun{afterindexterm}%
\ifsilentindexentry \expandafter\ignorespaces\fi
}%
@@ -2428,8 +2617,12 @@
\idx@optionaltemp
}%
{\catcode`\&=0
-\gdef\idx@scanterm#1{\scantokens{#1&endinput}}%
-}%
+\gdef\idx@scanterm#1{%
+ \edef\idx@scanterm@nl@catcode{\the\catcode`\^^M\relax}%
+ \catcode`\^^M=5
+ \scantokens{#1&endinput}%
+ \catcode`\^^M=\idx@scanterm@nl@catcode
+}}%
\def\@idx{\idx@getverbatimarg\@finidx}%
\def\@finidx#1{%
\idx@scanterm{#1}% Produce TERM as output.
@@ -2484,7 +2677,7 @@
\ifx\temp\empty
\toks@ = {}%
\else
- \toks@ = {\idxnameseparator #1}%
+ \toks@ = \expandafter{\idxnameseparator #1}%
\fi
\toks2 = {#2}%
\edef\temp{\the\toks2 \the\toks@}%
@@ -3805,6 +3998,7 @@
\def\usepkg@word@psfrag{psfrag}%
\long\def\beginpackages#1\endpackages{%
\let\usepackage\real@usepackage
+ \let\DoNotLoadEpstopdf=t
\let\eplaininput=\input
#1%
\usepkg@at@begin@document
@@ -3894,7 +4088,7 @@
\ifundefined{ver@\usepkg@pkg.sty}%
\expandafter\@finusepkg@load@pkg
\else
- \message{^^J\linenumber Eplain: package `\usepkg@pkg' already
+ \immediate\write-1{^^J\linenumber Eplain: package `\usepkg@pkg' already
loaded, skipping reloading}%
\fi
}%
@@ -4052,5 +4246,5 @@
\def\fmtname{eplain}%
\def\eplain{t}%
{\edef\plainversion{\fmtversion}%
- \xdef\fmtversion{3.2: 26 November 2007 (and plain \plainversion)}%
+ \xdef\fmtversion{3.3: 21 July 2009 (and plain \plainversion)}%
}%