From 94921319f96b6ef37f21921d2354d3f5a93cff40 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 3 Feb 2014 23:47:14 +0000 Subject: luamplib (3feb14) git-svn-id: svn://tug.org/texlive/trunk@32862 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/luatex/luamplib/Makefile | 22 +++++++-------- .../texmf-dist/source/luatex/luamplib/luamplib.dtx | 31 +++++++++++++++------- 2 files changed, 32 insertions(+), 21 deletions(-) (limited to 'Master/texmf-dist/source/luatex') 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= - install in ' + @echo ' install TEXMFDIR= - install in ' 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. -- cgit v1.2.3