<div dir="ltr"><div><br></div><div>You may be able to do the calculations within (lua)latex without requiring an external system such as mathematica (or R which is probably more commonly used with latex). You haven't really said what calculations you have in mind. See for example</div><div><br></div><div><a href="https://ctan.org/pkg/luacas">https://ctan.org/pkg/luacas</a></div><div><br></div><div>David</div><div><br></div><div><br></div></div>