diff options
author | Norbert Preining <norbert@preining.info> | 2023-07-28 03:01:08 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-07-28 03:01:08 +0000 |
commit | 1e45d661b659c3025746d3a41119300ab90d1dcd (patch) | |
tree | 9dfdc2d448c84ef1c1da6adef3145432703d179e /macros/luatex/latex/luanumint | |
parent | 1ee18e17580e3a6c28aa966924ce0be160ef3577 (diff) |
CTAN sync 202307280301
Diffstat (limited to 'macros/luatex/latex/luanumint')
-rw-r--r-- | macros/luatex/latex/luanumint/README.txt | 5 | ||||
-rw-r--r-- | macros/luatex/latex/luanumint/luanumint.pdf | bin | 159784 -> 159787 bytes | |||
-rw-r--r-- | macros/luatex/latex/luanumint/luanumint.sty | 30 |
3 files changed, 20 insertions, 15 deletions
diff --git a/macros/luatex/latex/luanumint/README.txt b/macros/luatex/latex/luanumint/README.txt index 808a1c0f83..ffb6056f14 100644 --- a/macros/luatex/latex/luanumint/README.txt +++ b/macros/luatex/latex/luanumint/README.txt @@ -1,3 +1,8 @@ +# The luanumint package +# version 1.1 +# Authors: Chetan Shirore and Ajit Kumar +# Email: mathsbeauty@gmail.com + # Introduction The luanumint package is developed using Lua to find the numerical integration of real-valued functions of a real variable over closed and bounded intervals. The package provides commands to find numerical integration using the mid-point, trapezoidal, and Simpson's one-third and three-eighth rules. The loadstring command is used to load and evaluate functions at different points in the mathematics environment of Lua. The package also provides commands to find numerical integration with step-by-step calculations. The package's commands have an optional argument to round off the numbers to the desired number of decimal places. The breqn package is loaded to display and align step-by-step calculations properly. Advanced users can customize the code to achieve the desired formatting of step-by-step computations. The package can assist in creating various problems on numerical integration with their solutions. The results obtained using different methods of numerical integration can be compared. It can save users' efforts of doing computations involving numerical integration in external software and copying them inside LaTeX documents. diff --git a/macros/luatex/latex/luanumint/luanumint.pdf b/macros/luatex/latex/luanumint/luanumint.pdf Binary files differindex fec3d14c07..cf0fd4476f 100644 --- a/macros/luatex/latex/luanumint/luanumint.pdf +++ b/macros/luatex/latex/luanumint/luanumint.pdf diff --git a/macros/luatex/latex/luanumint/luanumint.sty b/macros/luatex/latex/luanumint/luanumint.sty index aca4de0215..95eccf22bb 100644 --- a/macros/luatex/latex/luanumint/luanumint.sty +++ b/macros/luatex/latex/luanumint/luanumint.sty @@ -1,9 +1,9 @@ % The luanumint 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{luanumint}[1.0] +\ProvidesPackage{luanumint}[1.1] \RequirePackage{luacode,breqn,xkeyval} \begin{luacode*} function checksign(x) @@ -215,11 +215,11 @@ end \end{luacode*} % ========= KEY DEFINITIONS ========= -\define@key{someop}{a}{\def\mop@one{#1}}% -\define@key{someop}{b}{\def\mop@two{#1}}% -\define@key{someop}{n}{\def\mop@three{#1}}% -\define@key{someop}{func}{\def\mop@four{#1}}% -\define@key{someop}{trun}{\def\mop@five{#1}}% +\define@key{someop}{a}{\def\mop@onex{#1}}% +\define@key{someop}{b}{\def\mop@twox{#1}}% +\define@key{someop}{n}{\def\mop@threex{#1}}% +\define@key{someop}{func}{\def\mop@fourx{#1}}% +\define@key{someop}{trun}{\def\mop@fivex{#1}}% % ========= KEY DEFAULTS ========= \setkeys{someop}{a=0}% \setkeys{someop}{b=1}% @@ -232,7 +232,7 @@ end \directlua{% tempsubexp = "("..\luastring{#2}..")" local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() -tex.print(luamidpt(f,\mop@one,\mop@two,\mop@three,\mop@five)) +tex.print(luamidpt(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex)) }% }% }% @@ -242,7 +242,7 @@ tex.print(luamidpt(f,\mop@one,\mop@two,\mop@three,\mop@five)) \directlua{% tempsubexp = "("..\luastring{#2}..")" -local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luamidptSteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five)) +local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luamidptSteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex)) }% \endgroup}% @@ -251,7 +251,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)( \directlua{% tempsubexp = "("..\luastring{#2}..")" local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() -tex.print(luatrapz(f,\mop@one,\mop@two,\mop@three,\mop@five)) +tex.print(luatrapz(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex)) }% }% }% @@ -260,7 +260,7 @@ tex.print(luatrapz(f,\mop@one,\mop@two,\mop@three,\mop@five)) \setkeys{someop}{#1}% \directlua{% tempsubexp = "("..\luastring{#2}..")" -local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luatrapzsteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five)) +local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luatrapzsteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex)) }% \endgroup}% @@ -268,7 +268,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)( \setkeys{someop}{#1}% \directlua{% tempsubexp = "("..\luastring{#2}..")" -local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsononethird(f,\mop@one,\mop@two,\mop@three,\mop@five)) +local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsononethird(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex)) }% }% }% @@ -277,7 +277,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)( \setkeys{someop}{#1}% \directlua{% tempsubexp = "("..\luastring{#2}..")" -local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsononethirdsteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five)) +local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsononethirdsteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex)) }% \endgroup}% @@ -286,7 +286,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)( \setkeys{someop}{#1}% \directlua{% tempsubexp = "("..\luastring{#2}..")" -local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsonthreight(f,\mop@one,\mop@two,\mop@three,\mop@five)) +local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsonthreight(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex)) }% }% }% @@ -295,7 +295,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)( \setkeys{someop}{#1}% \directlua{% tempsubexp = "("..\luastring{#2}..")" -local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsonthreightsteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five)) +local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsonthreightsteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex)) }% \endgroup}% \endinput
\ No newline at end of file |