summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/mlist
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-22 14:27:04 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-22 14:27:04 +0000
commitf635c3a0313dc1bfa20fbf48b7dd30979a6f5dec (patch)
tree03e92ed1cf12288d029182c280e9b9f7942297e2 /Master/texmf-dist/source/latex/mlist
parentd52b367c5437bcba881bac5f4c4fc20bbe8a25fa (diff)
mlist v0.6 2008/05/22 (from tds.zip)
git-svn-id: svn://tug.org/texlive/trunk@8287 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/mlist')
-rw-r--r--Master/texmf-dist/source/latex/mlist/mlist.dtx52
1 files changed, 43 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/mlist/mlist.dtx b/Master/texmf-dist/source/latex/mlist/mlist.dtx
index 19ba4116a7a..1ec3d35f9a6 100644
--- a/Master/texmf-dist/source/latex/mlist/mlist.dtx
+++ b/Master/texmf-dist/source/latex/mlist/mlist.dtx
@@ -5,7 +5,7 @@
%<*readme>
_________________
The MLIST package
-v0.5
+v0.6
This package defines the commands \newvect, \newmatr, \newfunc,
and \newmset for creating macros to typeset vectors, matrices,
@@ -26,8 +26,11 @@ All aspects of the typeset appearance can be adjusted, and new
Consider this package an exploration of separation of form and content
for some mathematical constructions. I hope you find it useful.
-______________
-Change history
+____________________
+Brief change history
+
+v0.6: Added the headhook option to accomodate accents to
+ the head symbol. Perhaps a little experimental.
v0.5: Introduced \newmset for defining mathematical sets;
with pre-defined sets \setR, \setC, \setZ, \setN.
@@ -36,7 +39,7 @@ ______________
Will Robertson
wspr 81 [at] gmail [dot] com
-Copyright 2007
+Copyright 2007-2008
Distributed under the LaTeX Project Public License
%</readme>
%<*internal>
@@ -411,6 +414,35 @@ This work consists of the file mlist.dtx
% \[ \A{1,2,3,4} \qquad \A{3} \]
% \end{example}
%
+% \subsection{Head prefixing}
+%
+% Applying (things like) accents to \pkg{mlist}s will often give the wrong result:
+% \begin{example}{}
+% \newfunc\A{A}
+% $\A{1}$ \qquad $\bar{\A{1}}$
+% \end{example}
+%
+% The solution for this involves defining a prefix for the head element with the |headhook| option:
+% \begin{example}{}
+% \newfunc\A{A}
+% \newcommand\baraccent[1]{%
+% {\mlistsetup{headhook=\bar}#1}}
+% $\A{1}$ \qquad $\baraccent{\A{1}}$
+% \end{example}
+%
+% This method can also be used to apply \emph{post}fix elements as well:
+% \begin{example}{}
+% \newfunc\A{A}
+% \newcommand\postprime[1]{#1'}
+% \newcommand\primeaccent[1]{%
+% {\mlistsetup{headhook=\postprime}#1}}
+% $\A{1}$ \qquad $\A{1}'$ \qquad $\primeaccent{\A{1}}$
+% \end{example}
+%
+% The user interface for these features is rather rough and needs more thought; it might be better if \cmd\mlistsetup\ did not need to be called in the accent definition.
+%
+% For these reasons the |headhook| feature should be considered a little experimental and possibly subject to change in the future. It should certainly be accompanied by a variety of `\cmd\baraccent'--like commands, unless \cmd\bar\ can be patched to recognise such situations automatically (this seems unlikely).
+%
% \subsection{Delimiter formatting}
%
% The \opt{wrap} and \opt{wrapone} options are used to change the way
@@ -546,6 +578,7 @@ This work consists of the file mlist.dtx
elemcmd=\mlistelem,
headcmd=\mathbf,
index={},
+ headhook={},
}
% \end{macrocode}
%
@@ -722,7 +755,7 @@ This work consists of the file mlist.dtx
%
% \begin{macrocode}
\ProvidesPackage{mlist}
- [2007/09/19 v0.5 Typesetting maths lists]
+ [2008/05/22 v0.6 Typesetting maths lists]
% \end{macrocode}
%
% \PrintChanges
@@ -850,7 +883,7 @@ This work consists of the file mlist.dtx
% \begin{macrocode}
\define@cmdkeys[mlist]{sym}[mlist@]{%
symbol,index,sep,sepsep,elem,
- elemcmd,headcmd,dot,dots}
+ elemcmd,headcmd,dot,dots,headhook}
% \end{macrocode}
%
% \subsection{Wrapping}
@@ -1003,7 +1036,7 @@ This work consists of the file mlist.dtx
% If there are no optional arguments, typeset the plain vector symbol.
% \begin{macrocode}
\ifx\@empty\mlist@index\relax
- \def\mlist@list{\mlist@headcmd{\mlist@symbol}}%
+ \def\mlist@list{\mlist@headcmd{\mlist@headhook\mlist@symbol}}%
\else
% \end{macrocode}
% Otherwise, iterate over every semicolon-separated list.
@@ -1043,7 +1076,7 @@ This work consists of the file mlist.dtx
\ifx\@ii\mlist@period
\mlist@add{\mlist@dot\@gobble}%
\else
- \mlist@add{\mlist@elemcmd{\mlist@symbol}}%
+ \mlist@add{\mlist@elemcmd{\mlist@headhook\mlist@symbol}}%
\fi
\fi}%
% \end{macrocode}
@@ -1075,7 +1108,7 @@ This work consists of the file mlist.dtx
% That was the end of semicolon-separated iteration.
% \begin{macrocode}
\def\mlist@list{%
- \mlist@wrap{\mlist@headcmd{\mlist@symbol}}
+ \mlist@wrap{\mlist@headcmd{\mlist@headhook\mlist@symbol}}
{\mlist@list@elems}}%
% \end{macrocode}
% If only have a single element:
@@ -1094,6 +1127,7 @@ This work consists of the file mlist.dtx
% 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)}
+% \changes{v0.6}{2008/04/02}{Added \cmd\mlist@headhook.}
% \end{macro}
%
% \begin{macro}{\mlist@add}