summaryrefslogtreecommitdiff
path: root/macros/luatex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-08-04 03:02:50 +0000
committerNorbert Preining <norbert@preining.info>2024-08-04 03:02:50 +0000
commita89ee1b39cf5257c9d32b3601b047e0ce253a1fb (patch)
treea400409c0a748111b3142ac6f0dc8dadabc5e8e0 /macros/luatex
parent1786ab241ade980262fff39e09ab85cba89135cd (diff)
CTAN sync 202408040302
Diffstat (limited to 'macros/luatex')
-rw-r--r--macros/luatex/generic/luamplib/NEWS6
-rw-r--r--macros/luatex/generic/luamplib/luamplib.dtx171
-rw-r--r--macros/luatex/generic/luamplib/luamplib.pdfbin254658 -> 255981 bytes
3 files changed, 109 insertions, 68 deletions
diff --git a/macros/luatex/generic/luamplib/NEWS b/macros/luatex/generic/luamplib/NEWS
index aa75e98b1f..82e82632f6 100644
--- a/macros/luatex/generic/luamplib/NEWS
+++ b/macros/luatex/generic/luamplib/NEWS
@@ -1,5 +1,11 @@
History of the luamplib package
+2024/08/03 2.34.5
+ * provide 'withgroupbbox' macro for transparency group to enable users to
+ control the bounding box
+
+ * write down the width/height/depth values of mplibgroup to the log file
+
2024/07/31 2.34.4
* 'withpattern' operator accepts a <textual picture> as well as a <path>
for its operand. Thus users can give pattern effect to the result of btex
diff --git a/macros/luatex/generic/luamplib/luamplib.dtx b/macros/luatex/generic/luamplib/luamplib.dtx
index aa79cb3da7..625a35848c 100644
--- a/macros/luatex/generic/luamplib/luamplib.dtx
+++ b/macros/luatex/generic/luamplib/luamplib.dtx
@@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luamplib.drv}%
- [2024/07/31 v2.34.4 Interface for using the mplib library]%
+ [2024/08/03 v2.34.5 Interface for using the mplib library]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,xspace}
\usepackage[x11names]{xcolor}
@@ -155,7 +155,7 @@ See source file '\inFileName' for licencing and contact information.
% \author{Hans Hagen, Taco Hoekwater, Elie Roux, Philipp Gesang and Kim Dohyun\\
% Current Maintainer: Kim Dohyun\\
% Support: \url{https://github.com/lualatex/luamplib}}
-% \date{2024/07/31 v2.34.4}
+% \date{2024/08/03 v2.34.5}
%
% \maketitle
%
@@ -630,7 +630,7 @@ See source file '\inFileName' for licencing and contact information.
%\end{verbatim}
% After the process, |mpliboutlinepic[]|
% and |mpliboutlinenum| will be preserved as global variables;
-% |mpliboutlinepic[1]| \ldots{} |mpliboutlinepic[mpliboutlinenum]|
+% |mpliboutlinepic[1]| |...| |mpliboutlinepic[mpliboutlinenum]|
% will be an array of images each of which containing a glyph or a rule.
%
% \textsc{n.b.} As Unicode grapheme cluster is not considered in the array, a unit that must be
@@ -642,11 +642,11 @@ See source file '\inFileName' for licencing and contact information.
% \cs{mppattern\{<name>\}} |...| \cs{endmppattern} define a tiling pattern
% associated with the |<name>|.
% \metapost operator |withpattern|, the syntax being
-% \emph{<path>}\textbar\emph{<textual picture>} |withpattern| \emph{<string>},
+% \emph{<path>}\,\textbar\,\emph{<textual picture>} |withpattern| \emph{<string>},
% will return a \metapost picture which fills
% the given path or text with a tiling pattern of the |<name>|
% by replicating it horizontally and vertically.
-% The \emph{textual picture} here means any text typeset by \TeX, normally the result
+% The \emph{textual picture} here means any text typeset by \TeX, mostly the result
% of the |btex| command (though technically this is not a true textual picture)
% or the |infont| operator.
%
@@ -693,8 +693,8 @@ See source file '\inFileName' for licencing and contact information.
% |ystep| &\emph{number} & vertical spacing between pattern cells\\
% |xshift| &\emph{number} & horizontal shifting of pattern cells\\
% |yshift| &\emph{number} & vertical shifting of pattern cells\\
-% |matrix| &\emph{table} or \emph{string} & |xx|, |yx|, |xy|, |yy| values\kern1pt* or MP transform code\\
% |bbox| &\emph{table} or \emph{string} & |llx|, |lly|, |urx|, |ury| values\kern1pt*\\
+% |matrix| &\emph{table} or \emph{string} & |xx|, |yx|, |xy|, |yy| values\kern1pt* or MP transform code\\
% |resources|&\emph{string} & PDF resources if needed\\
% |colored| or |coloured| &\emph{boolean}& |false| for uncolored pattern. default: |true|\\\hline
% & & \small *\,in string type, numbers are separated by spaces\\
@@ -793,6 +793,8 @@ See source file '\inFileName' for licencing and contact information.
% sets the bounding box of the fading area, default value being |(llcorner p, urcorner p)|.
% Though this option is not needed in most cases, there could be cases when users want to
% explicitly control the bounding box.
+% Particularly, see the description \hyperlink{withgroupbbox}{below}
+% on the analogous macro |withgroupbbox|.
% \end{description}
% An example:
%\begin{verbatim}
@@ -842,6 +844,17 @@ See source file '\inFileName' for licencing and contact information.
% a transparency group of the name to the |currentpicture|.
% Contrary to the \TeX\ command just mentioned,
% the position of the group is the same as the original transparency group.
+%
+% \item[|withgroupbbox (|\emph{pair}|,|\emph{pair}|)|]
+% \hypertarget{withgroupbbox}{}\relax
+% sets the bounding box of the transparency group,
+% default value being |(llcorner p, urcorner p)|.
+% This option might be needed especially when you draw with a thick pen
+% a path that touches the boundary;
+% you would probably want to append to the sentense
+% `|withgroupbbox| |(bot| |lft| |llcorner| |p,| |top| |rt| |urcorner| |p)|',
+% supposing that the pen was selected by the |pickup| command.
+%
% \end{description}
% An example showing the difference between the \TeX\ and \metapost commands:
%\begin{verbatim}
@@ -849,7 +862,8 @@ See source file '\inFileName' for licencing and contact information.
% draw image(
% fill fullcircle scaled 100 shifted 25right withcolor .5[blue,white];
% fill fullcircle scaled 100 withcolor .5[red,white] ;
-% ) asgroup "" withgroupname "mygroup";
+% ) asgroup ""
+% withgroupname "mygroup";
% draw (left--right) scaled 10;
% draw (up--down) scaled 10;
% \endmpfig
@@ -883,19 +897,24 @@ See source file '\inFileName' for licencing and contact information.
% asgroup="",
% ]
% \mpfig % or any other TeX code
-% draw (left--right) scaled 30 rotated 45 withpen pencircle scaled 10;
-% draw (left--right) scaled 30 rotated -45 withpen pencircle scaled 10;
+% pickup pencircle scaled 10;
+% draw (left--right) scaled 30 rotated 45 ;
+% draw (left--right) scaled 30 rotated -45 ;
% \endmpfig
% \endmplibgroup % or \end{mplibgroup}
%
% \usemplibgroup{mygrx}
%
% \mpfig
-% usemplibgroup "mygrx" scaled 1.5 withprescript "tr_transparency=0.5";
+% usemplibgroup "mygrx"
+% scaled 1.5
+% withprescript "tr_transparency=0.5" ;
% \endmpfig
%\end{verbatim}
+%
% Availabe options, much fewer than those for \cs{mppattern},
% are listed in Table~\ref{tab:mplibgroupoptions}.
+% Again, the width/height/depth values of the mplibgroup will be written down into the log file.
% \begin{table}
% \centering
% \caption{options for \cs{mplibgroup}}\label{tab:mplibgroupoptions}
@@ -918,8 +937,7 @@ See source file '\inFileName' for licencing and contact information.
% Thus the individual objects, not the XObject as a whole, will be affected
% by outer transparency command.
%
-% As shown in the example, you can reuse the transparency group or the normal form XObject
-% once defined
+% As shown in the example, you can reuse the mplibgroup once defined
% using the \TeX\ command \cs{usemplibgroup} or
% the \metapost command |usemplibgroup|.
% The behavior of these commands is the same as that described \hyperlink{usemplibgroup}{above}.
@@ -1010,8 +1028,8 @@ See source file '\inFileName' for licencing and contact information.
luatexbase.provides_module {
name = "luamplib",
- version = "2.34.4",
- date = "2024/07/31",
+ version = "2.34.5",
+ date = "2024/08/03",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
}
@@ -1883,6 +1901,7 @@ end
%
% Remove trailing zeros for smaller PDF
% \begin{macrocode}
+local decimals = "%.%d+"
local function rmzeros(str) return str:gsub("%.?0+$","") end
% \end{macrocode}
@@ -1921,7 +1940,7 @@ local function getrulewhatsit (line, wd, ht, dp)
fmt = "pdf:content "..fmt
pl = node.new("whatsit","special")
end
- pl.data = fmt:format(line, 0, -dp, wd, ht+dp, "B") :gsub("%.%d+", rmzeros)
+ pl.data = fmt:format(line, 0, -dp, wd, ht+dp, "B") :gsub(decimals,rmzeros)
local ss = node.new"glue"
node.setglue(ss, 0, 65536, 65536, 2, 2)
pl.next = ss
@@ -2009,6 +2028,9 @@ end
local function graphictextcolor (col, filldraw)
if col:find"^[%d%.:]+$" then
col = col:explode":"
+ for i=1,#col do
+ col[i] = format("%.3f", col[i])
+ end
if pdfmode then
local op = #col == 4 and "k" or #col == 3 and "rg" or "g"
col[#col+1] = filldraw == "fill" and op or op:upper()
@@ -2663,10 +2685,10 @@ primarydef p withfademethod s =
fi
withprescript "mplibfadetype=" & s
withprescript "mplibfadebbox=" &
- decimal xpart llcorner p & ":" &
- decimal ypart llcorner p & ":" &
- decimal xpart urcorner p & ":" &
- decimal ypart urcorner p
+ decimal (xpart llcorner p -1/4) & ":" &
+ decimal (ypart llcorner p -1/4) & ":" &
+ decimal (xpart urcorner p +1/4) & ":" &
+ decimal (ypart urcorner p +1/4)
enddef;
def withfadeopacity (expr a,b) =
withprescript "mplibfadeopacity=" &
@@ -2695,13 +2717,25 @@ def withfadebbox (expr a,b) =
enddef;
primarydef p asgroup s =
image(
- fill llcorner p--lrcorner p--urcorner p--ulcorner p--cycle
+ draw center p
+ withprescript "mplibgroupbbox=" &
+ decimal (xpart llcorner p -1/4) & ":" &
+ decimal (ypart llcorner p -1/4) & ":" &
+ decimal (xpart urcorner p +1/4) & ":" &
+ decimal (ypart urcorner p +1/4)
withprescript "gr_state=start"
withprescript "gr_type=" & s;
draw p;
draw center p withprescript "gr_state=stop";
)
enddef;
+def withgroupbbox (expr a,b) =
+ withprescript "mplibgroupbbox=" &
+ decimal xpart a & ":" &
+ decimal ypart a & ":" &
+ decimal xpart b & ":" &
+ decimal ypart b
+enddef;
def withgroupname expr s =
withprescript "mplibgroupname=" & s
enddef;
@@ -2822,21 +2856,12 @@ end
%
% For parsing |prescript| materials.
% \begin{macrocode}
-local further_split_keys = {
- mplibtexboxid = true,
- sh_color_a = true,
- sh_color_b = true,
-}
local function script2table(s)
local t = {}
for _,i in ipairs(s:explode("\13+")) do
local k,v = i:match("(.-)=(.*)") -- v may contain = or empty.
if k and v and k ~= "" and not t[k] then
- if further_split_keys[k] or further_split_keys[k:sub(1,10)] then
- t[k] = v:explode(":")
- else
- t[k] = v
- end
+ t[k] = v
end
end
return t
@@ -2864,7 +2889,7 @@ end
% in the argument of pdfliteral.
% \begin{macrocode}
local function pdf_literalcode (...)
- put2output{ -2, format(...) :gsub("%.%d+", rmzeros) }
+ put2output{ -2, format(...) :gsub(decimals,rmzeros) }
end
local start_pdf_code = pdfmode
and function() pdf_literalcode"q" end
@@ -2879,7 +2904,7 @@ local stop_pdf_code = pdfmode
% |textext(...)| or |TEX(...)|, all being the same internally.
% \begin{macrocode}
local function put_tex_boxes (object,prescript)
- local box = prescript.mplibtexboxid
+ local box = prescript.mplibtexboxid:explode":"
local n,tw,th = box[1],tonumber(box[2]),tonumber(box[3])
if n and tw and th then
local op = object.path
@@ -3067,9 +3092,9 @@ local function do_preobj_TR(object,prescript)
local key, on, os, new
local mode = prescript.tr_alternative or 1
mode = transparancy_modes[tonumber(mode)] or mode
+ opaq = format("%.3f", opaq) :gsub(decimals,rmzeros)
for i,v in ipairs{ {mode,opaq},{"Normal",1} } do
- mode, opaq = v[1], v[2]
- os = format("<</BM/%s/ca %.3f/CA %.3f/AIS false>>",mode,opaq,opaq) :gsub("%.%d+", rmzeros)
+ os = format("<</BM/%s/ca %s/CA %s/AIS false>>",v[1],v[2],v[2])
on, new = update_pdfobjs(os)
key = add_extgs_resources(on,new)
if i == 1 then
@@ -3086,16 +3111,24 @@ end
% Shading with \emph{metafun} format.
% \begin{macrocode}
local function sh_pdfpageresources(shtype,domain,colorspace,ca,cb,coordinates,steps,fractions)
+ for _,v in ipairs{ca,cb} do
+ for i,vv in ipairs(v) do
+ for ii,vvv in ipairs(vv) do
+ v[i][ii] = tonumber(vvv) and format("%.3f",vvv) or vvv
+ end
+ end
+ end
local fun2fmt,os = "<</FunctionType 2/Domain[%s]/C0[%s]/C1[%s]/N 1>>"
if steps > 1 then
local list,bounds,encode = { },{ },{ }
for i=1,steps do
if i < steps then
- bounds[i] = fractions[i] or 1
+ bounds[i] = format("%.3f", fractions[i] or 1)
end
encode[2*i-1] = 0
encode[2*i] = 1
os = fun2fmt:format(domain,tableconcat(ca[i],' '),tableconcat(cb[i],' '))
+ :gsub(decimals,rmzeros)
list[i] = format(pdfetcs.resfmt, update_pdfobjs(os))
end
os = tableconcat {
@@ -3104,18 +3137,19 @@ local function sh_pdfpageresources(shtype,domain,colorspace,ca,cb,coordinates,st
format("/Encode[%s]", tableconcat(encode,' ')),
format("/Functions[%s]", tableconcat(list, ' ')),
format("/Domain[%s]>>", domain),
- }
+ } :gsub(decimals,rmzeros)
else
os = fun2fmt:format(domain,tableconcat(ca[1],' '),tableconcat(cb[1],' '))
+ :gsub(decimals,rmzeros)
end
local objref = format(pdfetcs.resfmt, update_pdfobjs(os))
os = tableconcat {
format("<</ShadingType %i", shtype),
format("/ColorSpace %s", colorspace),
format("/Function %s", objref),
- format("/Coords[%s]", coordinates :gsub("%.%d+", rmzeros)),
+ format("/Coords[%s]", coordinates),
"/Extend[true true]/AntiAlias true>>",
- }
+ } :gsub(decimals,rmzeros)
local on, new = update_pdfobjs(os)
if new then
local key, val = format("MPlibSh%s", on), format(pdfetcs.resfmt, on)
@@ -3188,15 +3222,15 @@ local function do_preobj_SH(object,prescript)
end
end
local ca, cb, colorspace, steps, fractions
- ca = { prescript.sh_color_a_1 or prescript.sh_color_a or {0} }
- cb = { prescript.sh_color_b_1 or prescript.sh_color_b or {1} }
+ ca = { (prescript.sh_color_a_1 or prescript.sh_color_a or "0"):explode":" }
+ cb = { (prescript.sh_color_b_1 or prescript.sh_color_b or "1"):explode":" }
steps = tonumber(prescript.sh_step) or 1
if steps > 1 then
fractions = { prescript.sh_fraction_1 or 0 }
for i=2,steps do
fractions[i] = prescript[format("sh_fraction_%i",i)] or (i/steps)
- ca[i] = prescript[format("sh_color_a_%i",i)] or {0}
- cb[i] = prescript[format("sh_color_b_%i",i)] or {1}
+ ca[i] = (prescript[format("sh_color_a_%i",i)] or "0"):explode":"
+ cb[i] = (prescript[format("sh_color_b_%i",i)] or "1"):explode":"
end
end
if prescript.mplib_spotcolor then
@@ -3334,9 +3368,9 @@ local function gather_resources (optres)
end
function luamplib.registerpattern ( boxid, name, opts )
local box = texgetbox(boxid)
- local wd = format("%.3f",box.width/factor) :gsub("%.%d+", rmzeros)
- local hd = format("%.3f",(box.height+box.depth)/factor) :gsub("%.%d+", rmzeros)
- info("w/h/d of '%s': %s %s 0", name, wd, hd)
+ local wd = format("%.3f",box.width/factor)
+ local hd = format("%.3f",(box.height+box.depth)/factor)
+ info("w/h/d of pattern '%s': %s 0", name, format("%s %s",wd, hd):gsub(decimals,rmzeros))
if opts.xstep == 0 then opts.xstep = nil end
if opts.ystep == 0 then opts.ystep = nil end
if opts.colored == nil then
@@ -3351,9 +3385,9 @@ function luamplib.registerpattern ( boxid, name, opts )
local data = format("mplibtransformmatrix(%s);",opts.matrix)
process(data,"@mplibtransformmatrix")
local t = luamplib.transformmatrix
- opts.matrix = format("%s %s %s %s", t[1], t[2], t[3], t[4])
- opts.xshift = opts.xshift or t[5]
- opts.yshift = opts.yshift or t[6]
+ opts.matrix = format("%f %f %f %f", t[1], t[2], t[3], t[4])
+ opts.xshift = opts.xshift or format("%f",t[5])
+ opts.yshift = opts.yshift or format("%f",t[6])
end
local attr = {
"/Type/Pattern",
@@ -3371,7 +3405,8 @@ function luamplib.registerpattern ( boxid, name, opts )
if opts.bbox then
attr[#attr+1] = format("/BBox[%s]", opts.bbox)
end
- local index = tex.saveboxresource(boxid, tableconcat(attr), optres, true, opts.bbox and 4 or 1)
+ attr = tableconcat(attr) :gsub(decimals,rmzeros)
+ local index = tex.saveboxresource(boxid, attr, optres, true, opts.bbox and 4 or 1)
patterns[name] = { id = index, colored = opts.colored }
else
local cnt = #patterns + 1
@@ -3503,19 +3538,20 @@ local function do_preobj_FADE (object, prescript)
on = sh_pdfpageresources(fd_type, "0 1", "/DeviceGray", {{opaq[1]}}, {{opaq[2]}}, coords, 1)
os = format("<</PatternType 2/Shading %s>>", format(pdfetcs.resfmt, on))
on = update_pdfobjs(os)
- bbox = format("0 0 %f %f", bbox[3]+dx, bbox[4]+dy) :gsub("%.%d+", rmzeros)
+ bbox = format("0 0 %f %f", bbox[3]+dx, bbox[4]+dy)
local streamtext = format("q /Pattern cs/MPlibFd%s scn %s re f Q", on, bbox)
+ :gsub(decimals,rmzeros)
os = format("<</Pattern<</MPlibFd%s %s>>>>", on, format(pdfetcs.resfmt, on))
on = update_pdfobjs(os)
local resources = format(pdfetcs.resfmt, on)
on = update_pdfobjs"<</S/Transparency/CS/DeviceGray>>"
local attr = tableconcat{
"/Subtype/Form",
- format("/BBox[%s]", bbox),
- format("/Matrix[1 0 0 1 %s]", format("%f %f", -dx,-dy) :gsub("%.%d+", rmzeros)),
- format("/Resources %s", resources),
+ "/BBox[", bbox, "]",
+ "/Matrix[1 0 0 1 ", format("%f %f", -dx,-dy), "]",
+ "/Resources ", resources,
"/Group ", format(pdfetcs.resfmt, on),
- }
+ } :gsub(decimals,rmzeros)
on = update_pdfobjs(attr, streamtext)
os = "<</SMask<</S/Luminosity/G " .. format(pdfetcs.resfmt, on) .. ">>>>"
on, new = update_pdfobjs(os)
@@ -3542,13 +3578,7 @@ local function do_preobj_GRP (object, prescript)
for _,v in ipairs(prescript.gr_type:explode",+") do
trgroup[v] = true
end
- local p = object.path
- trgroup.bbox = {
- math.min(p[1].x_coord, p[2].x_coord, p[3].x_coord, p[4].x_coord),
- math.min(p[1].y_coord, p[2].y_coord, p[3].y_coord, p[4].y_coord),
- math.max(p[1].x_coord, p[2].x_coord, p[3].x_coord, p[4].x_coord),
- math.max(p[1].y_coord, p[2].y_coord, p[3].y_coord, p[4].y_coord),
- }
+ trgroup.bbox = prescript.mplibgroupbbox:explode":"
put2output[[\begingroup\setbox\mplibscratchbox\hbox\bgroup]]
elseif grstate == "stop" then
local llx,lly,urx,ury = tableunpack(trgroup.bbox)
@@ -3560,7 +3590,7 @@ local function do_preobj_GRP (object, prescript)
})
local grattr = format("/Group<</S/Transparency/I %s/K %s>>",trgroup.isolated,trgroup.knockout)
local res = gather_resources()
- local bbox = format("%f %f %f %f", llx,lly,urx,ury) :gsub("%.%d+", rmzeros)
+ local bbox = format("%f %f %f %f", llx,lly,urx,ury) :gsub(decimals,rmzeros)
if pdfmode then
put2output(tableconcat{
"\\saveboxresource type 2 attr{/Type/XObject/Subtype/Form/FormType 1",
@@ -3593,6 +3623,7 @@ local function do_preobj_GRP (object, prescript)
end
function luamplib.registergroup (boxid, name, opts)
local box = texgetbox(boxid)
+ local wd, ht, dp = node.getwhd(box)
local res = (opts.resources or "") .. gather_resources()
local attr = { "/Type/XObject/Subtype/Form/FormType 1" }
if type(opts.matrix) == "table" then opts.matrix = tableconcat(opts.matrix," ") end
@@ -3600,15 +3631,15 @@ function luamplib.registergroup (boxid, name, opts)
if opts.matrix and opts.matrix:find"%a" then
local data = format("mplibtransformmatrix(%s);",opts.matrix)
process(data,"@mplibtransformmatrix")
- opts.matrix = tableconcat(luamplib.transformmatrix, ' ')
+ opts.matrix = format("%f %f %f %f %f %f",tableunpack(luamplib.transformmatrix))
end
local grtype = 3
if opts.bbox then
- attr[#attr+1] = format("/BBox[%s]", opts.bbox :gsub("%.%d+", rmzeros))
+ attr[#attr+1] = format("/BBox[%s]", opts.bbox)
grtype = 2
end
if opts.matrix then
- attr[#attr+1] = format("/Matrix[%s]", opts.matrix :gsub("%.%d+", rmzeros))
+ attr[#attr+1] = format("/Matrix[%s]", opts.matrix)
grtype = opts.bbox and 4 or 1
end
if opts.asgroup then
@@ -3618,13 +3649,15 @@ function luamplib.registergroup (boxid, name, opts)
end
local trgroup = pdfetcs.tr_group
trgroup.shifts[name] = { get_macro'MPllx', get_macro'MPlly' }
+ local whd
if pdfmode then
- local index = tex.saveboxresource(boxid, tableconcat(attr), res, true, grtype)
+ attr = tableconcat(attr) :gsub(decimals,rmzeros)
+ local index = tex.saveboxresource(boxid, attr, res, true, grtype)
token.set_macro("luamplib.group."..name, "\\useboxresource "..index, "global")
+ whd = format("%.3f %.3f 0", wd/factor, (ht+dp)/factor) :gsub(decimals,rmzeros)
else
trgroup.cnt = (trgroup.cnt or 0) + 1
local objname = format("@mplibtrgr%s", trgroup.cnt)
- local wd, ht, dp = node.getwhd(box)
texsprint {
"\\expandafter\\newbox\\csname luamplib.groupbox.", trgroup.cnt, "\\endcsname",
"\\global\\setbox\\csname luamplib.groupbox.", trgroup.cnt, "\\endcsname",
@@ -3643,7 +3676,9 @@ function luamplib.registergroup (boxid, name, opts)
"\\dp\\mplibscratchbox ", dp, "sp",
"\\box\\mplibscratchbox\\endgroup",
}, "global")
+ whd = format("%.3f %.3f %.3f", wd/factor, ht/factor, dp/factor) :gsub(decimals,rmzeros)
end
+ info("w/h/d of group '%s': %s", name, whd)
end
local function stop_special_effects(fade,opaq,over)
@@ -4070,7 +4105,7 @@ end
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2024/07/31 v2.34.4 mplib package for LuaTeX]
+ [2024/08/03 v2.34.5 mplib package for LuaTeX]
\fi
\ifdefined\newluafunction\else
\input ltluatex
diff --git a/macros/luatex/generic/luamplib/luamplib.pdf b/macros/luatex/generic/luamplib/luamplib.pdf
index 9cdef60663..7682155b3c 100644
--- a/macros/luatex/generic/luamplib/luamplib.pdf
+++ b/macros/luatex/generic/luamplib/luamplib.pdf
Binary files differ