diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-03 23:47:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-03 23:47:14 +0000 |
commit | 94921319f96b6ef37f21921d2354d3f5a93cff40 (patch) | |
tree | 4f9e2a9cbbc910f4ccf8a5fb529848db907d6a73 /Master/texmf-dist | |
parent | 91933032894054038bc811d9f2445da230661faa (diff) |
luamplib (3feb14)
git-svn-id: svn://tug.org/texlive/trunk@32862 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/NEWS | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf | bin | 114460 -> 115536 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/source/luatex/luamplib/Makefile | 22 | ||||
-rw-r--r-- | Master/texmf-dist/source/luatex/luamplib/luamplib.dtx | 31 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.sty | 5 |
9 files changed, 60 insertions, 26 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS index fb51e6062cc..48a48ec90e3 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/NEWS +++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS @@ -1,5 +1,10 @@ History of the luamplib package +2014/02/02 2.4 + * implemented "numbersystem" option. Default value "scaled" can be + changed by declaring \mplibnumbersystem{double}. For details, see + http://github.com/lualatex/luamplib/issues/21 + 2014/01/20 2.3 * \everymplib, \everyendmplib: macros that redefine token lists \everymplibtoks and \everyendmplibtoks. These will be diff --git a/Master/texmf-dist/doc/luatex/luamplib/README b/Master/texmf-dist/doc/luatex/luamplib/README index bd195aa62cd..83d3ba907ba 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/README +++ b/Master/texmf-dist/doc/luatex/luamplib/README @@ -16,7 +16,7 @@ Here are the recommended installation methods (preferred first). Alternatively, try your (TeX or Linux) distribution's package management system. 2. a. Grab the sources from CTAN or github. - b. Run 'make install TEXMFROOT=/path/to/texmf'. + b. Run 'make install TEXMFDIR=/path/to/texmf'. c. You may need to update some filename database after, see your TeX distribution's manual for details. diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf Binary files differindex 7f1fd6d5328..c01d04c5b60 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf +++ b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex index 211667504bb..993ce15f149 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex @@ -92,4 +92,12 @@ endfig; \copy\mympbox \copy\mympbox \copy\mympbox + +\mplibnumbersystem{double}% +\begin{mplibcode} +beginfig(0); +u := 10**5*(10**-4); +draw unitsquare scaled u; +endfig; +\end{mplibcode}% \end{document} diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex index f2262d91e39..a2e9dd1489f 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex @@ -89,4 +89,12 @@ endfig; \copy\mympbox \copy\mympbox \copy\mympbox + +\mplibnumbersystem{double}% +\mplibcode +beginfig(0); +u := 10**5*(10**-4); +draw unitsquare scaled u; +endfig; +\endmplibcode \bye diff --git a/Master/texmf-dist/source/luatex/luamplib/Makefile b/Master/texmf-dist/source/luatex/luamplib/Makefile index cf17c9cfb8d..772fb3b6b85 100644 --- a/Master/texmf-dist/source/luatex/luamplib/Makefile +++ b/Master/texmf-dist/source/luatex/luamplib/Makefile @@ -17,10 +17,10 @@ RUNFILES = $(STY) $(LUA) ALL = $(SRCFILES) $(DOCFILES) $(RUNFILES) -TEXMFROOT = ./texmf -RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME) -DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME) -SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME) +TEXMFDIR = ./texmf +RUNDIR = $(TEXMFDIR)/tex/$(FORMAT)/$(NAME) +DOCDIR = $(TEXMFDIR)/doc/$(FORMAT)/$(NAME) +SRCDIR = $(TEXMFDIR)/source/$(FORMAT)/$(NAME) CTAN_ZIP = $(NAME).zip TDS_ZIP = $(NAME).tds.zip @@ -39,7 +39,7 @@ world: all ctan latexmk -lualatex -recorder- -silent $< >/dev/null $(UNPACKED): $(DTX) - tex -interaction=batchmode $< >/dev/null + luatex -interaction=batchmode $< >/dev/null check: $(UNPACKED) luatex -interaction=batchmode test-$(NAME)-plain.tex >/dev/null @@ -61,19 +61,19 @@ define run-install @mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR) endef -$(TDS_ZIP): TEXMFROOT=./tmp-texmf +$(TDS_ZIP): TEXMFDIR=./tmp-texmf $(TDS_ZIP): $(ALL) @echo "Making TDS-ready archive $@." @$(RM) -- $@ - @if test -e $(TEXMFROOT); then echo 'bad TEXMFROOT'; false; fi + @if test -e $(TEXMFDIR); then echo 'bad TEXMFDIR'; false; fi $(run-install) - @cd $(TEXMFROOT) && zip -q -9 ../$@ -r . - @$(RM) -r -- $(TEXMFROOT) + @cd $(TEXMFDIR) && zip -q -9 ../$@ -r . + @$(RM) -r -- $(TEXMFDIR) .PHONY: install clean mrproper help install: check $(ALL) - @echo "Installing in '$(TEXMFROOT)'." + @echo "Installing in '$(TEXMFDIR)'." $(run-install) clean: @@ -93,4 +93,4 @@ help: @echo ' ctan - run check & generate archive for CTAN' @echo ' tds - generate a TDS compliant archive' @echo ' check - run the test files' - @echo ' install TEXMFROOT=<path> - install in <path>' + @echo ' install TEXMFDIR=<path> - install in <path>' diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx index 01de897bbe6..0cbae2e6ad3 100644 --- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx +++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx @@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information. %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luamplib.drv}% - [2014/01/23 v2.3 Interface for using the mplib library]% + [2014/02/02 v2.4 Interface for using the mplib library]% \documentclass{ltxdoc} \usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace} \usepackage[x11names]{xcolor} @@ -154,7 +154,7 @@ See source file '\inFileName' for licencing and contact information. % \author{Hans Hagen, Taco Hoekwater, Elie Roux, Philipp Gesang and Kim Dohyun\\ % Maintainer: LuaLaTeX Maintainers --- % Support: \email{lualatex-dev@tug.org}} -% \date{2014/01/23 v2.3} +% \date{2014/02/02 v2.4} % % \maketitle % @@ -201,10 +201,10 @@ See source file '\inFileName' for licencing and contact information. % \textsc{e.g.} % \begin{verbatim} % \mplibcode -% verbatimtex \moveright 3cm etex; beignfig(0); ... endfig; -% verbatimtex \leavevmode etex; beignfig(1); ... endfig; -% verbatimtex \leavevmode\lower 1ex etex; beignfig(2); ... endfig; -% verbatimtex \endgraf\moveright 1cm etex; beignfig(3); ... endfig; +% verbatimtex \moveright 3cm etex; beginfig(0); ... endfig; +% verbatimtex \leavevmode etex; beginfig(1); ... endfig; +% verbatimtex \leavevmode\lower 1ex etex; beginfig(2); ... endfig; +% verbatimtex \endgraf\moveright 1cm etex; beginfig(3); ... endfig; % \endmplibcode % \end{verbatim} % \textsc{n.b.} \cs{endgraf} should be used instead of \cs{par} inside @@ -219,7 +219,7 @@ See source file '\inFileName' for licencing and contact information. % \begin{verbatim} % \everymplib{ verbatimtex \leavevmode etex; beginfig(0); } % \everyendmplib{ endfig; } -% \mplibcode % befinfig/endfig not needed; always in horizontal mode +% \mplibcode % beginfig/endfig not needed; always in horizontal mode % draw fullcircle scaled 1cm; % \endmplibcode % \end{verbatim} @@ -237,6 +237,10 @@ See source file '\inFileName' for licencing and contact information. % |btex ... etex| as provided by gmp package. As \textsf{luamplib} % automatically protects \TeX\ code inbetween, \cs{btex} is not supported % here. +% \item Users can choose |numbersystem| option since v2.4. +% The default value |scaled| can be changed to |double| by declaring +% |\mplibnumbersystem{double}|. For details see +% \url{http://github.com/lualatex/luamplib/issues/21}. % \end{itemize} % % There are (basically) two formats for metapost: \emph{plain} and @@ -269,8 +273,8 @@ luamplib.lastlog = "" local err, warn, info, log = luatexbase.provides_module({ name = "luamplib", - version = 2.3, - date = "2014/01/23", + version = 2.4, + date = "2014/02/02", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", }) @@ -410,6 +414,12 @@ else local mpx = mplib.new { ini_version = true, find_file = luamplib.finder, +% \end{macrocode} +% Provides |numbersystem| option since v2.4. Default value |"scaled"| +% can be changed by declaring |\mplibnumbersystem{double}|. +% See \url{https://github.com/lualatex/luamplib/issues/21}. +% \begin{macrocode} + math_mode = luamplib.numbersystem, } local result if not mpx then @@ -1155,7 +1165,7 @@ luamplib.colorconverter = colorconverter \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luamplib} - [2014/01/23 v2.3 mplib package for LuaTeX] + [2014/02/02 v2.4 mplib package for LuaTeX] \RequirePackage{luatexbase-modutils} \RequirePackage{pdftexcmds} \fi @@ -1277,6 +1287,7 @@ luamplib.colorconverter = colorconverter \everyendmplibtoks{#1}% } \def\mpdim#1{ begingroup \the\dimexpr #1\relax\space endgroup } % gmp.sty +\def\mplibnumbersystem#1{\directlua{luamplib.numbersystem = "#1"}} % \end{macrocode} % % We use a dedicated scratchbox. diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua index b5a8b776862..0cc7a65a92f 100644 --- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua @@ -18,8 +18,8 @@ luamplib.lastlog = "" local err, warn, info, log = luatexbase.provides_module({ name = "luamplib", - version = 2.3, - date = "2014/01/23", + version = 2.4, + date = "2014/02/02", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", }) @@ -124,6 +124,7 @@ else local mpx = mplib.new { ini_version = true, find_file = luamplib.finder, + math_mode = luamplib.numbersystem, } local result if not mpx then diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty index 5b3374fefcf..c1c75a46ad8 100644 --- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty @@ -14,7 +14,7 @@ \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luamplib} - [2014/01/23 v2.3 mplib package for LuaTeX] + [2014/02/02 v2.4 mplib package for LuaTeX] \RequirePackage{luatexbase-modutils} \RequirePackage{pdftexcmds} \fi @@ -38,7 +38,7 @@ %catcode`\{=12 %catcode`\}=12 \catcode`\#=12 \catcode`\^=12 \catcode`\~=12 \catcode`\_=12 - %catcode`\%=12 %% don^^e2^^80^^99t in Plain! + %catcode`\%=12 %% don’t in Plain! \catcode`\&=12 \catcode`\$=12 } \def\mplibputtextbox#1{\vbox to 0pt{\vss\hbox to 0pt{\raise\dp#1\copy#1\hss}}} @@ -98,6 +98,7 @@ \everyendmplibtoks{#1}% } \def\mpdim#1{ begingroup \the\dimexpr #1\relax\space endgroup } % gmp.sty +\def\mplibnumbersystem#1{\directlua{luamplib.numbersystem = "#1"}} \ifx\mplibscratchbox\undefined \newbox\mplibscratchbox \fi \def\mplibstarttoPDF#1#2#3#4{% \hbox\bgroup |