summaryrefslogtreecommitdiff
path: root/macros/luatex/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-19 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2023-11-19 03:01:17 +0000
commitaa94b613f51dfa2b65c607585727b66875e765d8 (patch)
tree5628f2c082b66f54a44ba8064fcc0203823b9c92 /macros/luatex/latex
parentbcd1a2a7dfe36b38f10a8fa23b4b6f0c325ca899 (diff)
CTAN sync 202311190301
Diffstat (limited to 'macros/luatex/latex')
-rw-r--r--macros/luatex/latex/luagcd/README.txt5
-rw-r--r--macros/luatex/latex/luagcd/luagcd.pdfbin147517 -> 101670 bytes
-rw-r--r--macros/luatex/latex/luagcd/luagcd.sty22
-rw-r--r--macros/luatex/latex/luagcd/luagcd.tex2
-rw-r--r--macros/luatex/latex/luamodulartables/README.txt5
-rw-r--r--macros/luatex/latex/luamodulartables/luamodulartables.pdfbin321494 -> 260958 bytes
-rw-r--r--macros/luatex/latex/luamodulartables/luamodulartables.sty7
-rw-r--r--macros/luatex/latex/luamodulartables/luamodulartables.tex2
-rw-r--r--macros/luatex/latex/luatruthtable/README.txt2
-rw-r--r--macros/luatex/latex/luatruthtable/luatruthtable.pdfbin116768 -> 116612 bytes
-rw-r--r--macros/luatex/latex/luatruthtable/luatruthtable.sty7
11 files changed, 32 insertions, 20 deletions
diff --git a/macros/luatex/latex/luagcd/README.txt b/macros/luatex/latex/luagcd/README.txt
index edd1bc9b5b..f08e8e1641 100644
--- a/macros/luatex/latex/luagcd/README.txt
+++ b/macros/luatex/latex/luagcd/README.txt
@@ -1,3 +1,8 @@
+# The luagcd package
+# version 1.1
+# Authors: Chetan Shirore and Ajit Kumar
+# Email: mathsbeauty@gmail.com
+
# Introduction
Using Lua, the luagcd package is developed to find the greatest common divisor (gcd) of integers in LaTeX.
The package provides commands to obtain step-by-step computation of gcd of two integers by using the Euclidean algorithm.
diff --git a/macros/luatex/latex/luagcd/luagcd.pdf b/macros/luatex/latex/luagcd/luagcd.pdf
index e8ef34b6c2..40abaf8bec 100644
--- a/macros/luatex/latex/luagcd/luagcd.pdf
+++ b/macros/luatex/latex/luagcd/luagcd.pdf
Binary files differ
diff --git a/macros/luatex/latex/luagcd/luagcd.sty b/macros/luatex/latex/luagcd/luagcd.sty
index 12a5106ac3..6f2e64aaf1 100644
--- a/macros/luatex/latex/luagcd/luagcd.sty
+++ b/macros/luatex/latex/luagcd/luagcd.sty
@@ -1,12 +1,12 @@
% luagcd package
-% version 1.0
+% version 1.1
% 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{luagcd}[1.0]
+\ProvidesPackage{luagcd}[1.1]
\RequirePackage{luacode}
\begin{luacode*}
-function findgcd2(a,b)
+function findgcd2(a,b) -- function to find gcd of 2 numbers.
a = math.abs(a)
b = math.abs(b)
if b ~= 0 then
@@ -16,7 +16,7 @@ function findgcd2(a,b)
end
end
-function findgcd(...)
+function findgcd(...) -- function to find gcd of 2 or more numbers.
local tbl = table.pack(...)
if #(tbl) > 2 then
local rem = table.remove(tbl,1)
@@ -27,7 +27,7 @@ function findgcd(...)
end
end
-function inputcheck ( ... )
+function inputcheck ( ... ) -- validating input.
local tbl = table.pack(...)
for _, v in ipairs(tbl) do
if type(v) ~= 'number' then
@@ -39,14 +39,14 @@ function inputcheck ( ... )
end
end
end
-
-function luagcd(...)
+- function to find gcd with input validatiion.
+function luagcd(...) -
inputcheck(...)
return findgcd(...)
end
-
-function stepbystepgcd(a,b,sep)
+-- function to find gcd of 2 numbers with steps.
+function stepbystepgcd(a,b,sep)
if type(a) ~= 'number' or type(b) ~= 'number' then
error('Only numbers are expected.')
return
@@ -100,7 +100,7 @@ end
" is the last non-zero remainder and it is " ..t.. "."
end
end
-
+-- function to express gcd of 2 numbers as an integer linear combination.
function lincombgcd (a,b)
local val1,val2 = a,b
if type(a) ~= 'number' or type(b) ~= 'number' then
@@ -200,7 +200,7 @@ return ("The gcd of " .. val1 .." and " .. val2 .. " is " .. gcd ..
" and the equation $" .. coeff1 .."x" .. op .. coeff2 .."y = "
..gcd .. "$ has a solution $(x,y) = (" .. e_3 .. "," .. f_3 ..")$.")
end
-
+-- function to express gcd of 2 numbers as an integer linear combination with steps.
function lincombgcdstepbystep (a,b)
local val1,val2 = a,b
if type(a) ~= 'number' or type(b) ~= 'number' then
diff --git a/macros/luatex/latex/luagcd/luagcd.tex b/macros/luatex/latex/luagcd/luagcd.tex
index 980c024589..13fb03402c 100644
--- a/macros/luatex/latex/luagcd/luagcd.tex
+++ b/macros/luatex/latex/luagcd/luagcd.tex
@@ -19,7 +19,7 @@
\usepackage[backend=bibtex]{biblatex}
\begin{document}
\title{The luagcd Package in LaTeX}
-\author{Chetan Shirore and Dr. Ajit Kumar}
+\author{Chetan Shirore\thanks{Email id: mathsbeauty@gmail.com} \space and Ajit Kumar}
\maketitle
\section{Introduction}\label{section:introduction}
Using Lua, the \verb|luagcd| package is developed to find the \textbf{greatest common divisor (gcd)} of integers in LaTeX. It provides an easy way to find gcd of two or more integers inside LaTeX documents. The package provides commands to obtain step-by-step computation of gcd of two integers by using Euclidean algorithm. In addition, the package has the command to express gcd of two integers as a linear combination. The Bezout’s Identity can be verified for any two integers using commands in the package. No particular environment is required for the use of commands in the package. It is written in Lua, and the TeX file has to be compiled with the LuaLaTeX engine.
diff --git a/macros/luatex/latex/luamodulartables/README.txt b/macros/luatex/latex/luamodulartables/README.txt
index c31de1b652..14a2ec04ea 100644
--- a/macros/luatex/latex/luamodulartables/README.txt
+++ b/macros/luatex/latex/luamodulartables/README.txt
@@ -1,3 +1,8 @@
+# The luamodulartables package
+# version 1.1
+# Authors: Chetan Shirore and Ajit Kumar
+# Email: mathsbeauty@gmail.com
+
# Introduction
The luamodulartables package is developed to generate modular addition and multiplication tables for positive integers. It provides an easy way to generate modular addition and modular multiplication tables for positive integers in LaTeX documents. The commands in the package have optional arguments for the formatting of tables. These commands can be used in an environment similar to a tabular or array environment. The commands can also be used with the booktabs package, which provides nice formatting of tables in LaTeX. It is written in Lua, and TeX file is to be compiled with LuaLaTeX engine.
diff --git a/macros/luatex/latex/luamodulartables/luamodulartables.pdf b/macros/luatex/latex/luamodulartables/luamodulartables.pdf
index 2a09a115bb..4a05f159a0 100644
--- a/macros/luatex/latex/luamodulartables/luamodulartables.pdf
+++ b/macros/luatex/latex/luamodulartables/luamodulartables.pdf
Binary files differ
diff --git a/macros/luatex/latex/luamodulartables/luamodulartables.sty b/macros/luatex/latex/luamodulartables/luamodulartables.sty
index 6e43c97bf0..0858c00bc8 100644
--- a/macros/luatex/latex/luamodulartables/luamodulartables.sty
+++ b/macros/luatex/latex/luamodulartables/luamodulartables.sty
@@ -1,5 +1,5 @@
-% luamodulartables
-% version 1.0
+% The luamodulartables package.
+% version 1.1
% Authors: Chetan Shirore and Ajit Kumar
% Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt.
@@ -7,6 +7,7 @@
\RequirePackage{xkeyval}
\RequirePackage{luacode}
\begin{luacode*}
+-- Defining function for modular multiplication.
function modulomult(n,label, headline, midline)
label = label or '$\\times$'
headline = headline or ''
@@ -33,7 +34,7 @@ function modulomult(n,label, headline, midline)
end
return (str2)
end
-
+-- Defining function for modular addition.
function moduloadd(n,label, headline, midline)
label = label or '$+$'
headline = headline or ''
diff --git a/macros/luatex/latex/luamodulartables/luamodulartables.tex b/macros/luatex/latex/luamodulartables/luamodulartables.tex
index d527211e49..4c3d5fbc74 100644
--- a/macros/luatex/latex/luamodulartables/luamodulartables.tex
+++ b/macros/luatex/latex/luamodulartables/luamodulartables.tex
@@ -22,7 +22,7 @@ hyperref,multirow,multicol,enumitem}
\addbibresource{luamodular}
\begin{document}
\title{The luamodulartables Package in LaTeX}
-\author{Chetan Shirore and Dr. Ajit Kumar}
+\author{Chetan Shirore\thanks{Email id: mathsbeauty@gmail.com} \space and Ajit Kumar}
\maketitle
\section{Introduction}\label{section:introduction}
The \verb|luamodulartables| package is developed to generate modular addition and multiplication tables for positive integers. It provides an easy way to generate modular addition and modular multiplication tables for positive integers in LaTeX documents. The commands in the package have optional arguments for the formatting of tables. These commands can be used in an environment similar to a \verb|tabular| or \verb|array| environment. The commands can also be used with the \verb|booktabs| package, which provides nice formatting of tables in LaTeX. It is written in Lua, and TeX file is to be compiled with LuaLaTeX engine.
diff --git a/macros/luatex/latex/luatruthtable/README.txt b/macros/luatex/latex/luatruthtable/README.txt
index 3e6ca97d21..c2a9938360 100644
--- a/macros/luatex/latex/luatruthtable/README.txt
+++ b/macros/luatex/latex/luatruthtable/README.txt
@@ -1,5 +1,5 @@
# The luatruthtable package
-# version 1.2
+# version 1.3
# Authors: Chetan Shirore and Ajit Kumar
# Email: mathsbeauty@gmail.com
diff --git a/macros/luatex/latex/luatruthtable/luatruthtable.pdf b/macros/luatex/latex/luatruthtable/luatruthtable.pdf
index bdc5afdfdc..7601c458e5 100644
--- a/macros/luatex/latex/luatruthtable/luatruthtable.pdf
+++ b/macros/luatex/latex/luatruthtable/luatruthtable.pdf
Binary files differ
diff --git a/macros/luatex/latex/luatruthtable/luatruthtable.sty b/macros/luatex/latex/luatruthtable/luatruthtable.sty
index c839b98700..a3a4481859 100644
--- a/macros/luatex/latex/luatruthtable/luatruthtable.sty
+++ b/macros/luatex/latex/luatruthtable/luatruthtable.sty
@@ -1,13 +1,14 @@
% The luatruthtable package
% Authors: Chetan Shirore and Ajit Kumar
-% Version 1.2, Date=15-Aug-2023
+% Version 1.3, Date=17-Nov-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.
-\ProvidesPackage{luatruthtable}[1.2]
+\ProvidesPackage{luatruthtable}[1.3]
\RequirePackage{xkeyval}
\RequirePackage{amsmath}
\RequirePackage{luacode}
\begin{luacode*}
+-- Function to convert decimal number to binary number.
local function toBinary(x,y)
y = y or math.max(1, select(2, math.frexp(x)))
local res = {}
@@ -17,7 +18,7 @@ local function toBinary(x,y)
end
return res
end
-
+-- Define logical operators.
local function _not(a)
if a ==0 then return 1
else return 0 end