summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua10
-rw-r--r--Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua5
-rw-r--r--Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty4
3 files changed, 14 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua b/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua
index 68fd055b5ec..d8ad289d3f6 100644
--- a/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua
+++ b/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua
@@ -1,7 +1,7 @@
---Version=1.3, Date=30-July-2023
+--Version=1.4, Date=04-Aug-2023
-- provides module for complex numbers
--Contains a modified version of the file complex.lua. It is availalbe on the link https://github.com/davidm/lua-matrix/blob/master/lua/complex.lua. This is licensed under the same terms as Lua itself. This license allows to freely copy, modify and distribute the file for any purpose and without any restrictions.
---Licensed under the same terms as Lua itself. This license allows to freely copy, modify and distribute the file for any purpose and without any restrictions.
+--This file is also licensed under the same terms as Lua itself. This license allows to freely copy, modify and distribute the file for any purpose and without any restrictions.
frac= require("luamaths-fractions")
complex = {}
@@ -107,6 +107,12 @@ function complex.tostring( cx,formatstr )
imunit = "\\imUnit"
local real,imag = cx[1],cx[2]
if type(cx[1]) ~= "table" and type(cx[2]) ~= "table" then
+ if imag == 0 and math.floor(real)==real then
+ return math.floor(real)
+ end
+ if real == 0 and math.floor(imag)==imag and math.abs(math.floor(imag))~=1 then
+ return math.floor(imag)..imunit
+ end
if imag == 0 then
return real
elseif real == 0 then
diff --git a/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua b/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua
index e4ab7a2329e..540e5b21a25 100644
--- a/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua
+++ b/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua
@@ -1,6 +1,6 @@
-- The luafractions module
-- Authors: Chetan Shirore and Ajit Kumar
--- version 1.0, Date=03-Aug-2023
+-- version 1.1, Date=04-Aug-2023
-- Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt.
M = {} -- the module
@@ -204,6 +204,9 @@ function M.div(a, b)
end
function M.tostring (c)
+ if c.n == 0 then
+ return string.format("%g",0)
+ end
if c.d == 1 then
return string.format("%g",c.n)
end
diff --git a/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty b/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty
index 524b36a2105..b73759c00b2 100644
--- a/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty
+++ b/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty
@@ -1,9 +1,9 @@
% The luamaths package
-% version 1.1
+% version 1.3
% Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt.
%Authors: Chetan Shirore and Ajit Kumar
-\ProvidesPackage{luamaths}[1.1]
+\ProvidesPackage{luamaths}[1.3]
\RequirePackage{xkeyval}
\RequirePackage{amsmath}
\RequirePackage{luacode}