summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-03 00:36:03 +0000
committerKarl Berry <karl@freefriends.org>2011-03-03 00:36:03 +0000
commit1373c702f804364e13cfbe191eab6fcffb9da4cd (patch)
tree6dd319b1674a585be815256488287d62ce8435fa /Master/texmf-dist/source
parent2f64f338cffe4a03ab1b91741a6f7ff7b5f67269 (diff)
ltxnew 1.3 (2mar11)
git-svn-id: svn://tug.org/texlive/trunk@21586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx133
-rw-r--r--Master/texmf-dist/source/latex/ltxnew/ltxnew.ins2
2 files changed, 90 insertions, 45 deletions
diff --git a/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx b/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx
index aff891949a7..c61386b98ca 100644
--- a/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx
+++ b/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
% ltxnew : provides the \new \renew and \provide prefixes for checking definitions
-% [v1.2 2010/04/17]
+% [2011/03/02 v1.3]
% 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
@@ -36,7 +36,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: ltxnew 2010/04/17 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions}
+\Msg{* Package: ltxnew 2011/03/02 v1.3 provides the \string\new \string\renew and \string\provide prefixes for checking definitions}
\Msg{************************************************************************}
\keepsilent
@@ -92,15 +92,22 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
%</ignore>
%<*driver>
\edef\thisfile{\jobname}
+\def\thisversion{1.3}
\def\thisinfo{provides the \cs{new} \cs{renew} and \cs{provide} prefixes for checking definitions.}
\let\loadclass\LoadClass
\def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}}
+\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[a4paper,oneside]{ltxdoc}
\usepackage[latin9]{inputenc}
\usepackage[american]{babel}
-\usepackage{etex,holtxdoc,etoolbox,geometry,tocloft,fancyhdr,color,bbding,embedfile,framed,float,multirow,enumitem,txfonts}\CodelineNumbered
+\usepackage{etex,holtxdoc,etoolbox,geometry,tocloft,fancyhdr,xcolor,xspace,needspace,titlesec}
+\usepackage{bbding,framed,float,multirow,enumitem,txfonts}\CodelineNumbered
+\usepackage{bookmark}
+\usepackage{embedfile}
+\usepackage{ltxnew}
+\usepackage{interfaces}
\embedfile{\thisfile.dtx}
-\geometry{top=2cm,headheight=1cm,headsep=.3cm,bottom=2cm,left=4cm,right=2cm}
+\geometry{top=1.5cm,headheight=1cm,headsep=.3cm,bottom=2.5cm,left=4cm,right=2cm}
\hypersetup{%
pdftitle={The ltxnew package},
pdfsubject={An e-TeX package for more useful tools for LaTeX package writers},
@@ -115,7 +122,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
%</driver>
% \fi
%
-% \CheckSum{675}
+% \CheckSum{709}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -154,17 +161,27 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% \DoNotIndex{\",\:,\@empty,\@for,\@gtempa,\@latex@error,\@namedef,\@nameuse,\@tempa,\@testopt,\@width,\\,\m@ne,\makeatletter,\makeatother}
% \DoNotIndex{\maketitle,\parindent,\setbox,\kernel@ifnextchar}
%
-%
% \makeatletter
% \lastlinefit999
% \newcommand\macrocodecolor{\color{macrocode}}\definecolor{macrocode}{rgb}{0.18,0.00,0.45}
% \newcommand\reflinkcolor{\color{reflink}}\definecolor{reflink}{rgb}{0.49,0.00,0.00}
% \newcommand\refurlcolor{\color{refurl}}\definecolor{refurl}{rgb}{0.00,0.00,1.00}
% \def\ThisPackage{\Xpackage{\thisfile}}\def\thispackage{\xpackage{\thisfile}}
-% \fancyhf{}\fancyhead[L]{\thispackage\ -- \thisinfo}
-% \fancyfoot[L]{\color[gray]{.35}\scriptsize\thispackage\quad\copyright\oldstylenums{2009}-\oldstylenums{2010}\,\lower.3ex\hbox{\NibRight}\,Florent Chervet}
-% \fancyfoot[R]{\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}}
+% \newrobustcmd*\FC[1][\color{copper}]{{#1\usefont{T1}{fts}xn FC}}
+% \definecolor{copper}{rgb}{0.67,0.33,0.00}
+% \pagesetup{
+% rules,
+% head/left=\thispackage\ -- \thisinfo,
+% foot/font=\color{gray!70}\scriptsize,
+% foot/left=\thispackage\quad\copyright\oldstylenums{2009}-\oldstylenums{2011}\,\lower.3ex\hbox{\NibRight}\,\FC,
+% foot/right=\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}},
+% }
% \pagestyle{fancy}
+% \pagesetup[plain]{
+% foot/font=\color{gray!70}\scriptsize,
+% foot/right=\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}},
+% foot/left=\thispackage\quad\copyright\oldstylenums{2009}-\oldstylenums{2011}\,\lower.3ex\hbox{\NibRight}\,\FC\quad\xemail{florent.chervet at free.fr},
+% }
% \floatplacement{table}{H}
%
% \catcode`\§\active\def§{\par\nobreak\vskip-\parskip}
@@ -173,19 +190,35 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% \parindent\z@\parskip\saveparskip\topsep\z@\partopsep\z@
% \g@addto@macro\macro@font{\macrocodecolor\let\AltMacroFont\macro@font}
% \def\smex{\leavevmode\hb@xt@2em{\hfil$\longrightarrow$\hfil}}
-% \def\csred#1{\textcolor{red}{\cs{#1}}}
+% \newrobustcmd*\xspaceverb{\ifnum\catcode`\ =\active\else \expandafter\xspace \fi}
+% \newrobustcmd*\grabcs{\leavevmode\hbox\bgroup\bgroup\makeatletter\aftergroup\endgrabcs}
+% \new\mathchardef\cs@sf=1900
+% \def\endgrabcs {\egroup \spacefactor\cs@sf \xspaceverb}
+% \renewcommand*\cs{\cs@ensurespace \texorpdfstring{\grabcs\cs@} \cs@pdf}
+% \newcommand*\cs@ensurespace{\ifhmode \ifdim\lastskip>\z@ \ifnum\spacefactor<\cs@sf \unskip\spacefactor\cs@sf \space \fi\fi\fi }
+% \newcommand*\cs@pdf[1]{\@backslashchar\if\@backslashchar\string#1 \else\string#1\fi}
+% \newrobustcmd\cs@[2][]{\begingroup\escapechar\m@ne\def\x ##1{\endgroup\cs@hyperlink{##1}{\textt{#1{\@backslashchar##1}}}}\expandafter\x\expandafter{\string#2}\egroup}
+% \newrobustcmd*\cs@hyperlink [2]{\ifcsname @declcs.\detokenize{#1}\endcsname \hyperref{}{declcs}{#1}{#2}\else #2\fi}
+% \csundef{@declcs.begin}
+% \newcommand\texorpdf [2]{\texorpdfstring{#1{#2}}{#2}}
+% \newcommand\textt[1]{\texorpdf\texttt{#1}}
+% \def\csred{\cs[\color{red}]}
% \def\CSif\bgroup\ignorespaces#1{\bgroup\ignorespaces\ifx#1\unskip\else \CS{#1}\fi}
% \def\CSbf#1{\textbf{\CS{#1}}}
% \def\Repeat#1#2{\ifnum\numexpr#1\relax>0\relax #2\relax\Repeat{#1-1}{#2}\fi}
% \def\Xpackage{\@dblarg\X@package}
% \def\X@package[#1]#2{%
% \xpackage{#2\footnote{\noindent\xpackage{#2}: \href{http://www.ctan.org/tex-archive/macros/latex/contrib/#1}{\nolinkurl{CTAN:macros/latex/contrib/#1}}}}}
+% \sectionformat\section[hang]{font=\large\bfseries,label=\arabic{section}.,bookmark={color=MidnightBlue}}
+% \sectionformat\subsection[hang]{font=\bfseries,label=\arabic{section}.\arabic{subsection},bookmark={bold,color=black!70}}
+%
+%
% \deffootnote{1em}{0pt}{\rlap{\textsuperscript{\thefootnotemark}}\kern1em}
% % \makeatother
%
% \title{\mdseries The {\bfseries \Xpackage{ltxnew}}\kern.6em package}
-% \author{\small Florent Chervet \xemail{florent.chervet@free.fr}}
-% \date{April 17, 2010}
+% \author{\footnotesize \FC}
+% \date{\small March 03, 2011 -- \hyperref[\thisversion]{version \thisversion}}
% \subtitle{\thisinfo}
%
% \maketitle
@@ -197,7 +230,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
%
% \xpackage{ltxnew} provides \CSbf{new} \CSbf{renew} and \CSbf{provide}: three expandable prefixes
% for use with |\def|, |\gdef|, |\edef|, |\xdef|, |\countdef|, |\dimendef|, |\skipdef|, |\muskipdef|,
-% |\box|, |\toksdef|, |\marks|, |\count|,
+% |\box|, |\toksdef|, |\chardef|, |\mathchardef|, |\marks|, |\count|,
% |\dimen|, |\skip|, |\muskip|, |\savebox|, |\toks| and the |\glob|\Repeat3\textasteriskcentered\
% and |\loc|\Repeat3\textasteriskcentered\ variants of the \xpackage{etex} package.
%
@@ -212,7 +245,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% to redefine macros that were previously defined as |\outer|.
%
% \xpackage{ltxnew} is designed to work with an \eTeX{} distribution of \LaTeX{}. It relies on the \LaTeX{} macro
-% |\@ifdefinable|, on the \Xpackage[etex-pkg]{etex} package and some macros of \Xpackage{etoolbox}.
+% |\@ifdefinable|, and requires the \Xpackage[etex-pkg]{etex} package and no other package.
%
% \end{abstract}\vskip-\baselineskip
% \makeatletter\begingroup\let\@thefnmark\@empty\let\@makefntext\@firstofone
@@ -226,15 +259,22 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% The \xext{dtx} file is embedded into this pdf file thank to \xpackage{embedfile} by H. Oberdiek.}
% \endgroup\makeatother
%
-%
-% \cftbeforesecskip=5pt plus2pt minus4pt
% \bigskip
+% \tocsetup{
+% title=Contents\quad\leaders\hrule height3.4pt depth-3pt\hfill\null,
+% title/bottom=8pt,
+% section/skip=5pt plus2pt minus4pt,
+% section/dotsep=3mu,
+% subsection/dotsep=3mu,
+% twocolumns,
+% multicols/afterend=\noindent\hrulefill\null,
+% }
+%
% \tableofcontents
%
-% \def\B#1{\texttt{[}\meta{#1}\texttt{]}}
-%
% \section{Introduction}
%
+% \sectionformat\subsection{bookmark={bold*=false}}
% \subsection{Motivation}
%
% \LaTeX{} provides |\newcommand| for defining new commands. However, comparing to |\def|
@@ -244,7 +284,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% is that the control sequence is first checked for availability (its meaning ought to be
% |undefined| or |\relax| before the definition).
%
-% \xpackage{etoolbox} enhance this matter allowing to define |\newrobustcmd| and |\renewrobustcmd|.
+% \Xpackage{etoolbox} enhance this matter with \hologo{eTeX} |\newrobustcmd|, |\renewrobustcmd| and |\providerobustcmd|.
%
% Moreover, \LaTeX{} does not provide an automatic check of control sequences when defining
% tokens (|\newtoks|), dimensions (|\newdimen|), skips (|\newskip|), etc. etc.
@@ -290,11 +330,12 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% \end{itemize}
%
% That is really what means |\new|. No more, no less.
+% \Needspace{5\baselineskip}
%
% \subsection{What \cs{renew} means}
%
-% \bfseries \CS{renew} means:§\mdseries
-% \begin{itemize}[label=--,topsep=0pt,itemsep=0pt]
+% \bfseries \CS{renew} means:§\mdseries\nobreak
+% \begin{itemize}[label=--,topsep=0pt,itemsep=0pt,beginpenalty=10000]
% \item Check if the control sequence to redefine already has a meaning (different from |undefined| and also from |\relax|)
% \item If that's OK : go on (with a side effect if the package \xpackage{tracing} is loaded)
% \item If not : throw an error. But if in |srollmode|, |nonstopmode| or |batchmode| \textbf{do define} the control sequence.
@@ -315,12 +356,12 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% |\new| acts as a (expandable) prefix with the following syntax:§
% \DeleteShortVerb{\|}\catcode`\|\active\let|\textbar\def\tvs{\textcolor{green}{\textvisiblespace}}\def\cblue{\color{blue}}
% \begin{framed}\begin{centering}\begin{tabular}{clll}
-% & \cs{new} & \tvs \\
-% \cblue possibly & & (\csred{long}\tvs|\csred{global}\tvs|\csred{protected}\tvs|\csred{outer}\tvs) & optional (zero or more) \\
+% & \cs\new & \tvs \\
+% \cblue possibly & & (\csred\long\tvs|\csred\global\tvs|\csred\protected\tvs|\csred\outer\tvs) & optional (zero or more) \\
% \cblue in a macro & \multirow{-2}*{\cblue $\Biggl\lbrace$} & \textsc{<definition word>} & required: see below \\
% & & \textit{control sequence} & required
% \end{tabular}\end{centering}\end{framed}
-% {\noindent \small \tvs\space denote optional spaces, ignored by the \cs{new}-prefixes-scanner.}
+% {\noindent \small \tvs\space denote optional spaces, ignored by the \cs\new-prefixes-scanner.}
%
% \MakeShortVerb{\|}
%
@@ -339,6 +380,8 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% Tokens & toksdef & toks & loctoks & globtoks \cr
% Fonts & font & & & \cr
% Marks & marks & & locmarks\footnotemark & globmarks \cr
+% Characters & chardef & & & \cr
+% Math characters & mathchardef & & & \cr
% Write & & write & & \cr
% Read & & read & & \cr\hline\hline
% \end{tabular}
@@ -374,12 +417,11 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% The |\loc|\Repeat3\textasteriskcentered\space and |\glob|\Repeat3\textasteriskcentered\space words and also |\newmarks|
% are defined by \Xpackage[etex-pkg]{etex}.
%
-% Please note that there is no {\bfseries |\new\command|} and there will most probably never be. Nor
-% is there any |\new\keycmd| if you use the \Xpackage{keycommand} package.
+% Please note that there is no {\bfseries |\new\command|} and there will most probably never be.
%
% \subsection{Using \cs{renew} and \cs{provide}}
%
-% \cs{renew} and \cs{provide} shares the same syntax as \cs{new}.
+% \cs\renew and \cs\provide share the same syntax as \cs\new.
%
% \StopEventually{
% }
@@ -387,6 +429,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% \begin{center}\vskip6pt$\star$\hskip4em\lower12pt\hbox{$\star$}\hskip4em$\star$\vadjust{\vskip12pt}\end{center}
%
% \section{Implementation} \label{Implementation}
+% \sectionformat\subsection{bookmark=}
%
% \subsection{Identification}
%
@@ -397,7 +440,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[2005/12/01]% LaTeX must be 2005/12/01 or younger (see kvsetkeys.dtx).
\ProvidesPackage{ltxnew}
- [2010/04/17 v1.2 provides the new and renew prefixes for checking definitions]
+ [2011/03/02 v1.3 provides the new and renew prefixes for checking definitions]
% \end{macrocode}
% \iffalse
%<package>
@@ -535,7 +578,11 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
\else\ifx\x\font \def\z{\font}%%41
\else\ifx\x\write \def\z{\newwrite}%%42
\else\ifx\x\read \def\z{\newread}%%43
- \else\ifx\x\protect \ltxn@error@prefix%%44
+ \else\ifx\x\char \def\z{\chardef}%%44
+ \else\ifx\x\chardef \def\z{\chardef}%%45
+ \else\ifx\x\mathchar \def\z{\mathchardef}%%46
+ \else\ifx\x\mathchardef \def\z{\mathchardef}%%47
+ \else\ifx\x\protect \ltxn@error@prefix%%48
\else
\let\ltxn@next@addto\ltxn@next@prefix
\ifx\y\x\ltxn@error@prefix
@@ -545,7 +592,7 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
- \fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi
\fi
\fi\fi\fi
\fi\fi\fi\fi% so many fees...
@@ -621,8 +668,8 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% \begin{macrocode}
\def\ltxn@renew#1{%
\edef\ltxn@name{\string#1}%
- \ifdefined#1\ifx#1\relax\ltxn@error{renew: \ltxn@name undefined}\fi
- \else \ltxn@error{renew: \ltxn@name undefined}%
+ \ifdefined#1\ifx#1\relax\ltxn@error{renew: \ltxn@name\space undefined}\fi
+ \else \ltxn@error{renew: \ltxn@name\space undefined}%
\fi
\let#1=\relax
\def\next{\ltxn@new#1}%
@@ -714,17 +761,21 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
%
% \begin{History}
%
-% \begin{Version}{2010/04/17 v1.2}
+% \begin{Version}{2011/03/02 v1.3}\HistLabel{1.3}
% \item
-% \cs{provide} and \cs{renew} added an undesirable blank space.
+% \cs\chardef and \cs\mathchardef added as allowed definition words.
% \end{Version}
%
-% \begin{Version}{2009/10/11 v1.1}
+% \begin{Version}{2010/04/17 v1.2}\HistLabel{1.2}
+% \item \cs\provide and \cs\renew added an undesirable blank space.
+% \end{Version}
+%
+% \begin{Version}{2009/10/11 v1.1}\HistLabel{1.1}
% \item
% Correction of \texttt{.sty} header.
% \end{Version}
%
-% \begin{Version}{2009/07/22 v1.0}
+% \begin{Version}{2009/07/22 v1.0}\HistLabel{1.0}
% \item
% First version.
% \end{Version}
@@ -734,17 +785,11 @@ Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr>
% \begin{thebibliography}{9}
%
% \bibitem{etex}
-% David Carlisle and Peter Breitenlohner
-% \textit{The \xpackage{etex} package};
+% \textit{The \xpackage{etex} package}; \\
+% David Carlisle and Peter Breitenlohner \\
% 1998/03/26 v2.0;
% \CTAN{macros/latex/contrib/etex-pkg/}.
%
-% \bibitem{etoolbox}
-% Philipp Lehman
-% \textit{The \xpackage{etoolbox} package};
-% 2008/06/28 v1.7;
-% \CTAN{macros/latex/contrib/etoolbox/}.
-%
% \end{thebibliography}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins b/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins
index 1fafce06fed..5104d7fe03c 100644
--- a/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins
+++ b/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins
@@ -26,7 +26,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: ltxnew 2010/04/17 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions}
+\Msg{* Package: ltxnew 2011/03/02 v1.3 provides the \string\new \string\renew and \string\provide prefixes for checking definitions}
\Msg{************************************************************************}
\keepsilent