summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/lualatex/luamaths/README.txt2
-rw-r--r--Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib1
-rw-r--r--Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdfbin145138 -> 146025 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex18
-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
7 files changed, 31 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/lualatex/luamaths/README.txt b/Master/texmf-dist/doc/lualatex/luamaths/README.txt
index 926a94962c7..43acb565dd9 100644
--- a/Master/texmf-dist/doc/lualatex/luamaths/README.txt
+++ b/Master/texmf-dist/doc/lualatex/luamaths/README.txt
@@ -1,5 +1,5 @@
# The luamaths package
-# version 1.1
+# version 1.3
# Authors: Chetan Shirore and Ajit Kumar
# Email: mathsbeauty@gmail.com
diff --git a/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib b/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib
index 4069c4adc2a..8078492e116 100644
--- a/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib
+++ b/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib
@@ -1,4 +1,3 @@
-\begin{filecontents}{luamodtbl.bib}
@online{online.luaorg,
title = {Lua Programming Language},
diff --git a/Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdf b/Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdf
index 0b5d310b1d5..d5389a3894f 100644
--- a/Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdf
+++ b/Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex b/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex
index 8e501abf14e..3cb499b88c8 100644
--- a/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex
+++ b/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex
@@ -42,7 +42,7 @@ The \verb|luamaths| package is released under the LaTeX Project Public License v
\section{Commands in the luamaths package}
Table \ref{tbl:opluamaths} lists operations in the \verb|luamaths| package.
\begin{center}
-\begin{longtable}{llm{6cm}}
+\begin{longtable}{llm{6.5cm}}
\toprule
\multicolumn{1}{c}{\textcolor{blue}{Function}} & \multicolumn{1}{l}{\textcolor{blue}{Command Format}} & \multicolumn{1}{c}{\textcolor{blue}{Description}} \\
\toprule
@@ -161,7 +161,7 @@ Table \ref{tbl:opluamaths} lists operations in the \verb|luamaths| package.
\end{lstlisting} &
\begin{lstlisting}
\mathRound{number}{digits}
-\end{lstlisting} & It rounds off a real number to a specified number of digits. \\
+\end{lstlisting} & It rounds off a real number to a specified number of decimal places. \\
\midrule
\begin{lstlisting}
\mathSin
@@ -183,6 +183,15 @@ Table \ref{tbl:opluamaths} lists operations in the \verb|luamaths| package.
\begin{lstlisting}
\mathTan{number}
\end{lstlisting} & Gives the tangent of a real number. Here the number is in radians.\\
+\midrule
+\begin{lstlisting}
+\complexRound
+\end{lstlisting} &
+\begin{lstlisting}
+\complexRound{cx_num}{digits}
+\end{lstlisting} & It rounds off a complex number to a specified number of decimal places.\\
+
+
\bottomrule \\
\caption{Operations in the luamaths package}
\label{tbl:opluamaths}
@@ -319,6 +328,11 @@ Table \ref{tbl:illluamaths} illustrates operations in the \verb|luamaths| packag
\begin{lstlisting}
\mathRound{\mathOp{9+\mathSin{4}}}{6}
\end{lstlisting} & \(\mathRound{\mathOp{9+\mathSin{4}}}{6}\)\\
+\midrule
+
+\begin{lstlisting}
+\complexRound{lcomplex(\mathPi,6)}{4}
+\end{lstlisting} & \(\complexRound{lcomplex(\mathPi,6)}{4}\)\\
\bottomrule \\
\caption{Illustrations of commands in the luamaths package}
\label{tbl:illluamaths}
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}