diff options
author | Karl Berry <karl@freefriends.org> | 2015-10-25 22:26:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-10-25 22:26:36 +0000 |
commit | 2e5f14f60a516e247773eb44e16fdf71b24ffc6b (patch) | |
tree | dcf766a159ceb803ff37d6fc6093f14de9a57741 /Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty | |
parent | b21104f52f6a326c74adaf89be9b55745d4e65ba (diff) |
lisp-on-tex (25oct15)
git-svn-id: svn://tug.org/texlive/trunk@38706 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty b/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty index 54af9aa33dd..291b343baa3 100644 --- a/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty +++ b/Master/texmf-dist/tex/latex/lisp-on-tex/lisp-mod-fpnum.sty @@ -1,5 +1,13 @@ %%% module name :: fpnum +% regist type and gc +\ifx\@defined@additional@type\@empty + \def\@defined@additional@type{fpnum}% +\else + \edef\@defined@additional@type{\@defined@additional@type,fpnum}% +\fi +\let\@lisp@gc@trace@fpnum\@gobble + \def\@mod@read@fpnum#1#2{\gdef#1{\@tlabel@fpnum{#2}}} \def\@tlabel@fpnum{\@eval@fpnum\@apply@fpnum\@@apply@fpnum} @@ -10,10 +18,12 @@ \newdimen\@tempdimeni \newdimen\@tempdimenii -\addassoc\@globalenv\fpnumTOstring{\@tlabel@func{\@mod@fpnum@tostring}} +\@lisp@env@add@global\fpnumTOstring{\@tlabel@func{\@lisp@func@check@args{1}{\@mod@fpnum@tostring}}} +%TODO: error handling \def\@mod@fpnum@tostring#1\@tlabel@fpnum#2{\gdef#1{\@tlabel@string{#2}}} -\addassoc\@globalenv\fpplus{\@tlabel@func{\@tempdimeni0pt\relax\@mod@fpnum@plus}} +\@lisp@env@add@global\fpplus{\@tlabel@func{\@lisp@func@check@args{*}{\@tempdimeni0pt\relax\@mod@fpnum@plus}}} +%TODO: error handling \def\@mod@fpnum@plus#1#2#3{% \ifx#2\relax \let\@next@fpnum@plus\@@fin@fpnum@plus @@ -25,7 +35,8 @@ \fi\fi\@next@fpnum@plus#1} \def\@@fin@fpnum@plus#1{\xdef#1{\noexpand\@tlabel@fpnum{\strip@pt\@tempdimeni}}} -\addassoc\@globalenv\fpmul{\@tlabel@func{\@tempdimeni1pt\relax\@mod@fpnum@mul}} +\@lisp@env@add@global\fpmul{\@tlabel@func{\@lisp@func@check@args{*}{\@tempdimeni1pt\relax\@mod@fpnum@mul}}} +%TODO: error handling \def\@mod@fpnum@mul#1#2#3{% \ifx#2\relax \let\@next@fpnum@mul\@@fin@fpnum@mul @@ -37,7 +48,7 @@ \fi\fi\@next@fpnum@mul#1} \def\@@fin@fpnum@mul#1{\xdef#1{\noexpand\@tlabel@fpnum{\strip@pt\@tempdimeni}}} -\addassoc\@globalenv\fpminus{\@tlabel@func{\@mod@fpnum@minus}} +\@lisp@env@add@global\fpminus{\@tlabel@func{\@lisp@func@check@args{+}{\@mod@fpnum@minus}}} \def\@mod@fpnum@minus#1#2#3#4#5{% \ifx#4\relax \ifx#2\@tlabel@fpnum @@ -72,7 +83,7 @@ \fi\fi \@next@fpnum@minus#1} -\addassoc\@globalenv\fplt{\@tlabel@func{\@mod@fpnum@lt}} +\@lisp@env@add@global\fplt{\@tlabel@func{\@lisp@func@check@args{2}{\@mod@fpnum@lt}}} \def\@mod@fpnum@lt#1\@tlabel@fpnum#2\@tlabel@fpnum#3{% \ifdim#2pt<#3pt \gdef#1{\@tlabel@bool{t}}% |