summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/luatex/luamplib/luamplib.dtx')
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx31
1 files changed, 21 insertions, 10 deletions
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.