Open krishnakumarg1984 opened 5 years ago
Hi @krishnakumarg1984 , thank you for your suggestion. First, I'd like to clarify that Mathematica and WolframScript do support Windows. The *nix restriction of the package is because several shell commands are used in the macros, but I'm not familiar with Windows commands, nor do I have a Windows computer near me at the moment to do tests.
Having said that, it would be nice to support Mathics nonetheless since it's syntax compatible with Mathematica and it would help those who do not have access to Mathematica. So I'll look into it.
@stevenliuyi Thank you for your positive views on this suggestion. Here are a couple of clarifications.
WolframScript
is proprietary. I am a bit wary of running a script that I cannot inspect myself. This security aspect is one reason shell-escape is not enabled by default in many TeX distributions.mathics
is essentially an independent implementation of the Wolfram Language i.e. the Wolfram Language specifications have been published as a standard. Mathematica is a proprietary implementation, while mathics
is an independent open-source implementation that is free (in every sense, including the $$$
perspective). They are both drop-in replacements in my experience.Maybe your package is not totally restricted to *nix
envionments as you think? Could you please elaborate on the shell commands needed? If they are just the bash
interpreter and the coreutils
/binutils
/findutils
, they can be easily made available on Windows. For example, I always run my tex
files from the excellent cmder
application which provides a mostly unix-like environment natively on windows without any extra "installation" steps i.e. it is a portable application.
We can draw further inspiration by drawing parallels with your package to the iwolfram project. This is a jupyter kernel capable of running either mathematica
or mathics
.
Anyway, I don't have mathematica
, but certainly do have mathics
. If you can try to implememnt mathics
support in a dev
branch, I am happy to pull it and test it for you on Windows.
Thank you for the clarifications.
The main features only depend on rm
and cp
, which could be easily changed to Windows equivalents of course. Other commands used in the package include sed
(for \wolframtex
), convert
(for \wolframanimation
) and command
(for checking availibity of wolframscript).
Great. All of these are available on the portable cmder
as well as the new WSL
feature on Windows 10, and should work out of the box.
There are many, many native implementations of these tools via many ports. convert
of course, is a part of imagemagick
which is cross-platform.
This is looking more and more realistic to work on windows. Of course, I can't test it yet since I am not using mma
.
Hi, I just added the support for Mathics.
@stevenliuyi thank you. I have tested this. It didn't work on Windows, but worked decently on a linux machine.
mathics
. wolframalpha
which will obviously will not work from mathics
Dsolve
example works fine, but typesets Mathematica's output form. The output should be coerced into TeXForm. Therefore, can your package append the // TexForm
string that is passed into mathics
?asymptote
example for 3D plotting fails to compile. Thank you for the test.
Actually the output of wolframdsolve
is already in the TeXForm. It seems that Mathics' TeXForm
function isn't ideal. For example, Sin[x]
is converted to \text{Sin}\left[x\right]
instead of \sin(x)
.
Besides, I tested myself and it seems the asymptote
plot can be successfully compiled on Linux (see https://travis-ci.org/stevenliuyi/latex-alpha2). I'm not sure why it doesn't work on your machine.
I forgot to mention that I raised an issue about the TeX conversion problem on mathics/Mathics#770.
@stevenliuyi I just noticed that recently sagetex
was updated to work with Python 3. What do you think about this?
@krishnakumarg1984 Sorry that I'm not familiar with SageTeX. FYI, I just found another package sympytex which is also kind of similar to SageTeX.
@stevenliuyi great. But it seems to be not updated since 2014. I am inclined to now go with sagetex, considering the recent activity in that package maintainence
@stevenliuyi mathics
achieved its 1.0 release a few months ago. And the new package author is going strong with tons of commits and frequent releases (I believe we are now up to 1.2 or so).
First of all, thank you for this package. So far, we didn't really have a seamless way to automatically typeset symbolic math code (
sagetex
was unsatisfactory).I'd like to propose a solution that might lift the
*nix
restriction of the package - support themathics
executable as a package option.mathics
is a free, open-source lightweight alternative tomathematica
that entirely usesWolfram
syntax. Since you just have to add in a package option, this is likely to be a trivial change, but one that can immensely help those who cannot affordmathematica
or are onwindows
. (mathics
is fully cross-platform).