diff options
author | Karl Berry <karl@freefriends.org> | 2015-05-11 21:08:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-05-11 21:08:51 +0000 |
commit | beed4b3fbec0e5363230a8e402b0c374a414c093 (patch) | |
tree | 134a792d761a452cfc03ab6e54e8d1477b92040e /Master/texmf-dist | |
parent | 40dd5938ded99176abd37cee3b6271722fe30f24 (diff) |
elocalloc (10may15)
git-svn-id: svn://tug.org/texlive/trunk@37339 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/elocalloc/README | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/elocalloc/elocalloc.pdf | bin | 0 -> 153024 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/elocalloc/elocalloc.dtx | 128 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/elocalloc/elocalloc.ins | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/elocalloc/elocalloc.sty | 43 |
5 files changed, 198 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 00000000000..931d4df24af --- /dev/null +++ b/Master/texmf-dist/doc/latex/elocalloc/elocalloc.pdf 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} +%</dtx> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{elocalloc} +%<driver> \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} +%</driver> +% \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} +%</package> +% \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'. |