diff options
author | Norbert Preining <preining@logic.at> | 2007-11-16 11:19:28 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-11-16 11:19:28 +0000 |
commit | a7dfc63af349a5ea5fb37b110f584cc878308ea7 (patch) | |
tree | 35d4254aa89bccb17aca5d5a3561aa69294466cd /Master/texmf-dist | |
parent | eef08b0a5a7904d6aae52d911e76f7a2fca06f29 (diff) |
mlist v0.5 from ctan
git-svn-id: svn://tug.org/texlive/trunk@5457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/mlist/README | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mlist/README.txt | 29 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mlist/dtx-style.sty | 127 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mlist/mlist.pdf | bin | 193343 -> 204427 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/mlist/mlist.dtx | 294 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/mlist/mlist.ins | 25 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mlist/mlist.cfg | 69 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mlist/mlist.sty | 102 |
8 files changed, 289 insertions, 379 deletions
diff --git a/Master/texmf-dist/doc/latex/mlist/README b/Master/texmf-dist/doc/latex/mlist/README index 9989f99d1be..946db637cc1 100644 --- a/Master/texmf-dist/doc/latex/mlist/README +++ b/Master/texmf-dist/doc/latex/mlist/README @@ -1,11 +1,12 @@ _________________ The MLIST package -v0.4 +v0.5 -This package defines the commands \newvect, \newmatr, and \newfunc for -creating macros to typeset vectors, matrices, and functions. For -example, Logical indexing can then be used to refer to elements or -arguments without hard-coding the symbols in the document: +This package defines the commands \newvect, \newmatr, \newfunc, +and \newmset for creating macros to typeset vectors, matrices, +functions, and sets. For example, Logical indexing can then be +used to refer to elements or arguments without hard-coding the +symbols in the document: \newvect\myvect{V}[elem=a,b,c] \myvect{1,2,3} @@ -14,16 +15,21 @@ produces \left( V_a, V_b, V_c \right) -All aspects of the typeset appearance can be adjusted, and new `mlists' -can be defined to represent other mathematical constructs. +All aspects of the typeset appearance can be adjusted, and new +`mlists' can be defined to represent other mathematical constructs. Consider this package an exploration of separation of form and content for some mathematical constructions. I hope you find it useful. ______________ +Change history + +v0.5: Introduced \newmset for defining mathematical sets; + with pre-defined sets \setR, \setC, \setZ, \setN. + +______________ Will Robertson wspr 81 [at] gmail [dot] com Copyright 2007 Distributed under the LaTeX Project Public License - diff --git a/Master/texmf-dist/doc/latex/mlist/README.txt b/Master/texmf-dist/doc/latex/mlist/README.txt deleted file mode 100644 index 9989f99d1be..00000000000 --- a/Master/texmf-dist/doc/latex/mlist/README.txt +++ /dev/null @@ -1,29 +0,0 @@ -_________________ -The MLIST package -v0.4 - -This package defines the commands \newvect, \newmatr, and \newfunc for -creating macros to typeset vectors, matrices, and functions. For -example, Logical indexing can then be used to refer to elements or -arguments without hard-coding the symbols in the document: - - \newvect\myvect{V}[elem=a,b,c] - \myvect{1,2,3} - -produces - - \left( V_a, V_b, V_c \right) - -All aspects of the typeset appearance can be adjusted, and new `mlists' -can be defined to represent other mathematical constructs. - -Consider this package an exploration of separation of form and content -for some mathematical constructions. I hope you find it useful. - -______________ -Will Robertson -wspr 81 [at] gmail [dot] com - -Copyright 2007 -Distributed under the LaTeX Project Public License - diff --git a/Master/texmf-dist/doc/latex/mlist/dtx-style.sty b/Master/texmf-dist/doc/latex/mlist/dtx-style.sty deleted file mode 100644 index 990e14e1486..00000000000 --- a/Master/texmf-dist/doc/latex/mlist/dtx-style.sty +++ /dev/null @@ -1,127 +0,0 @@ -\ProvidesPackage{dtx-style} - -\errorcontextlines=999 - -\def\@dotsep{1000} -\setcounter{tocdepth}{2} -\setlength\columnseprule{0.1pt} -\renewcommand\tableofcontents{\relax - \begin{multicols}{2}[\section*{\contentsname}]\small - \@starttoc{toc}\relax - \end{multicols}} - -\setcounter{IndexColumns}{2} -\renewenvironment{theglossary} - {\small\list{}{} - \item\relax - \glossary@prologue\GlossaryParms - \let\item\@idxitem \ignorespaces - \def\pfill{\hspace*{\fill}}} - {\endlist} - -\usepackage[svgnames]{xcolor} -\usepackage{amsmath,array,bm,booktabs,calc,enumitem,fancyvrb,graphicx,ifthen,longtable,refstyle,subfig,topcapt,varioref,\jobname} - -\usepackage{easyvector,vector,tensind} -\usepackage{url} - -\usepackage[sc,osf]{mathpazo} - -\linespread{1.069} % A bit more space between lines -\frenchspacing % Remove ugly extra space after punctuation - -\definecolor{niceblue}{rgb}{0.2,0.4,0.8} -\newenvironment{example}[1] - {\VerbatimEnvironment - \def\Options{#1}% - \begin{VerbatimOut}[gobble=2]{\examplefilename}} - {\end{VerbatimOut}\relax - \typesetexample} - -\fvset{formatcom=\color{niceblue}} -\DefineShortVerb{\|} - -\def\theCodelineNo{\textcolor{niceblue}{\sffamily\tiny\arabic{CodelineNo}}} - -\let\examplesize\normalsize -\let\auxwidth\relax - -\newlength\examplewidth\newlength\verbatimwidth -\newlength\exoutdent \newlength\exverbgap -\setlength\exverbgap{1em} -\setlength\exoutdent{-0.15\textwidth} -\newsavebox\verbatimbox -\edef\examplefilename{\jobname.example} - -\newcommand\typesetexample{\relax - \smallskip - \noindent - \begin{minipage}{\linewidth} - \color{niceblue} - \hrulefill\par - \edef\@tempa{[gobble=0,fontsize=\noexpand\small,\Options]}% - \begin{lrbox}{\verbatimbox}\relax - \expandafter\BVerbatimInput\@tempa{\examplefilename}% - \end{lrbox} - \begin{list}{}{\setlength\itemindent{0pt} - \setlength\leftmargin\exoutdent - \setlength\rightmargin{0pt}}\item - \ifx\auxwidth\relax - \setlength\verbatimwidth{\wd\verbatimbox}% - \else - \setlength\verbatimwidth{\auxwidth}% - \fi - \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap} - \catcode`\%=14\centering\linespread{1.6}\input\examplefilename\relax - \end{minipage}\hfill - \begin{minipage}[c]{\verbatimwidth} - \usebox\verbatimbox - \end{minipage} - \end{list} - \par\noindent\hrulefill - \end{minipage} - \smallskip} - -\newcommand*\setverbwidth[1]{\def\auxwidth{#1}} - -\newcommand*\name[1]{{#1}} -\newcommand*\pkg[1]{\textsf{#1}} -\newcommand*\feat[1]{\texttt{#1}} -\newcommand*\opt[1]{\texttt{#1}} - -\newcommand*\ltx[1]{% - \ifx3#1\relax - \textsc{ltx3}% - \else - \LaTeXe - \fi} - -\newcommand*\note[1]{\unskip\footnote{#1}} - -\let\latin\textit -\def\eg{\latin{e.g.}} -\def\Eg{\latin{E.g.}} -\def\ie{\latin{i.e.}} -\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} - -\def\STIX{\textsc{stix}} -\def\MacOSX{Mac~OS~X} -\def\ascii{\textsc{ascii}} -\def\OMEGA{Omega} -\def\CTAN{\textsc{ctan}} - -\newcounter{argument} -\g@addto@macro\endmacro{\setcounter{argument}{0}} -\newcommand*\darg[1]{% - \stepcounter{argument}% - {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces} -\newcommand*\doarg[1]{% - \stepcounter{argument}% - {\ttfamily\makebox[0pt][r]{[}\char`\#\theargument]:~}#1\par\noindent\ignorespaces} - -\def\codeline{\par\hspace{\parindent}}% two \indents in total - -\newcommand\unichar[2]{\textsc{\MakeLowercase{u+#1: #2}}} - -\setlength\parindent{2em} - diff --git a/Master/texmf-dist/doc/latex/mlist/mlist.pdf b/Master/texmf-dist/doc/latex/mlist/mlist.pdf Binary files differindex b706f6f48f7..8c3e7f3528e 100644 --- a/Master/texmf-dist/doc/latex/mlist/mlist.pdf +++ b/Master/texmf-dist/doc/latex/mlist/mlist.pdf diff --git a/Master/texmf-dist/source/latex/mlist/mlist.dtx b/Master/texmf-dist/source/latex/mlist/mlist.dtx index 4b12378256e..19ba4116a7a 100644 --- a/Master/texmf-dist/source/latex/mlist/mlist.dtx +++ b/Master/texmf-dist/source/latex/mlist/mlist.dtx @@ -1,29 +1,55 @@ -% \iffalse meta-comment -% -% -% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> -% -% Distributable under the LaTeX Project Public License, -% version 1.3c or higher (your choice). The latest version of -% this license is at: http://www.latex-project.org/lppl.txt -% -% This work is "maintained" (as per LPPL maintenance status) -% by Will Robertson. -% -% This work consists of the file mlist.dtx -% and the derived files mlist.sty and mlist.pdf. -% -% -%<*internalbatchfile> +% \iffalse +%<*internal> +\iffalse +%</internal> +%<*readme> +_________________ +The MLIST package +v0.5 + +This package defines the commands \newvect, \newmatr, \newfunc, +and \newmset for creating macros to typeset vectors, matrices, +functions, and sets. For example, Logical indexing can then be +used to refer to elements or arguments without hard-coding the +symbols in the document: + + \newvect\myvect{V}[elem=a,b,c] + \myvect{1,2,3} + +produces + + \left( V_a, V_b, V_c \right) + +All aspects of the typeset appearance can be adjusted, and new +`mlists' can be defined to represent other mathematical constructs. + +Consider this package an exploration of separation of form and content +for some mathematical constructions. I hope you find it useful. + +______________ +Change history + +v0.5: Introduced \newmset for defining mathematical sets; + with pre-defined sets \setR, \setC, \setZ, \setN. + +______________ +Will Robertson +wspr 81 [at] gmail [dot] com + +Copyright 2007 +Distributed under the LaTeX Project Public License +%</readme> +%<*internal> +\fi \begingroup -%</internalbatchfile> +%</internal> %<*batchfile> \input docstrip.tex \keepsilent \preamble __________________________________ - Copyright (C) 2006 Will Robertson + Copyright (C) 2007 Will Robertson License information appended. @@ -40,25 +66,27 @@ this license is at: http://www.latex-project.org/lppl.txt This work is "maintained" (as per LPPL maintenance status) by Will Robertson. -This work consists of the file \jobname.dtx - and the derived files \jobname.sty and \jobname.pdf. +This work consists of the file mlist.dtx + and the derived files mlist.pdf, + mlist.sty, + mlist.cfg, and + mlist.ins. \endpostamble \askforoverwritefalse -\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package} - \from{\jobname.dtx}{defaults}}} +\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\generate{\file{\jobname.cfg}{\from{\jobname.dtx}{defaults}}} +%</batchfile> +%<batchfile>\endbatchfile +%<*internal> \generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} \nopreamble\nopostamble \generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} \generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}} -%</batchfile> -%<batchfile>\endbatchfile -%<*internalbatchfile> \endgroup \immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx} \immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo} -\immediate\write18{mv README.txt README} -%</internalbatchfile> +%</internal> % %<*driver> \documentclass{ltxdoc} @@ -72,37 +100,6 @@ This work consists of the file \jobname.dtx \end{document} %</driver> % -%<*readme> -_________________ -The MLIST package -v0.4 - -This package defines the commands \newvect, \newmatr, and \newfunc for -creating macros to typeset vectors, matrices, and functions. For -example, Logical indexing can then be used to refer to elements or -arguments without hard-coding the symbols in the document: - - \newvect\myvect{V}[elem=a,b,c] - \myvect{1,2,3} - -produces - - \left( V_a, V_b, V_c \right) - -All aspects of the typeset appearance can be adjusted, and new `mlists' -can be defined to represent other mathematical constructs. - -Consider this package an exploration of separation of form and content -for some mathematical constructions. I hope you find it useful. - -______________ -Will Robertson -wspr 81 [at] gmail [dot] com - -Copyright 2007 -Distributed under the LaTeX Project Public License - -%</readme> % % \fi % @@ -110,7 +107,7 @@ Distributed under the LaTeX Project Public License % \CheckSum{0} % \makeatletter % -% \title{Logical markup for lists} +% \title{Logical markup for mathematical lists} % \author{Will Robertson} % \date{\filedate \qquad \fileversion} % @@ -165,7 +162,7 @@ Distributed under the LaTeX Project Public License % \qquad \dist{1,2,3} \] % \end{example} % -% \subsection{Matrix and function notation} +% \subsection{Matrix notation} % % So the basic idea of this package is to separate the formatting and % content of mathematical objects. The above example showed vector @@ -188,6 +185,8 @@ Distributed under the LaTeX Project Public License % throughout an entire document (or collection of documents) without % changing the fundamental markup of the mathematics itself. % +% \subsection{Function and `set' notation} +% % \DescribeMacro{\newfunc} Finally, here's something a little % different. Vector and matrices are both quite similar. But it takes % only a slight stretch to extend the syntax of this package to things @@ -202,17 +201,29 @@ Distributed under the LaTeX Project Public License % papers. To hammer home the point: this can be now done for an entire % document with a simple switch. % -% \subsubsection{Non-specific commands} -% Sometimes you don't always want to define new macros for one-off -% maths expressions. Accompanying the \cmd\newvect, \cmd\newmatr, and -% \cmd\newfunc\ macros are \cmd\vect, \cmd\matr, and \cmd\func, which -% can be used for single cases: +% \DescribeMacro{\newmset} Here's an example to further +% demonstrate the flexibility of the package. +% \begin{example}{} +% \newmset\setT{T} +% \[ \setT \qquad \setT{2} \qquad \setT{2,3} \] +% \end{example} +% The \cmd\setR, \cmd\setC, \cmd\setN, and \cmd\setZ\ `msets' are defined +% by default for real, complex, natural, and integer numbers. % \begin{example}{} -% \[ \vect{V}{a,b,c} \qquad -% \matr{M}{a,b;c,d} \qquad -% \func{f}{x_0;x,t} \] +% \[ \bm{x}\in\setR{2,2} \] % \end{example} % +% \subsection{Non-specific commands} +% Sometimes you don't always want to define new macros for one-off +% maths expressions. Accompanying the \cmd\newvect, \cmd\newmatr, +% \cmd\newfunc, and \cmd\newmset\ macros are \cmd\vect, \cmd\matr, \cmd\func, +% and \cmd\mset, which can be used for single cases: +% \begin{example}{} +% \[ \vect{V}{a,b,c} \quad +% \matr{M}{a,b;c,d} \quad +% \func{f}{x_0;x,t} \quad +% \mset{D}{m,n} \] +% \end{example} % This usage is generally not recommended except in isolated cases. % % \subsection{An example of some actual maths} @@ -231,7 +242,6 @@ Distributed under the LaTeX Project Public License % \[ \frac\partial{\partial t} % \state = \dyn \state \] % \end{example} -% % There's a lot more semantic meaning in that mathematical \TeX\ source than if it were hard-coded without this package. % % \subsection{Elements and indexing}\seclabel{indexing} @@ -272,7 +282,6 @@ Distributed under the LaTeX Project Public License % \[ \V=\V{4,5,6} \] % \[ \V=\V{1,2,3;@1,@2,@3} \] % \end{example} -% % See \tabref{index-syntax} for a more detailed example of the indexing system. % % \begin{table} @@ -294,7 +303,6 @@ Distributed under the LaTeX Project Public License % $\LL$ \quad vs.\quad $\LL{}$ % \quad vs.\quad $\LL{1,2} $ % \end{example} -% % This was shown originally in the function example on page~\pageref{func-example}. % % \subsection{Shorthand indices and empty elements} @@ -304,8 +312,8 @@ Distributed under the LaTeX Project Public License % In this example, the semi-colon separation is shown with the % \cmd\dots\ shorthand `|:|' and the \cmd\cdot\ shorthand `|.|'. % \begin{example}{} -% \newvect\mset{M} -% \[ \mset=\mset{1,2,:,5;a,b,.,d} \] +% \newvect\mm{M} +% \[ \mm=\mm{1,2,:,5;a,b,.,d} \] % \end{example} % % More shorthands will be defined in the future via @@ -352,7 +360,7 @@ Distributed under the LaTeX Project Public License % \emph{instance generator} for the types of lists we're dealing with. % Use \cmd\renewmlist\ if the command is already in use. % -% \cmd\newmlist\cs{<list>}\marg{list options} creates macros +% \cmd\newmlist\cs{<list>}\oarg{list options} creates macros % \cs{<list>} and \cs{new<list>} (and \cs{renew<list>}) that are % analogous to \cmd\vect\ and \cmd\newvect\ seen in % \secref{vect}. \meta{list options} can contain any of those seen so @@ -452,7 +460,7 @@ Distributed under the LaTeX Project Public License % $\RRR + \RRR{1} + \RRR{a,b}$ % \end{example} % -% \pkg{mlist} provides some example commands for this purpose:\par +% \pkg{mlist} provides some example commands for this purpose:\par\nobreak\noindent % \begingroup\ttfamily % \def\mean#1{\string#1 & \expandafter\parse@meaning\meaning#1\@nil} % \def\parse@meaning #1:#2->#3\@nil{\detokenize{#3}\\} @@ -489,7 +497,7 @@ Distributed under the LaTeX Project Public License % may be adjusted with \cmd\mlistsetup\marg{mlist options}. The defaults % are shown in \secref[vref]{defaults}. % -% \subsection{Redefining \cmd\vect, \cmd\matr, \cmd\func} +% \subsection{Redefining \cmd\vect, \cmd\matr, \cmd\func, \cmd\mset} % % This package makes little claim for being imminently usable for most % people \emph{out of the box}. I figure there's just too much @@ -497,13 +505,10 @@ Distributed under the LaTeX Project Public License % % If changes to the mlists provided by default with this package % are required (as they will be if any aspect of their formatting needs -% to be adjusted), simply copy their definitions from \secref[vref]{defaults} +% to be adjusted), simply create a local |mlist.cfg| file with different +% defintions or even just copy them from \secref[vref]{defaults} % in a \cmd\renewmlist. % -% In the future I hope to implement a local \cmd\mlistsetup, but not now. -% -% -% % \section{TODO} % \begin{itemize} % \item changing features of (or adding features to, rather) `newvect' @@ -524,11 +529,11 @@ Distributed under the LaTeX Project Public License % \section{The default definitions} % \seclabel{defaults} % -% This is the code that appears in the package itself to set up the -% default options and mlists. +% This is the code that appears in the default configuration file \pkg{mlist.cfg} to set up the +% default options and mlists. Edit a copy of \pkg{mlist.cfg} in a local location (in a local \texttt{texmf} tree or on a per-document basis) to change these definitions and to create your own mlists. % % \subsection{Global options} -% These are inherited by mlists that do not their own respective +% These are inherited by mlists that do not explicitly define their own respective % options. Geared towards \cmd\vect, essentially. % \begin{macrocode} \mlistsetup{% @@ -569,7 +574,6 @@ Distributed under the LaTeX Project Public License \newmlist\matr[ sep=&, sepsep=\\, - elemcmd=\mlistelem, wrap={\begin{bmatrix}} {\end{bmatrix}}, ] @@ -581,13 +585,36 @@ Distributed under the LaTeX Project Public License % \begin{macrocode} \newmlist\func[ headcmd=\mlisthead, - elemcmd=\mlistelem, wrapcmd=\mlistheadparen, wraponecmd, ] % \end{macrocode} % \end{macro} % +% \begin{macro}{\mset} +% By default, |\mset{N}{2,3}| $\to$ $\mset{N}{2,3}$. +% \begin{macrocode} +\newmlist\mset[ + headcmd=\mathbb, + sep=\times, + wrapcmd=\mlistsup, + wraponecmd, +] +% \end{macrocode} +% \changes{v0.5}{2007/06/06}{Added.} +% \end{macro} +% Sets for real, complex, natural, and integer numbers, respectively: +% \begin{macrocode} +\newmset\setR{R} +\newmset\setC{C} +\newmset\setN{N} +\newmset\setZ{Z} +% \end{macrocode} +% +%\iffalse +%</defaults> +%\fi +% % \section{Prior art} % % With \CTAN\ getting so big these days, it's quite necessary to @@ -681,9 +708,6 @@ Distributed under the LaTeX Project Public License % this package is trying to do. Integration between this package and those three above are possible, % but has not yet been investigated. % -%\iffalse -%</defaults> -%\fi % % \StopEventually{} % @@ -698,13 +722,14 @@ Distributed under the LaTeX Project Public License % % \begin{macrocode} \ProvidesPackage{mlist} - [2007/05/19 v0.4 Typesetting maths lists] + [2007/09/19 v0.5 Typesetting maths lists] % \end{macrocode} % % \PrintChanges % \changes{v0.1}{27/04/2007}{Code tidy up; first decent version.} % \changes{v0.2}{30/04/2007}{More documentation; list indexing not finalised.} % \changes{v0.3}{2007/05/02}{List indexing decided; empty arguments ignored.} +% \changes{v0.4}{2007/05/26}{Tidied things up a little bit.} % % \subsection{User shorthands} % @@ -738,11 +763,11 @@ Distributed under the LaTeX Project Public License \RequirePackage{xkeyval,ifmtarg} % \end{macrocode} % \subsection{Code we need} -% More temporary conditionala and counters and things: +% Conditionals and counters and things: % \begin{macrocode} -\unless\ifdefined\if@tempswb\newif\if@tempswb\fi -\unless\ifdefined\if@tempswc\newif\if@tempswc\fi -\unless\ifdefined\@tempcntc\newcount\@tempcntc\fi +\newif\if@mlist@notfirst@ +\newif\if@mlist@implicit@ +\newcount\mlist@elem@N \def\@gobblenil#1\@nil{} % \end{macrocode} % Some specific things: @@ -785,6 +810,13 @@ Distributed under the LaTeX Project Public License \providecommand\def@co[2]{% \def@c{#1\expandafter}\expandafter{#2}} % \end{macrocode} +% \begin{macro}{\@optarg} +% Macro to simplify optional argument parsing. +% \begin{macrocode} +\newcommand\@optarg[1]{\@ifnextchar[{#1}{#1[]}}%] +% \end{macrocode} +% \changes{v0.4}{2007/05/26}{Implemented to simplify optional arg processing.} +% \end{macro} % Shorthand to test for optional brace arguments: % \begin{macrocode} \newcommand\@ifnextbrace{\expandafter\@ifnextchar\bgroup} @@ -856,12 +888,11 @@ Distributed under the LaTeX Project Public License % \begin{description}[nolistsep] % \item[\cmd\@tempcnta] Number of semicolon list. % \item[\cmd\@tempcntb] Element number of this comma list. -% \item[\cmd\@tempcntc] Combined element number. % \end{description} % \begin{macrocode} \@tempcnta\z@ \@tempcntb\z@ - \@tempcntc\z@ + \mlist@elem@N\z@ % \end{macrocode} % Iterate over every semicolon list. Set \cs{if@tempswa} true only % after every |:| element, for each semicolon list. Maybe we should @@ -902,9 +933,9 @@ Distributed under the LaTeX Project Public License % (Index $3,1$ is the sixth in the list.) % \begin{macrocode} \advance\@tempcntb\@ne - \advance\@tempcntc\@ne + \advance\mlist@elem@N\@ne \def@co{mlist@\the\@tempcnta @\the\@tempcntb}{\@ii}% - \def@co{mlist@@\the\@tempcntc}{\@ii}% + \def@co{mlist@@\the\mlist@elem@N}{\@ii}% \fi \fi}% % \end{macrocode} @@ -990,7 +1021,7 @@ Distributed under the LaTeX Project Public License % And (sub-)iterate over every comma-separated list: % \begin{macrocode} \@tempcntb\z@ - \@tempswbfalse + \@mlist@notfirst@false \@for\@ii:=\@jj\do{% \let\@ii\@ii \advance\@tempcntb\@ne @@ -1004,8 +1035,8 @@ Distributed under the LaTeX Project Public License % \end{macrocode} % When it's not empty: % \begin{macrocode} - {\if@tempswb\mlist@add\mlist@sep\fi - \@tempswbtrue + {\if@mlist@notfirst@\mlist@add\mlist@sep\fi + \@mlist@notfirst@true \ifx\@ii\mlist@colon \mlist@add{\mlist@dots\@gobble}% \else @@ -1017,11 +1048,11 @@ Distributed under the LaTeX Project Public License \fi}% % \end{macrocode} % Parse the index to see if it's an implicit reference of the form -% |@|$n$. swc is true if the index is implicit: (and we assume |@| +% |@|$n$. @mlist@implicit@ is true if the index is implicit: (and we assume |@| % will be only used in an implicit-indexing context. TODO: fix this!) % \begin{macrocode} \mlist@parse@implicit - \if@tempswc + \if@mlist@implicit@ \mlist@add@ifcs{% mlist@\the\@tempcnta @\expandafter\@gobble\@ii }{\@ii}% @@ -1043,7 +1074,9 @@ Distributed under the LaTeX Project Public License % \end{macrocode} % That was the end of semicolon-separated iteration. % \begin{macrocode} - \def\mlist@list{\mlist@wrap{\mlist@symbol}{\mlist@list@elems}}% + \def\mlist@list{% + \mlist@wrap{\mlist@headcmd{\mlist@symbol}} + {\mlist@list@elems}}% % \end{macrocode} % If only have a single element: % \begin{macrocode} @@ -1060,6 +1093,7 @@ Distributed under the LaTeX Project Public License % \changes{v0.4}{2007/05/17}{Eliminated \cmd\global\ no longer % required since I separated the list creation and typesetting.} % \changes{v0.4}{2007/05/19}{Simplified `single index' code.} +% \changes{v0.5}{2007/06/06}{Added \cmd\mlist@headcmd\ command to the \cmd\mlist@symbol inside \cmd\mlist@wrap\ (fixed bug with \cmd\mset)} % \end{macro} % % \begin{macro}{\mlist@add} @@ -1103,20 +1137,20 @@ Distributed under the LaTeX Project Public License % Parses the index to see if it's an implicit reference: |@|$n$. The % idea is to expand out the index, set a conditional if the first % char is an |@|, and then gobble up the whole thing. We do this -% twice for the two common catcodes that |@| could be. +% twice for the two common catcodes that |@| might be. % \begin{macrocode} \def\mlist@parse@implicit{% - \@tempswcfalse + \@mlist@implicit@false \def\@tempb{% \expandafter\@ifnextchar\mlist@ampersat - {\@tempswctrue\@gobblenil} - {\@tempswcfalse\@gobblenil}}% + {\@mlist@implicit@true\@gobblenil} + {\@mlist@implicit@false\@gobblenil}}% \expandafter\@tempb\@ii\@nil - \unless\if@tempswc + \unless\if@mlist@implicit@ \def\@tempb{% \@ifnextchar @ - {\@tempswctrue\@gobblenil} - {\@tempswcfalse\@gobblenil}}% + {\@mlist@implicit@true\@gobblenil} + {\@mlist@implicit@false\@gobblenil}}% \expandafter\@tempb\@ii\@nil \fi} % \end{macrocode} @@ -1146,16 +1180,11 @@ Distributed under the LaTeX Project Public License % \begin{macrocode} \newcommand\newmlist[1]{% \@mlist@warntrue - \@ifnextchar[%] - {\@defmlist@opt{#1}} - {\@defmlist@noopt{#1}}} + \@optarg{\@defmlist@opt{#1}}} \newcommand\renewmlist[1]{% \@mlist@warnfalse - \@ifnextchar[%] - {\@defmlist@opt{#1}} - {\@defmlist@noopt{#1}}} + \@optarg{\@defmlist@opt{#1}}} \def\@defmlist@opt#1[#2]{\@defmlist{#1}{#2}} -\def\@defmlist@noopt#1{\@defmlist{#1}{}} % \end{macrocode} % Processing |#1| = thislist-cmd, |#2| = all-thislist-opts % \begin{macrocode} @@ -1172,11 +1201,9 @@ Distributed under the LaTeX Project Public License \protected\def#1##1{% \@ifnextbrace {\csname\string#1@opt\endcsname{##1}} - {\csname\string#1@noopt\endcsname{##1}}}% + {\csname\string#1@opt\endcsname{##1}{}}}% \def@c{\string#1@opt}##1##2{% \csname\string#1\endcsname{##1}{##2}}% - \def@c{\string#1@noopt}##1{% - \csname\string#1\endcsname{##1}{}}% \def@c{\string#1}##1##2{% \@mlist{symbol=##1,#2,index={##2}}}% % \end{macrocode} @@ -1185,18 +1212,12 @@ Distributed under the LaTeX Project Public License % \begin{macrocode} \def@c{new\expandafter\@gobble\string#1}##1##2{% \@mlist@warntrue - \@ifnextchar[%] - {\csname @new\string#1@opt\endcsname{##1}{##2}} - {\csname @new\string#1@noopt\endcsname{##1}{##2}}}% + \@optarg{\csname @new\string#1@opt\endcsname{##1}{##2}}}% \def@c{renew\expandafter\@gobble\string#1}##1##2{% \@mlist@warnfalse - \@ifnextchar[%] - {\csname @new\string#1@opt\endcsname{##1}{##2}} - {\csname @new\string#1@noopt\endcsname{##1}{##2}}}% + \@optarg{\csname @new\string#1@opt\endcsname{##1}{##2}}}% \def@c{@new\string#1@opt}##1##2[##3]{% \csname @new\string#1\endcsname{##1}{##2}{##3}}% - \def@c{@new\string#1@noopt}##1##2{% - \csname @new\string#1\endcsname{##1}{##2}{}}% \def@c{@new\string#1}##1##2##3{% \if@mlist@warn \ifdefined##1 @@ -1227,6 +1248,10 @@ Distributed under the LaTeX Project Public License % \testtwo{1,2,3} % \end{example} % +% \begin{macrocode} +\InputIfFileExists{mlist.cfg}{} + {\PackageWarning{mlist}{No configuration file (mlist.cfg) found nor loaded}} +% \end{macrocode} % %\iffalse %</package> @@ -1258,7 +1283,7 @@ Distributed under the LaTeX Project Public License {\endlist} \usepackage[svgnames]{xcolor} -\usepackage{amsmath,array,bm,booktabs,calc,enumitem,fancyvrb,graphicx,ifthen,longtable,refstyle,subfig,topcapt,varioref,\jobname} +\usepackage{amsmath,array,bm,booktabs,calc,enumitem,fancyvrb,graphicx,ifthen,longtable,refstyle,subfig,topcapt,varioref,mlist} \usepackage{easyvector,vector,tensind} \usepackage{url} @@ -1317,8 +1342,8 @@ Distributed under the LaTeX Project Public License \end{minipage} \end{list} \par\noindent\hrulefill - \end{minipage} - \smallskip} + \end{minipage}\par + \smallskip\noindent} \newcommand*\setverbwidth[1]{\def\auxwidth{#1}} @@ -1372,8 +1397,7 @@ Distributed under the LaTeX Project Public License % \typeout{* To finish the installation you have to move the following} % \typeout{* file into a directory searched by XeTeX:} % \typeout{*} -% \typeout{* \space\space\space unicode-math.sty} -% \typeout{* \space\space\space unicode-math.tex} +% \typeout{* \space\space\space mlist.sty} % \typeout{*} % \typeout{*************************************************************} % diff --git a/Master/texmf-dist/source/latex/mlist/mlist.ins b/Master/texmf-dist/source/latex/mlist/mlist.ins index 1c92b536d71..269cbc44d25 100644 --- a/Master/texmf-dist/source/latex/mlist/mlist.ins +++ b/Master/texmf-dist/source/latex/mlist/mlist.ins @@ -7,16 +7,17 @@ %% mlist.dtx (with options: `batchfile') %% %% __________________________________ -%% Copyright (C) 2006 Will Robertson +%% Copyright (C) 2007 Will Robertson %% %% License information appended. %% +%% \input docstrip.tex \keepsilent \preamble __________________________________ - Copyright (C) 2006 Will Robertson + Copyright (C) 2007 Will Robertson License information appended. @@ -32,17 +33,16 @@ this license is at: http://www.latex-project.org/lppl.txt This work is "maintained" (as per LPPL maintenance status) by Will Robertson. -This work consists of the file \jobname.dtx - and the derived files \jobname.sty and \jobname.pdf. +This work consists of the file mlist.dtx + and the derived files mlist.pdf, + mlist.sty, + mlist.cfg, and + mlist.ins. \endpostamble \askforoverwritefalse -\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package} - \from{\jobname.dtx}{defaults}}} -\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} -\nopreamble\nopostamble -\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} -\generate{\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}} +\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\generate{\file{\jobname.cfg}{\from{\jobname.dtx}{defaults}}} \endbatchfile %% %% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> @@ -55,7 +55,10 @@ This work consists of the file \jobname.dtx %% by Will Robertson. %% %% This work consists of the file mlist.dtx -%% and the derived files mlist.sty and mlist.pdf. +%% and the derived files mlist.pdf, +%% mlist.sty, +%% mlist.cfg, and +%% mlist.ins. %% %% %% End of file `mlist.ins'. diff --git a/Master/texmf-dist/tex/latex/mlist/mlist.cfg b/Master/texmf-dist/tex/latex/mlist/mlist.cfg new file mode 100644 index 00000000000..9d193412c7c --- /dev/null +++ b/Master/texmf-dist/tex/latex/mlist/mlist.cfg @@ -0,0 +1,69 @@ +%% +%% This is file `mlist.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mlist.dtx (with options: `defaults') +%% +%% __________________________________ +%% Copyright (C) 2007 Will Robertson +%% +%% License information appended. +%% +\mlistsetup{% + sep={,}, + sepsep={;}, + wrapcmd=\mlistparen, + wrapone={}{}, + dots=\dots, + dot={\,\cdot\,}, + elemcmd=\mlistelem, + headcmd=\mathbf, + index={}, +} +\newmlist\vect[ + wrapcmd=\mlistparen, + wraponecmd=\mlistnowrap, + elemcmd=\mlistsub, + headcmd=\mathbf, +] +\newmlist\matr[ + sep=&, + sepsep=\\, + wrap={\begin{bmatrix}} + {\end{bmatrix}}, +] +\newmlist\func[ + headcmd=\mlisthead, + wrapcmd=\mlistheadparen, + wraponecmd, +] +\newmlist\mset[ + headcmd=\mathbb, + sep=\times, + wrapcmd=\mlistsup, + wraponecmd, +] +\newmset\setR{R} +\newmset\setC{C} +\newmset\setN{N} +\newmset\setZ{Z} +%% +%% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> +%% +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) +%% by Will Robertson. +%% +%% This work consists of the file mlist.dtx +%% and the derived files mlist.pdf, +%% mlist.sty, +%% mlist.cfg, and +%% mlist.ins. +%% +%% +%% End of file `mlist.cfg'. diff --git a/Master/texmf-dist/tex/latex/mlist/mlist.sty b/Master/texmf-dist/tex/latex/mlist/mlist.sty index cdb83d5cfb3..aa9d1b56aeb 100644 --- a/Master/texmf-dist/tex/latex/mlist/mlist.sty +++ b/Master/texmf-dist/tex/latex/mlist/mlist.sty @@ -5,15 +5,14 @@ %% The original source files were: %% %% mlist.dtx (with options: `package') -%% mlist.dtx (with options: `defaults') %% %% __________________________________ -%% Copyright (C) 2006 Will Robertson +%% Copyright (C) 2007 Will Robertson %% %% License information appended. %% \ProvidesPackage{mlist} - [2007/05/19 v0.4 Typesetting maths lists] + [2007/09/19 v0.5 Typesetting maths lists] \let\mlisthead\@firstofone \let\mlistelem\@secondoftwo \newcommand\mlistsub [2]{#1_{#2}} @@ -28,9 +27,9 @@ \newcommand\mlistheadbrace[2]{#1\left\{#2\right\}} \newcommand\mlistheadangle[2]{#1\left<#2\right>} \RequirePackage{xkeyval,ifmtarg} -\unless\ifdefined\if@tempswb\newif\if@tempswb\fi -\unless\ifdefined\if@tempswc\newif\if@tempswc\fi -\unless\ifdefined\@tempcntc\newcount\@tempcntc\fi +\newif\if@mlist@notfirst@ +\newif\if@mlist@implicit@ +\newcount\mlist@elem@N \def\@gobblenil#1\@nil{} \newif\if@mlist@warn \long\def\@sfor#1:=#2\do#3{% @@ -62,6 +61,7 @@ \expandafter\def\csname#1\endcsname} \providecommand\def@co[2]{% \def@c{#1\expandafter}\expandafter{#2}} +\newcommand\@optarg[1]{\@ifnextchar[{#1}{#1[]}}%] \newcommand\@ifnextbrace{\expandafter\@ifnextchar\bgroup} \def\mlist@colon{:} \def\mlist@period{.} @@ -85,7 +85,7 @@ \define@key[mlist]{sym}{elem}{% \@tempcnta\z@ \@tempcntb\z@ - \@tempcntc\z@ + \mlist@elem@N\z@ \@sfor\@jj:=#1\do{% \advance\@tempcnta\@ne \@tempcntb\z@ @@ -100,9 +100,9 @@ \expandafter\@tempa\expandafter{\@ii}% \else \advance\@tempcntb\@ne - \advance\@tempcntc\@ne + \advance\mlist@elem@N\@ne \def@co{mlist@\the\@tempcnta @\the\@tempcntb}{\@ii}% - \def@co{mlist@@\the\@tempcntc}{\@ii}% + \def@co{mlist@@\the\mlist@elem@N}{\@ii}% \fi \fi}% \if@tempswa\@tempswafalse\fi}} @@ -135,15 +135,15 @@ {\if@tempswa\mlist@add\mlist@sepsep\fi \@tempswatrue}% \@tempcntb\z@ - \@tempswbfalse + \@mlist@notfirst@false \@for\@ii:=\@jj\do{% \let\@ii\@ii \advance\@tempcntb\@ne \expandafter\@ifmtarg\expandafter{\@ii}% {\advance\@tempcntb\m@ne \mlist@add{\@gobble}} - {\if@tempswb\mlist@add\mlist@sep\fi - \@tempswbtrue + {\if@mlist@notfirst@\mlist@add\mlist@sep\fi + \@mlist@notfirst@true \ifx\@ii\mlist@colon \mlist@add{\mlist@dots\@gobble}% \else @@ -154,7 +154,7 @@ \fi \fi}% \mlist@parse@implicit - \if@tempswc + \if@mlist@implicit@ \mlist@add@ifcs{% mlist@\the\@tempcnta @\expandafter\@gobble\@ii }{\@ii}% @@ -165,7 +165,9 @@ \fi }% }% - \def\mlist@list{\mlist@wrap{\mlist@symbol}{\mlist@list@elems}}% + \def\mlist@list{% + \mlist@wrap{\mlist@headcmd{\mlist@symbol}} + {\mlist@list@elems}}% \ifnum\@tempcnta=\@ne \ifnum\@tempcntb=\@ne \let\mlist@wrap\mlist@wrapone @@ -190,31 +192,26 @@ \fi{\expandafter\mlist@add\expandafter{\expandafter{\csname#1\endcsname}}} {\expandafter\mlist@add\expandafter{\expandafter{#2}}}} \def\mlist@parse@implicit{% - \@tempswcfalse + \@mlist@implicit@false \def\@tempb{% \expandafter\@ifnextchar\mlist@ampersat - {\@tempswctrue\@gobblenil} - {\@tempswcfalse\@gobblenil}}% + {\@mlist@implicit@true\@gobblenil} + {\@mlist@implicit@false\@gobblenil}}% \expandafter\@tempb\@ii\@nil - \unless\if@tempswc + \unless\if@mlist@implicit@ \def\@tempb{% \@ifnextchar @ - {\@tempswctrue\@gobblenil} - {\@tempswcfalse\@gobblenil}}% + {\@mlist@implicit@true\@gobblenil} + {\@mlist@implicit@false\@gobblenil}}% \expandafter\@tempb\@ii\@nil \fi} \newcommand\newmlist[1]{% \@mlist@warntrue - \@ifnextchar[%] - {\@defmlist@opt{#1}} - {\@defmlist@noopt{#1}}} + \@optarg{\@defmlist@opt{#1}}} \newcommand\renewmlist[1]{% \@mlist@warnfalse - \@ifnextchar[%] - {\@defmlist@opt{#1}} - {\@defmlist@noopt{#1}}} + \@optarg{\@defmlist@opt{#1}}} \def\@defmlist@opt#1[#2]{\@defmlist{#1}{#2}} -\def\@defmlist@noopt#1{\@defmlist{#1}{}} \newcommand\@defmlist[2]{% \if@mlist@warn \ifdefined#1 @@ -225,27 +222,19 @@ \protected\def#1##1{% \@ifnextbrace {\csname\string#1@opt\endcsname{##1}} - {\csname\string#1@noopt\endcsname{##1}}}% + {\csname\string#1@opt\endcsname{##1}{}}}% \def@c{\string#1@opt}##1##2{% \csname\string#1\endcsname{##1}{##2}}% - \def@c{\string#1@noopt}##1{% - \csname\string#1\endcsname{##1}{}}% \def@c{\string#1}##1##2{% \@mlist{symbol=##1,#2,index={##2}}}% \def@c{new\expandafter\@gobble\string#1}##1##2{% \@mlist@warntrue - \@ifnextchar[%] - {\csname @new\string#1@opt\endcsname{##1}{##2}} - {\csname @new\string#1@noopt\endcsname{##1}{##2}}}% + \@optarg{\csname @new\string#1@opt\endcsname{##1}{##2}}}% \def@c{renew\expandafter\@gobble\string#1}##1##2{% \@mlist@warnfalse - \@ifnextchar[%] - {\csname @new\string#1@opt\endcsname{##1}{##2}} - {\csname @new\string#1@noopt\endcsname{##1}{##2}}}% + \@optarg{\csname @new\string#1@opt\endcsname{##1}{##2}}}% \def@c{@new\string#1@opt}##1##2[##3]{% \csname @new\string#1\endcsname{##1}{##2}{##3}}% - \def@c{@new\string#1@noopt}##1##2{% - \csname @new\string#1\endcsname{##1}{##2}{}}% \def@c{@new\string#1}##1##2##3{% \if@mlist@warn \ifdefined##1 @@ -260,36 +249,8 @@ \def@c{@new\string##1@opt}####1{% \@mlist{symbol=##2,#2,##3,index={####1}}}}% } -\mlistsetup{% - sep={,}, - sepsep={;}, - wrapcmd=\mlistparen, - wrapone={}{}, - dots=\dots, - dot={\,\cdot\,}, - elemcmd=\mlistelem, - headcmd=\mathbf, - index={}, -} -\newmlist\vect[ - wrapcmd=\mlistparen, - wraponecmd=\mlistnowrap, - elemcmd=\mlistsub, - headcmd=\mathbf, -] -\newmlist\matr[ - sep=&, - sepsep=\\, - elemcmd=\mlistelem, - wrap={\begin{bmatrix}} - {\end{bmatrix}}, -] -\newmlist\func[ - headcmd=\mlisthead, - elemcmd=\mlistelem, - wrapcmd=\mlistheadparen, - wraponecmd, -] +\InputIfFileExists{mlist.cfg}{} + {\PackageWarning{mlist}{No configuration file (mlist.cfg) found nor loaded}} %% %% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com> %% @@ -301,7 +262,10 @@ %% by Will Robertson. %% %% This work consists of the file mlist.dtx -%% and the derived files mlist.sty and mlist.pdf. +%% and the derived files mlist.pdf, +%% mlist.sty, +%% mlist.cfg, and +%% mlist.ins. %% %% %% End of file `mlist.sty'. |