summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-20 22:02:49 +0000
committerKarl Berry <karl@freefriends.org>2013-12-20 22:02:49 +0000
commit58585d5aef30c63a28a50a637af87f7b84709622 (patch)
treee9d2a815672e27a952b9d6b6e5fa0ee5b0731073 /Master/texmf-dist
parent686feafdfa728f8f337210a65b380f168e4a68fe (diff)
luamplib (20dec13)
git-svn-id: svn://tug.org/texlive/trunk@32458 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/luamplib.pdfbin102765 -> 102620 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex2
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx14
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.lua14
5 files changed, 12 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
index 6a725dea35c..c2fc27cb5bf 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
+++ b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
Binary files differ
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 57fbafd26ed..f68d247c3ce 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex
@@ -44,7 +44,7 @@ A%
\begin{mplibcode}
beginfig(2);
numeric u; u=1cm;
-z1=-z2=origin-(u,0);
+z1=-z2=(-u,0);
for i = 1 upto 3:
draw z1..(0, i*u)..z2;
label.top(TEX("$e_{" & decimal(i) & "}$"), (0, i*u)) withcolor blue;
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 f708013717a..3a8b6c31167 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex
@@ -42,7 +42,7 @@ A%
\mplibcode
beginfig(2);
numeric u; u=1cm;
-z1=-z2=origin-(u,0);
+z1=-z2=(-u,0);
for i = 1 upto 3:
draw z1..(0, i*u)..z2;
label.top(TEX("$e_{" & decimal(i) & "}$"), (0, i*u)) withcolor blue;
diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
index b2d02e46601..558936a9864 100644
--- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
+++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
@@ -609,9 +609,7 @@ local function putTEXboxes (object)
if sx == 0 then sx = 0.00001 end
if sy == 0 then sy = 0.00001 end
local cs = object.color
- if cs and #cs > 0 then
- cs = luamplib.colorconverter(cs)
- end
+ if cs then cs = luamplib.colorconverter(cs) end
pdf_literalcode("q %f %f %f %f %f %f cm",sx,rx,ry,sy,tx,ty)
if cs then pdf_literalcode(cs) end
texsprint(format("\\mplibputtextbox{%i}",n))
@@ -739,9 +737,7 @@ local function flush(result,flusher)
%
% \begin{macrocode}
local cs = object.color
- if cs and #cs > 0 then
- cs = luamplib.colorconverter(cs)
- end
+ if cs then cs = luamplib.colorconverter(cs) end
pdf_literalcode("q %f %f %f %f %f %f cm",ot[3],ot[4],ot[5],ot[6],ot[1],ot[2])
if cs then pdf_literalcode(cs) end
pdf_textfigure(object.font,object.dsize,object.text,object.width,object.height,object.depth)
@@ -753,9 +749,9 @@ local function flush(result,flusher)
%
% \begin{macrocode}
local cs, cr = object.color, nil
- if cs and #cs > 0 then
+ if cs then
cs, cr = luamplib.colorconverter(cs)
- pdf_literalcode(cs)
+ if cs then pdf_literalcode(cs) end
end
local ml = object.miterlimit
if ml and ml ~= miterlimit then
@@ -862,7 +858,7 @@ local function colorconverter(cr)
elseif n == 3 then
local r, g, b = cr[1], cr[2], cr[3]
return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b), "0 g 0 G"
- else
+ elseif n == 1 then
local s = cr[1]
return format("%.3f g %.3f G",s,s), "0 g 0 G"
end
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
index fe8c03cc1a9..e818c56c1e4 100644
--- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
+++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
@@ -352,9 +352,7 @@ local function putTEXboxes (object)
if sx == 0 then sx = 0.00001 end
if sy == 0 then sy = 0.00001 end
local cs = object.color
- if cs and #cs > 0 then
- cs = luamplib.colorconverter(cs)
- end
+ if cs then cs = luamplib.colorconverter(cs) end
pdf_literalcode("q %f %f %f %f %f %f cm",sx,rx,ry,sy,tx,ty)
if cs then pdf_literalcode(cs) end
texsprint(format("\\mplibputtextbox{%i}",n))
@@ -468,18 +466,16 @@ local function flush(result,flusher)
elseif objecttype == "text" then
local ot = object.transform -- 3,4,5,6,1,2
local cs = object.color
- if cs and #cs > 0 then
- cs = luamplib.colorconverter(cs)
- end
+ if cs then cs = luamplib.colorconverter(cs) end
pdf_literalcode("q %f %f %f %f %f %f cm",ot[3],ot[4],ot[5],ot[6],ot[1],ot[2])
if cs then pdf_literalcode(cs) end
pdf_textfigure(object.font,object.dsize,object.text,object.width,object.height,object.depth)
pdf_literalcode("Q")
else
local cs, cr = object.color, nil
- if cs and #cs > 0 then
+ if cs then
cs, cr = luamplib.colorconverter(cs)
- pdf_literalcode(cs)
+ if cs then pdf_literalcode(cs) end
end
local ml = object.miterlimit
if ml and ml ~= miterlimit then
@@ -586,7 +582,7 @@ local function colorconverter(cr)
elseif n == 3 then
local r, g, b = cr[1], cr[2], cr[3]
return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b), "0 g 0 G"
- else
+ elseif n == 1 then
local s = cr[1]
return format("%.3f g %.3f G",s,s), "0 g 0 G"
end