texlive[54244] Master: mathlig own package, from genmisc
commits+karl at tug.org
commits+karl at tug.org
Wed Mar 11 23:13:46 CET 2020
Revision: 54244
http://tug.org/svn/texlive?view=revision&revision=54244
Author: karl
Date: 2020-03-11 23:13:46 +0100 (Wed, 11 Mar 2020)
Log Message:
-----------
mathlig own package, from genmisc
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/tex/generic/mathlig/
trunk/Master/texmf-dist/tex/generic/mathlig/mathlig.tex
trunk/Master/tlpkg/tlpsrc/mathlig.tlpsrc
Removed Paths:
-------------
trunk/Master/texmf-dist/tex/generic/genmisc/mathlig.tex
Deleted: trunk/Master/texmf-dist/tex/generic/genmisc/mathlig.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/genmisc/mathlig.tex 2020-03-11 22:02:29 UTC (rev 54243)
+++ trunk/Master/texmf-dist/tex/generic/genmisc/mathlig.tex 2020-03-11 22:13:46 UTC (rev 54244)
@@ -1,131 +0,0 @@
-%
-% mathlig.tex
-%
-% (c) 2001 Jules Bean <jules at jellybean.co.uk>
-% Permission is granted to freely use, copy, and distribute
-% without restriction. Permission is also granted to distribute
-% modified versions and incorporate into your own macro packages
-% if a brief acknowledgement is given.
-%
-% Version 1.0 11 May 2001
-
-% Define 'mathmode' ligatures, as in
-%
-%\mathlig{->}{\rightarrow}
-%\mathlig{<-}{\leftarrow}
-%\mathlig{<->}{\leftrightarrow}
-%
-% Works even if they have common prefixes (takes the longest match,
-% then backtracks).
-%
-% Can be used to create ligatures even if the second
-% and subsequent characters have weird catcodes, but I don't recommend
-% it.
-
-\count255\catcode`@
-\catcode`@=11
-\chardef\mathlig at atcode\count255
-
-% Let or def an 'active' version of a token. Thanks to Donald
-% Arseneau and groups.google.com
-\def\actively#1#2{\begingroup\uccode`\~=`#2\relax\uppercase{\endgroup#1~}}
-% Eat the next token, and then pass control to mathlig at next@cmd
-\def\mathlig at gobble{\afterassignment\mathlig at next@cmd\let\mathlig at next= }
-% Used to delimit delimited arguments, and ifx tests for emptyness.
-\def\mathlig at delim{\mathlig at delim}
-% Some macros to help dealing with 'computed names' (csnames).
-% Just like def, but first parameter is evaluated as a csname
-\def\mathlig at defcs#1{\expandafter\def\csname#1\endcsname}
-% A version of \let <normal cs><computed cs>
-\def\mathlig at let@cs#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}
-% Maintain a 'list' of tokens as a macro which expands to them
-\def\mathlig at appendcs#1#2{\expandafter\edef\csname#1\endcsname{\csname#1\endcsname#2}}
-
-% The main externally visible macro.
-% Defines '#1' as a 'ligature' to expand to #2
-% First uses \mathlig at checklig to make sure that all initial segments of
-% #1 as set up as ligatures.
-% Then sets the ligature #1 to expand to #2.
-\def\mathlig#1#2{\mathlig at checklig#1\mathlig at end\mathlig at defcs{mathlig at back@#1}{#2}\ignorespaces}
-
-% All the @check macros should be idempotent: they set up the definitions
-% only if it hasn't already been done.
-
-%Check #1#2 can be a ligature:
-% Check #1 is math-active.
-% If not, save the mathcode, set the macros #1
-%Now check the suffix tables with \checkrest
-\def\mathlig at checklig#1#2\mathlig at end{%
- \expandafter\ifx\csname mathlig at forw@#1\endcsname\relax
- \expandafter\mathchardef\csname mathlig at back@#1\endcsname=\mathcode`#1%
- \mathcode`#1"8000\actively\def#1{\csname mathlig at look@#1\endcsname}%
- \mathlig at dolig#1\mathlig at delim
-\fi
-\mathlig at checksuffix#1#2\mathlig at end
-}
-
-%Two-part macro.
-%Check suffix tables. If #2 is empty, no suffix!
-%Otherwise, we make sure #2 is a valid suffix for #1,
-%then recurse for #3 on #1#2
-\def\mathlig at checksuffix#1#2\mathlig at end{%
-\ifx\mathlig at delim#2\mathlig at delim\relax\else\mathlig at checksuffix@{#1}#2\mathlig at end\fi
-}
-\def\mathlig at checksuffix@#1#2#3\mathlig at end{%
-\expandafter\ifx\csname mathlig at forw@#1#2\endcsname\relax\mathlig at dosuffix{#1}{#2}\fi
-\mathlig at checksuffix{#1#2}#3\mathlig at end
-}
-
-% The do macros should not be called more than once for a given ligature.
-
-% Add #2 to the list of valid suffixes for #1
-% Then make the ligature for #1#2 one which only backtracks, for now
-\def\mathlig at dosuffix#1#2{%
-\mathlig at appendcs{mathlig at toks@#1}{#2}%
-\mathlig at dolig{#1}{#2}\mathlig at delim
-}
-
-% Setup #1#2 so that ligatures beginning #1#2 work.
-% Such ligatures will look at what's coming next (in case
-% of a longer ligature) and, failing that,
-% backtrack to just #1
-
-\def\mathlig at dolig#1#2\mathlig at delim{%
-%The look macro just \futurelets what's coming up and
-%then passes control to forw
- \mathlig at defcs{mathlig at look@#1#2}{%
- \mathlig at let@cs\mathlig at next{mathlig at forw@#1#2}\futurelet\mathlig at next@tok\mathlig at next}%
-%The forw macro uses chck to try all possible suffixes, passing control
-%either to one of those, or to the back macro
- \mathlig at defcs{mathlig at forw@#1#2}{%
- \mathlig at let@cs\mathlig at next{mathlig at back@#1#2}%
- \mathlig at let@cs\checker{mathlig at chck@#1#2}%
- \mathlig at let@cs\mathligtoks{mathlig at toks@#1#2}%
- \expandafter\ifx\expandafter\mathlig at delim\mathligtoks\mathlig at delim\relax\else
- \expandafter\checker\mathligtoks\mathlig at delim\fi
- \mathlig at next
- }%
-%The toks macro just stores the suffixes
- \mathlig at defcs{mathlig at toks@#1#2}{}%
-%The chk macro goes through the suffixes one by one
-%tail recursing until it runs out, or finds one.
- \mathlig at defcs{mathlig at chck@#1#2}##1##2\mathlig at delim{%
- %\message{Lig so far '#1#2', checking for '##1'}%
- \ifx\mathlig at next@tok##1%
- \mathlig at let@cs\mathlig at next@cmd{mathlig at look@#1#2##1}\let\mathlig at next\mathlig at gobble
- \fi
- \ifx\mathlig at delim##2\mathlig at delim\relax\else
- \csname mathlig at chck@#1#2\endcsname##2\mathlig at delim
- \fi
- }%
-%
-% The back macro, defined only if this is a ligature of at least
-% two characters, is a default fallback: go back to the previous char.
-% (If this is a ligature of only one character, the mathcode will have
-% been saved and set as the fallback elsewhere)
- \ifx\mathlig at delim#2\mathlig at delim\else
- \mathlig at defcs{mathlig at back@#1#2}{\csname mathlig at back@#1\endcsname #2}%
- \fi
-}%
-
-\catcode`@\mathlig at atcode
Added: trunk/Master/texmf-dist/tex/generic/mathlig/mathlig.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/mathlig/mathlig.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/mathlig/mathlig.tex 2020-03-11 22:13:46 UTC (rev 54244)
@@ -0,0 +1,131 @@
+%
+% mathlig.tex
+%
+% (c) 2001 Jules Bean <jules at jellybean.co.uk>
+% Permission is granted to freely use, copy, and distribute
+% without restriction. Permission is also granted to distribute
+% modified versions and incorporate into your own macro packages
+% if a brief acknowledgement is given.
+%
+% Version 1.0 11 May 2001
+
+% Define 'mathmode' ligatures, as in
+%
+%\mathlig{->}{\rightarrow}
+%\mathlig{<-}{\leftarrow}
+%\mathlig{<->}{\leftrightarrow}
+%
+% Works even if they have common prefixes (takes the longest match,
+% then backtracks).
+%
+% Can be used to create ligatures even if the second
+% and subsequent characters have weird catcodes, but I don't recommend
+% it.
+
+\count255\catcode`@
+\catcode`@=11
+\chardef\mathlig at atcode\count255
+
+% Let or def an 'active' version of a token. Thanks to Donald
+% Arseneau and groups.google.com
+\def\actively#1#2{\begingroup\uccode`\~=`#2\relax\uppercase{\endgroup#1~}}
+% Eat the next token, and then pass control to mathlig at next@cmd
+\def\mathlig at gobble{\afterassignment\mathlig at next@cmd\let\mathlig at next= }
+% Used to delimit delimited arguments, and ifx tests for emptyness.
+\def\mathlig at delim{\mathlig at delim}
+% Some macros to help dealing with 'computed names' (csnames).
+% Just like def, but first parameter is evaluated as a csname
+\def\mathlig at defcs#1{\expandafter\def\csname#1\endcsname}
+% A version of \let <normal cs><computed cs>
+\def\mathlig at let@cs#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}
+% Maintain a 'list' of tokens as a macro which expands to them
+\def\mathlig at appendcs#1#2{\expandafter\edef\csname#1\endcsname{\csname#1\endcsname#2}}
+
+% The main externally visible macro.
+% Defines '#1' as a 'ligature' to expand to #2
+% First uses \mathlig at checklig to make sure that all initial segments of
+% #1 as set up as ligatures.
+% Then sets the ligature #1 to expand to #2.
+\def\mathlig#1#2{\mathlig at checklig#1\mathlig at end\mathlig at defcs{mathlig at back@#1}{#2}\ignorespaces}
+
+% All the @check macros should be idempotent: they set up the definitions
+% only if it hasn't already been done.
+
+%Check #1#2 can be a ligature:
+% Check #1 is math-active.
+% If not, save the mathcode, set the macros #1
+%Now check the suffix tables with \checkrest
+\def\mathlig at checklig#1#2\mathlig at end{%
+ \expandafter\ifx\csname mathlig at forw@#1\endcsname\relax
+ \expandafter\mathchardef\csname mathlig at back@#1\endcsname=\mathcode`#1%
+ \mathcode`#1"8000\actively\def#1{\csname mathlig at look@#1\endcsname}%
+ \mathlig at dolig#1\mathlig at delim
+\fi
+\mathlig at checksuffix#1#2\mathlig at end
+}
+
+%Two-part macro.
+%Check suffix tables. If #2 is empty, no suffix!
+%Otherwise, we make sure #2 is a valid suffix for #1,
+%then recurse for #3 on #1#2
+\def\mathlig at checksuffix#1#2\mathlig at end{%
+\ifx\mathlig at delim#2\mathlig at delim\relax\else\mathlig at checksuffix@{#1}#2\mathlig at end\fi
+}
+\def\mathlig at checksuffix@#1#2#3\mathlig at end{%
+\expandafter\ifx\csname mathlig at forw@#1#2\endcsname\relax\mathlig at dosuffix{#1}{#2}\fi
+\mathlig at checksuffix{#1#2}#3\mathlig at end
+}
+
+% The do macros should not be called more than once for a given ligature.
+
+% Add #2 to the list of valid suffixes for #1
+% Then make the ligature for #1#2 one which only backtracks, for now
+\def\mathlig at dosuffix#1#2{%
+\mathlig at appendcs{mathlig at toks@#1}{#2}%
+\mathlig at dolig{#1}{#2}\mathlig at delim
+}
+
+% Setup #1#2 so that ligatures beginning #1#2 work.
+% Such ligatures will look at what's coming next (in case
+% of a longer ligature) and, failing that,
+% backtrack to just #1
+
+\def\mathlig at dolig#1#2\mathlig at delim{%
+%The look macro just \futurelets what's coming up and
+%then passes control to forw
+ \mathlig at defcs{mathlig at look@#1#2}{%
+ \mathlig at let@cs\mathlig at next{mathlig at forw@#1#2}\futurelet\mathlig at next@tok\mathlig at next}%
+%The forw macro uses chck to try all possible suffixes, passing control
+%either to one of those, or to the back macro
+ \mathlig at defcs{mathlig at forw@#1#2}{%
+ \mathlig at let@cs\mathlig at next{mathlig at back@#1#2}%
+ \mathlig at let@cs\checker{mathlig at chck@#1#2}%
+ \mathlig at let@cs\mathligtoks{mathlig at toks@#1#2}%
+ \expandafter\ifx\expandafter\mathlig at delim\mathligtoks\mathlig at delim\relax\else
+ \expandafter\checker\mathligtoks\mathlig at delim\fi
+ \mathlig at next
+ }%
+%The toks macro just stores the suffixes
+ \mathlig at defcs{mathlig at toks@#1#2}{}%
+%The chk macro goes through the suffixes one by one
+%tail recursing until it runs out, or finds one.
+ \mathlig at defcs{mathlig at chck@#1#2}##1##2\mathlig at delim{%
+ %\message{Lig so far '#1#2', checking for '##1'}%
+ \ifx\mathlig at next@tok##1%
+ \mathlig at let@cs\mathlig at next@cmd{mathlig at look@#1#2##1}\let\mathlig at next\mathlig at gobble
+ \fi
+ \ifx\mathlig at delim##2\mathlig at delim\relax\else
+ \csname mathlig at chck@#1#2\endcsname##2\mathlig at delim
+ \fi
+ }%
+%
+% The back macro, defined only if this is a ligature of at least
+% two characters, is a default fallback: go back to the previous char.
+% (If this is a ligature of only one character, the mathcode will have
+% been saved and set as the fallback elsewhere)
+ \ifx\mathlig at delim#2\mathlig at delim\else
+ \mathlig at defcs{mathlig at back@#1#2}{\csname mathlig at back@#1\endcsname #2}%
+ \fi
+}%
+
+\catcode`@\mathlig at atcode
Property changes on: trunk/Master/texmf-dist/tex/generic/mathlig/mathlig.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2020-03-11 22:02:29 UTC (rev 54243)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2020-03-11 22:13:46 UTC (rev 54244)
@@ -467,7 +467,7 @@
matc3 matc3mem match_parens
math-e math-into-latex-4 mathabx mathabx-type1 mathalpha mathastext
mathcommand mathcomp mathdesign mathdots mathexam
- mathfam256 mathfixs mathfont mathpartir mathpazo mathpunctspace
+ mathfam256 mathfixs mathfont mathlig mathpartir mathpazo mathpunctspace
mathspec mathtools matlab-prettifier mathspic maths-symbols
matrix-skeleton mattens maybemath
mcaption mceinleger mcexam mcf2graph mcite mciteplus mcmthesis
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2020-03-11 22:02:29 UTC (rev 54243)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2020-03-11 22:13:46 UTC (rev 54244)
@@ -1638,6 +1638,7 @@
'lyluatex', 'luatex',
'mathabx', 'generic',
'mathdots', 'generic',
+ 'mathlig', 'generic',
'metatex', 'plain',
'mfpic', 'generic',
'midnight', 'generic',
@@ -1935,6 +1936,7 @@
'midnight', '\.tex',
'mil3', 'NULL',
'mathabx', 'mathabx\.(dcl|tex)|' . $standardtex,
+ 'mathlig', '\.tex',
'minitoc', '\.ml[do]|' . $standardtex,
'misc', '\.sty|\.ltx|\.cls',
'mkpattern', 'mkpatter.tex',
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc 2020-03-11 22:02:29 UTC (rev 54243)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc 2020-03-11 22:13:46 UTC (rev 54244)
@@ -118,6 +118,7 @@
depend mathcommand
depend mathcomp
depend mathfixs
+depend mathlig
depend mathpartir
depend mathpunctspace
depend matrix-skeleton
Added: trunk/Master/tlpkg/tlpsrc/mathlig.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.