From beed4b3fbec0e5363230a8e402b0c374a414c093 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 11 May 2015 21:08:51 +0000 Subject: elocalloc (10may15) git-svn-id: svn://tug.org/texlive/trunk@37339 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/elocalloc/README | 17 +++ .../texmf-dist/doc/latex/elocalloc/elocalloc.pdf | Bin 0 -> 153024 bytes .../source/latex/elocalloc/elocalloc.dtx | 128 +++++++++++++++++++++ .../source/latex/elocalloc/elocalloc.ins | 10 ++ .../texmf-dist/tex/latex/elocalloc/elocalloc.sty | 43 +++++++ Master/tlpkg/bin/tlpkg-ctan-check | 3 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/elocalloc.tlpsrc | 0 8 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/elocalloc/README create mode 100644 Master/texmf-dist/doc/latex/elocalloc/elocalloc.pdf create mode 100644 Master/texmf-dist/source/latex/elocalloc/elocalloc.dtx create mode 100644 Master/texmf-dist/source/latex/elocalloc/elocalloc.ins create mode 100644 Master/texmf-dist/tex/latex/elocalloc/elocalloc.sty create mode 100644 Master/tlpkg/tlpsrc/elocalloc.tlpsrc diff --git a/Master/texmf-dist/doc/latex/elocalloc/README b/Master/texmf-dist/doc/latex/elocalloc/README new file mode 100644 index 00000000000..5ab5f9d3ab7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/elocalloc/README @@ -0,0 +1,17 @@ +elocalloc package + +Local allocation macros, with names taken from etex.sty +but with implementation based on the LaTeX 2015 allocation macros. + +To produce typeset documentation: +pdflatex elocalloc.dtx + +To extract the elocalloc.sty package: +tex elocalloc.ins + +David Carlisle +LPPL licenced (status: maintained) + +Please report any issues at + +https://github.com/davidcarlisle/dpctex/issues diff --git a/Master/texmf-dist/doc/latex/elocalloc/elocalloc.pdf b/Master/texmf-dist/doc/latex/elocalloc/elocalloc.pdf new file mode 100644 index 00000000000..931d4df24af Binary files /dev/null and b/Master/texmf-dist/doc/latex/elocalloc/elocalloc.pdf differ diff --git a/Master/texmf-dist/source/latex/elocalloc/elocalloc.dtx b/Master/texmf-dist/source/latex/elocalloc/elocalloc.dtx new file mode 100644 index 00000000000..0580a7fff8b --- /dev/null +++ b/Master/texmf-dist/source/latex/elocalloc/elocalloc.dtx @@ -0,0 +1,128 @@ +% \iffalse +%% Source File: textcase.dtx +%% Copyright 2015 David Carlisle +%% +%% This file may be distributed under the terms of the LPPL. +%% See README for details. +% +%<*dtx> + \ProvidesFile{elocalloc.dtx} +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{elocalloc} +% \ProvidesFile{elocalloc.drv} +% \fi +% \ProvidesFile{elocalloc.dtx} + [2015/05/09 v0.01 local allocation for LaTeX 2015+ (DPC)] +% +% \iffalse +%<*driver> +\documentclass{ltxdoc} +\begin{document} +\DocInput{elocalloc.dtx} +\end{document} +% +% \fi +% +% \GetFileInfo{elocalloc.dtx} +% +% \title{The \textsf{elocalloc} Package\thanks{This file +% has version number \fileversion, last +% revised \filedate. +% Please report any issues at https://github.com/davidcarlisle/dpctex/issues}} +% \author{David Carlisle} +% \maketitle +% +% \section{Introduction} +% +% Prior to the 2015/01/01 \LaTeX\ release, access to extended registers was +% usually provided by the \textsf{etex} package. From 2015 on the base +% \LaTeX\ format ``knows'' the register ranges for tex, etex, xetex and +% luatex, and so for most purposes the \textsf{etex} package is not +% required. +% +% For existing documents \textsf{etex} may still be loaded and will work +% as before, however in general it is best not to load \textsf{etex} as it +% will over-write the new allocation scheme with its own. +% +% Standard allocation macros such as |\newbox| and extended versions of +% tracing commands are now defined in the format for suitable engines however +% there were some features of \textsf{etex} not copied into the format, +% notably the ``local'' allocation macros. A search of CTAN showed that +% these were almost never used, and their use can often be avoided, however +% there are occasions when they may be useful. This package provides +% implementations based on the new allocation system in \LaTeX\ 2015/01/01. +% +% Within a local group a command such as |\locbox\tmpbox| defines |\tmpbox| +% to be a box register, but unlike |\newbox| the definition is local, and +% at the end of the group, |\tmpbox| loses its definition, and the box +% allocation number is restored. +% +% The package defines: |\loccount|, |\locdimen|, |\locskip|, |\locmuskip|, +% |\locbox|, |\loctoks| and |\locmarks|. +% +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% On old \LaTeX, load |etex.sty| and stop. +% \begin{macrocode} +\ifx\e@alloc\@undefined +\RequirePackage{etex} +\expandafter\endinput +\fi +% \end{macrocode} +% +% If something else defined |\locbox|, stop with a warning. +% +% \begin{macrocode} +\ifx\locbox\@undefined\else +\PackageWarning{elocalloc}{% + \string\locbox\space already defined, stopping} +\expandafter\endinput +\fi +% \end{macrocode} +% +% Don't allow |\extrafloats| while a local allocation is in force. +% It is however OK to use |\extrafloats| with this package and to +% use floats within a group with a local allocation. +% +% For local allocations, reduce the top of the range available for global +% allocations by one, and locally allocate the register from that top +% position. +% +% Note that this means that (unlike the \textsf{etex} package originals) +% locally allocating one register affects the top of the other registers +% that share the same top of range, but doing otherwise would mean storing +% separate values ofr each type, and would make it harder to make +% |\extrafloats| work, should such an extension ever be needed. +% \begin{macrocode} +\def\eloc@lloc#1#2#3#4#5{% + \def\extrafloats##1{% + \PackageWarning{elocalloc}{\string\extrafloats\space ignored}} + \e@ch@ck{#1}#2\z@#3% + \expandafter\e@alloc@chardef\expandafter#2% + \the\numexpr#2-1\relax + \allocationnumber=#2% + #3#5#2} +% \end{macrocode} +% +% The top level local allocation commands. +% \begin{macrocode} +\def\loccount {\eloc@lloc{\count 10}\float@count\countdef\count} +\def\locdimen {\eloc@lloc{\count 11}\float@count\dimendef\dimen} +\def\locskip {\eloc@lloc{\count 12}\float@count\skipdef\skip} +\def\locmuskip{\eloc@lloc{\count 13}\e@alloc@top\muskipdef\muskip} +\def\locbox {\eloc@lloc{\count 14}\float@count\e@alloc@chardef\box} +\def\loctoks {\eloc@lloc{\count 15}\e@alloc@top\toksdef\toks} +\def\locmarks {\eloc@lloc{\count256}\e@alloc@topt\e@alloc@chardef\marks} +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% diff --git a/Master/texmf-dist/source/latex/elocalloc/elocalloc.ins b/Master/texmf-dist/source/latex/elocalloc/elocalloc.ins new file mode 100644 index 00000000000..d3bb84bf588 --- /dev/null +++ b/Master/texmf-dist/source/latex/elocalloc/elocalloc.ins @@ -0,0 +1,10 @@ +\input docstrip +\keepsilent +\preamble +\endpreamble + +\askforoverwritefalse + +\generate{\file{elocalloc.sty}{\from{elocalloc.dtx}{package}}} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/elocalloc/elocalloc.sty b/Master/texmf-dist/tex/latex/elocalloc/elocalloc.sty new file mode 100644 index 00000000000..dd273773039 --- /dev/null +++ b/Master/texmf-dist/tex/latex/elocalloc/elocalloc.sty @@ -0,0 +1,43 @@ +%% +%% This is file `elocalloc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% elocalloc.dtx (with options: `package') +%% +%% Source File: textcase.dtx +%% Copyright 2015 David Carlisle +%% +%% This file may be distributed under the terms of the LPPL. +%% See README for details. +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{elocalloc} + [2015/05/09 v0.01 local allocation for LaTeX 2015+ (DPC)] +\ifx\e@alloc\@undefined +\RequirePackage{etex} +\expandafter\endinput +\fi +\ifx\locbox\@undefined\else +\PackageWarning{elocalloc}{% + \string\locbox\space already defined, stopping} +\expandafter\endinput +\fi +\def\eloc@lloc#1#2#3#4#5{% + \def\extrafloats##1{% + \PackageWarning{elocalloc}{\string\extrafloats\space ignored}} + \e@ch@ck{#1}#2\z@#3% + \expandafter\e@alloc@chardef\expandafter#2% + \the\numexpr#2-1\relax + \allocationnumber=#2% + #3#5#2} +\def\loccount {\eloc@lloc{\count 10}\float@count\countdef\count} +\def\locdimen {\eloc@lloc{\count 11}\float@count\dimendef\dimen} +\def\locskip {\eloc@lloc{\count 12}\float@count\skipdef\skip} +\def\locmuskip{\eloc@lloc{\count 13}\e@alloc@top\muskipdef\muskip} +\def\locbox {\eloc@lloc{\count 14}\float@count\e@alloc@chardef\box} +\def\loctoks {\eloc@lloc{\count 15}\e@alloc@top\toksdef\toks} +\def\locmarks {\eloc@lloc{\count256}\e@alloc@topt\e@alloc@chardef\marks} +\endinput +%% +%% End of file `elocalloc.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 7b2262d6597..e5b7fca1b4b 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -198,7 +198,8 @@ my @TLP_working = qw( ec ecc ecclesiastic ecltree eco economic ecv ed edfnotes edmac edmargin ednotes eemeir eepic efbox egameps egplot eiad eiad-ltx eijkhout einfuehrung ejpecp ekaia - elbioimp electrum eledform eledmac ellipsis elmath elpres elsarticle + elbioimp electrum eledform eledmac ellipsis elmath elocalloc + elpres elsarticle elteikthesis eltex elvish elzcards emarks embedall embrac emptypage emulateapj emp enctex encxvlna endfloat endheads endiagram endnotes diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 2a0ad5f89ba..a781ee2e48e 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -290,6 +290,7 @@ depend efbox depend egplot depend ellipsis depend elmath +depend elocalloc depend elpres depend elzcards depend emarks diff --git a/Master/tlpkg/tlpsrc/elocalloc.tlpsrc b/Master/tlpkg/tlpsrc/elocalloc.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3