texlive[67817] Master/texmf-dist: luamaths (4aug23)

commits+karl at tug.org commits+karl at tug.org
Fri Aug 4 23:15:45 CEST 2023


Revision: 67817
          http://tug.org/svn/texlive?view=revision&revision=67817
Author:   karl
Date:     2023-08-04 23:15:45 +0200 (Fri, 04 Aug 2023)
Log Message:
-----------
luamaths (4aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/luamaths/README.txt
    trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib
    trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdf
    trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex
    trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua
    trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua
    trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/luamaths/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamaths/README.txt	2023-08-04 21:15:35 UTC (rev 67816)
+++ trunk/Master/texmf-dist/doc/lualatex/luamaths/README.txt	2023-08-04 21:15:45 UTC (rev 67817)
@@ -1,5 +1,5 @@
 # The luamaths package
-# version 1.1
+# version 1.3
 # Authors: Chetan Shirore and Ajit Kumar
 # Email: mathsbeauty at gmail.com
 

Modified: trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib	2023-08-04 21:15:35 UTC (rev 67816)
+++ trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.bib	2023-08-04 21:15:45 UTC (rev 67817)
@@ -1,4 +1,3 @@
-\begin{filecontents}{luamodtbl.bib}
 
 @online{online.luaorg,
   title = {Lua Programming Language},

Modified: trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex	2023-08-04 21:15:35 UTC (rev 67816)
+++ trunk/Master/texmf-dist/doc/lualatex/luamaths/luamaths.tex	2023-08-04 21:15:45 UTC (rev 67817)
@@ -42,7 +42,7 @@
 \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 @@
 \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 @@
 \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 @@
 \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}

Modified: trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua	2023-08-04 21:15:35 UTC (rev 67816)
+++ trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-complex.lua	2023-08-04 21:15:45 UTC (rev 67817)
@@ -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 @@
    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

Modified: trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua	2023-08-04 21:15:35 UTC (rev 67816)
+++ trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths-fractions.lua	2023-08-04 21:15:45 UTC (rev 67817)
@@ -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 @@
 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

Modified: trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty	2023-08-04 21:15:35 UTC (rev 67816)
+++ trunk/Master/texmf-dist/tex/lualatex/luamaths/luamaths.sty	2023-08-04 21:15:45 UTC (rev 67817)
@@ -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}



More information about the tex-live-commits mailing list.