* [NTG-context] wiki update: Modules @ 2023-09-30 11:53 Henning Hraban Ramm 2023-10-01 3:51 ` [NTG-context] " Otared Kavian 0 siblings, 1 reply; 7+ messages in thread From: Henning Hraban Ramm @ 2023-09-30 11:53 UTC (permalink / raw) To: mailing list for ConTeXt users I updated the list of included modules in https://wiki.contextgarden.net/Modules and tried to understand what each does. If you know matrices, could you perhaps update the page https://wiki.contextgarden.net/Matrix_in_maths to include the matrix module and the latest enhancements? Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: wiki update: Modules 2023-09-30 11:53 [NTG-context] wiki update: Modules Henning Hraban Ramm @ 2023-10-01 3:51 ` Otared Kavian 2023-10-01 9:01 ` Henning Hraban Ramm 0 siblings, 1 reply; 7+ messages in thread From: Otared Kavian @ 2023-10-01 3:51 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1393 bytes --] Hi Hraban, Thank you for your updating of the modules stuff. As far as I remember the matrix features are not related to any modules, but rather are part of LMTX. In nay case next week I will look at the page https://wiki.contextgarden.net/Matrix_in_maths <https://wiki.contextgarden.net/Matrix_in_maths> and verify that eveything on that page works fine and is up to date. Best regards: Otared > On 30 Sep 2023, at 13:53, Henning Hraban Ramm <texml@fiee.net> wrote: > > I updated the list of included modules in https://wiki.contextgarden.net/Modules and tried to understand what each does. > > If you know matrices, could you perhaps update the page https://wiki.contextgarden.net/Matrix_in_maths to include the matrix module and the latest enhancements? > > Hraban > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___________________________________________________________________________________ Otared Kavian e-mail: otared@gmail.com Phone: +33 6 88 26 70 95 [-- Attachment #1.2: Type: text/html, Size: 3308 bytes --] [-- Attachment #2: Type: text/plain, Size: 495 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: wiki update: Modules 2023-10-01 3:51 ` [NTG-context] " Otared Kavian @ 2023-10-01 9:01 ` Henning Hraban Ramm 2023-10-02 1:14 ` Jeong Dal via ntg-context 2023-10-02 19:45 ` Hans Hagen 0 siblings, 2 replies; 7+ messages in thread From: Henning Hraban Ramm @ 2023-10-01 9:01 UTC (permalink / raw) To: mailing list for ConTeXt users Am 01.10.23 um 05:51 schrieb Otared Kavian: > Hi Hraban, > > Thank you for your updating of the modules stuff. > As far as I remember the matrix features are not related to any modules, > but rather are part of LMTX. In nay case next week I will look at the page > > https://wiki.contextgarden.net/Matrix_in_maths > <https://wiki.contextgarden.net/Matrix_in_maths> > > and verify that eveything on that page works fine and is up to date. Thank you! But there _is_ a matrix module (hey, I just looked through all this stuff!) by Jeong Dalyoung & Hans; apparently it can do matrix calculations. https://source.contextgarden.net/tex/context/modules/mkiv/m-matrix.mkiv Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: wiki update: Modules 2023-10-01 9:01 ` Henning Hraban Ramm @ 2023-10-02 1:14 ` Jeong Dal via ntg-context 2023-10-02 19:45 ` Hans Hagen 1 sibling, 0 replies; 7+ messages in thread From: Jeong Dal via ntg-context @ 2023-10-02 1:14 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Jeong Dal [-- Attachment #1: Type: text/plain, Size: 958 bytes --] Dear Hraban, When I wrote a class material for Linear Algebra, it is nice to use \pmatrix and \bmatrix etc. But, for example, to write a result matrix of the product of two matrices, I need to calculate it somewhere and copy it to my text. Hence, I tried to use Lua to handle it in the ConTeXt. And, it is nicely working. During the process, I asked many questions to Hans and he gladly helped me. It is the first time for me to code using Lua, so my coding was clumsy. However, Hans corrected it to be usable in ConTeXt even though he is very very busy in many things. And, he made it a module and put it in the list. Thanks Hans. Finally I finished several chapters on Linear Algebra using that code. It was many years ago. Here is a document of it. I confirm that it is running well without any problem. I hope that someone who wants to write an article on Linear Algebra use it. Thanks for reading. Best regards, Dalyoung [-- Attachment #2: matrixDoc.tex --] [-- Type: application/octet-stream, Size: 8720 bytes --] \usemodule[m-matrix] \usemodule[art-01] \starttext \startluacode document.DemoMatrixA = { { 0, 2, 4, -4, 1 }, { 0, 0, 2, 3, 4 }, { 2, 2, -6, 2, 4 }, { 2, 0, -6, 9, 7 }, { 2, 3, 4, 5, 6 }, { 6, 6, -6, 6, 6 }, } document.DemoMatrixB = { { 0, 2, 4, -4, 1 }, { 0, 0, 2, 3, 4 }, { 2, 2, -6, 3, 4 }, { 2, 0, -6, 9, 7 }, { 2, 2, -6, 2, 4 }, } document.DemoMatrixC = { { 3, 3, -1, 3 }, { -1, 4, 1, 3 }, { 5, 4, 0, 2 }, { 2, 4, 0, -1 }, } \stopluacode \startbuffer[demo] \typebuffer \startalignment[middle] \dontleavehmode\inlinebuffer \stopalignment \stopbuffer \setuphead[section][before={\testpage[5]\blank[2*big]}] \startsubject[title={A symbolic matrix}] \startbuffer \ctxmodulematrix{typeset(moduledata.matrix.symbolic("a", "m", "n"))} $\qquad\qquad$ \ctxmodulematrix{typeset(moduledata.matrix.symbolic("a", "m", "n", 4, 8))} \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Generate a new $m \times n$ matrix}] \startbuffer \startluacode moduledata.matrix.typeset(moduledata.matrix.makeR(4,3, 0,5)) context.qquad() context("\\qquad") moduledata.matrix.typeset(moduledata.matrix.makeR(5,5,-1,5)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Swap two rows (ex: 2 and 4)}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixA) context("$\\qquad \\Rightarrow \\qquad$") moduledata.matrix.typeset(moduledata.matrix.swaprows(document.DemoMatrixA,2,4)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Swap two columns (ex: 1 and 3)}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixA) context("$\\qquad \\Rightarrow \\qquad$") moduledata.matrix.typeset(moduledata.matrix.swapcolumns(document.DemoMatrixA,1, 3)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Multiply 3 to row 2($3 \times r_2$)}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixA) context("$\\qquad \\Rightarrow \\qquad$") moduledata.matrix.typeset(moduledata.matrix.multiply(document.DemoMatrixA,2,3)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Add 4 times of row 3 to row 2($r_2 + 4 \times r_3$)}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixA) context("$\\qquad \\Rightarrow \\qquad$") moduledata.matrix.sumrow(document.DemoMatrixA,2,3,4) moduledata.matrix.typeset(document.DemoMatrixA) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Transpose a matrix}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixA) context("$\\qquad \\Rightarrow \\qquad$") moduledata.matrix.typeset(moduledata.matrix.transpose(document.DemoMatrixA)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={The inner product of two vectors}] \startbuffer \startluacode context("$<1,2,3> \\cdot <3,1,2> \\ =\\ $ ") context( moduledata.matrix.inner({ 1, 2, 3 }, { 3, 1, 2 })) \stopluacode \stopbuffer \getbuffer[demo] \startbuffer \startluacode context("$<1,2,3> \\cdot <3,1,2,4> \\ =\\ $ ") context(moduledata.matrix.inner({ 1, 2, 3 }, { 1, 2, 3, 4 })) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={The product of two matrices}] \startbuffer \startluacode context("$\\ $") moduledata.matrix.typeset(document.DemoMatrixB) context("$\\cdot$") moduledata.matrix.typeset(document.DemoMatrixA) context("$ = $") moduledata.matrix.typeset(moduledata.matrix.product (document.DemoMatrixB,document.DemoMatrixB)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={An Upper Triangular Matrix}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixB) context("$\\qquad \\Rightarrow \\qquad$") moduledata.matrix.typeset(moduledata.matrix.uppertri(document.DemoMatrixB)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Determinant: using triangulation}] \startbuffer \startluacode local m = { { 1, 2, 4 }, { 0, 0, 2 }, { 2, 2, -6 }, { 2, 2, -6 }, } moduledata.matrix.typeset(m, {fences="bars"}) context("$\\qquad = \\qquad$") context(moduledata.matrix.determinant(m)) \stopluacode \stopbuffer \getbuffer[demo] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixC, { fences = "bars" }) context("$\\qquad = \\qquad$") context(moduledata.matrix.determinant(document.DemoMatrixC)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Determinant: using Laplace Expansion}] \startbuffer \startluacode moduledata.matrix.typeset(document.DemoMatrixC, { fences = "bars" }) context("$\\qquad = \\qquad$") context(moduledata.matrix.laplace(document.DemoMatrixC)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Example of Laplace Expansion using submatrix function}] \startbuffer \startluacode local m = { { 1, 5, 4, 2 }, { 5, 2, 0, 4 }, { 2, 2, 1, 1 }, { 1, 0, 0, 5 }, } local options = {fences = "bars"} moduledata.matrix.typeset(m,options) context("\\par $=$") for j = 1, #m[1] do local mm = moduledata.matrix.submatrix(m, 1, j) local factor = (-1)^(1+j) *(m[1][j]) context("\\ ($%d$) \\cdot ", factor) moduledata.matrix.typeset(mm, options) if j < #m[1] then context("\\ $+$ ") end end \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Row echelon form}] \startbuffer \startluacode local m = { { 1, 3, -2, 0, 2, 0, 0 }, { 2, 6, -5, -2, 4, -3, -1 }, { 0, 0, 5, 10, 0, 15, 5 }, { 2, 6, 0, 8, 4, 18, 6 }, } moduledata.matrix.typeset(m) context("$\\Rightarrow$") moduledata.matrix.typeset(moduledata.matrix.rowechelon(m,1)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Solving linear equation}] \startbuffer \startluacode local m = { { 1, 3, -2, 0 }, { 2, 0, 1, 2 }, { 6, -5, -2, 4 }, { -3, -1, 5, 10 }, } local c = { 5, 2, 6, 8 } moduledata.matrix.typeset(moduledata.matrix.solve(m,c)) context.blank() moduledata.matrix.typeset(moduledata.matrix.solve(m,c), { template = 6 }) context.blank() moduledata.matrix.typeset(moduledata.matrix.solve(m,c), { template = "no" }) context.blank() moduledata.matrix.typeset(moduledata.matrix.solve(m,c), { template = "%0.3f" }) context.blank() moduledata.matrix.typeset(moduledata.matrix.solve(m,c), { template = "%0.4F" }) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={Inverse matrix}] \startbuffer \startluacode local m = { { 1, 1, 1 }, { 0, 2, 3 }, { 3, 2, 1 }, } context("$A =\\quad$") moduledata.matrix.typeset(m) context("$\\qquad A^{-1} = \\quad$") moduledata.matrix.typeset(moduledata.matrix.inverse(m)) context("\\blank\\ ") moduledata.matrix.typeset(m) context("$\\cdot$") moduledata.matrix.typeset(moduledata.matrix.inverse(m)) context("$ = $") moduledata.matrix.typeset(moduledata.matrix.product(m, moduledata.matrix.inverse(m))) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={make matrices(zero, identiry, random)}] \startbuffer \startluacode moduledata.matrix.typeset(moduledata.matrix.makeM(3, 0)) context.qquad() moduledata.matrix.typeset(moduledata.matrix.makeM(3, 1)) context.qquad() moduledata.matrix.typeset(moduledata.matrix.makeR(4,3)) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \startsubject[title={join rows, join columns}] \startbuffer \startluacode local mat1, mat2 mat1 = moduledata.matrix.makeR(3, 4) mat2 = moduledata.matrix.makeR(4, 3) context("Appending as columns: ") context.blank() moduledata.matrix.typeset(mat1) context("$\\&$") moduledata.matrix.typeset(mat1) context("\\quad $\\Rightarrow$ \\quad") moduledata.matrix.joinColumns(mat1, mat1) moduledata.matrix.typeset(mat1) context.blank() context("Appending as rows: ") context.blank() moduledata.matrix.typeset(mat2) context("$\\&$") moduledata.matrix.typeset(mat2) context("\\quad $\\Rightarrow$ \\quad") moduledata.matrix.joinRows(mat2, mat2) moduledata.matrix.typeset(mat2) \stopluacode \stopbuffer \getbuffer[demo] \stopsubject \stoptext [-- Attachment #3: Type: text/plain, Size: 1313 bytes --] > 2023. 10. 1. 오후 6:01, Henning Hraban Ramm <texml@fiee.net> 작성: > > Am 01.10.23 um 05:51 schrieb Otared Kavian: >> Hi Hraban, >> Thank you for your updating of the modules stuff. >> As far as I remember the matrix features are not related to any modules, but rather are part of LMTX. In nay case next week I will look at the page >> https://wiki.contextgarden.net/Matrix_in_maths <https://wiki.contextgarden.net/Matrix_in_maths> >> and verify that eveything on that page works fine and is up to date. > > Thank you! > > But there _is_ a matrix module (hey, I just looked through all this stuff!) by Jeong Dalyoung & Hans; apparently it can do matrix calculations. > > https://source.contextgarden.net/tex/context/modules/mkiv/m-matrix.mkiv > > Hraban > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___________________________________________________________________________________ [-- Attachment #4: Type: text/plain, Size: 495 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: wiki update: Modules 2023-10-01 9:01 ` Henning Hraban Ramm 2023-10-02 1:14 ` Jeong Dal via ntg-context @ 2023-10-02 19:45 ` Hans Hagen 1 sibling, 0 replies; 7+ messages in thread From: Hans Hagen @ 2023-10-02 19:45 UTC (permalink / raw) To: ntg-context On 10/1/2023 11:01 AM, Henning Hraban Ramm wrote: > Am 01.10.23 um 05:51 schrieb Otared Kavian: >> Hi Hraban, >> >> Thank you for your updating of the modules stuff. >> As far as I remember the matrix features are not related to any >> modules, but rather are part of LMTX. In nay case next week I will >> look at the page >> >> https://wiki.contextgarden.net/Matrix_in_maths >> <https://wiki.contextgarden.net/Matrix_in_maths> >> >> and verify that eveything on that page works fine and is up to date. > > Thank you! > > But there _is_ a matrix module (hey, I just looked through all this > stuff!) by Jeong Dalyoung & Hans; apparently it can do matrix calculations. > > https://source.contextgarden.net/tex/context/modules/mkiv/m-matrix.mkiv indeed, it has been around for quite a while Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: wiki update: Modules @ 2023-10-02 2:00 Andres Conrado Montoya 2023-10-02 8:19 ` Henning Hraban Ramm 0 siblings, 1 reply; 7+ messages in thread From: Andres Conrado Montoya @ 2023-10-02 2:00 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1406 bytes --] In the wiki, if I click a link to check a source code file (for example https://source.contextgarden.net/tex/context/base/mkiv/m-catchword.mkiv) I get a blank page with a very long list of source files on the left. If I search for the file with my browser's ctrl+f on that page, it returns zero results. I'm using Chrome. It happens for every link to source files. Not sure if it's a problem with my setup, but I have noticed that before, in different machines. Can anybody else confirm if they can correctly see the source files when clicking the links? -- Andrés Conrado Montoya Andi Kú andresconrado@gmail.com http://sesentaycuatro.com http://messier87.com http://chiquitico.org ---------------------------------------- Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. ---------------------------------------- “You develop an instant global consciousness, a people orientation, an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch.’” — Apollo 14 astronaut Edgar Mitchell [-- Attachment #1.2: Type: text/html, Size: 2028 bytes --] [-- Attachment #2: Type: text/plain, Size: 495 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [NTG-context] Re: wiki update: Modules 2023-10-02 2:00 Andres Conrado Montoya @ 2023-10-02 8:19 ` Henning Hraban Ramm 0 siblings, 0 replies; 7+ messages in thread From: Henning Hraban Ramm @ 2023-10-02 8:19 UTC (permalink / raw) To: ntg-context Am 02.10.23 um 04:00 schrieb Andres Conrado Montoya: > In the wiki, if I click a link to check a source code file (for example > https://source.contextgarden.net/tex/context/base/mkiv/m-catchword.mkiv > <https://source.contextgarden.net/tex/context/base/mkiv/m-catchword.mkiv>) I get a blank page with a very long list of source files on the left. If I search for the file with my browser's ctrl+f on that page, it returns zero results. I'm using Chrome. It happens for every link to source files. > > Not sure if it's a problem with my setup, but I have noticed that > before, in different machines. Can anybody else confirm if they can > correctly see the source files when clicking the links? Sorry, I used the general {{src|filename}} template in the wiki, that links to the source browser, but only to files in tex/context/base but not to the modules in tex/context/modules Not a problem on your side, I just need to fix the links. Otherwise you can use the search field of the source browser. Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-02 19:48 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-09-30 11:53 [NTG-context] wiki update: Modules Henning Hraban Ramm 2023-10-01 3:51 ` [NTG-context] " Otared Kavian 2023-10-01 9:01 ` Henning Hraban Ramm 2023-10-02 1:14 ` Jeong Dal via ntg-context 2023-10-02 19:45 ` Hans Hagen 2023-10-02 2:00 Andres Conrado Montoya 2023-10-02 8:19 ` Henning Hraban Ramm
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).