Ask Your Question

Revision history [back]

There is a way to use sagetex on windows:

Step 1: Install miktex 2.9 64-bit, full install.

Step 2: Install Texniccenter 2.02 64-bit (I think another program like texworks, texmaker, winedt, etc will work).

Step 3: Install Sagemath 8.6 64-bit or better.

Step 4: Sagetex version in miktex is different to sagetex version in Sagemath 8.6. Then you should install in miktex same version of sagetex as you have in Sagemath.

This can be done copying al files in *c:\Program Files\SageMath 8.6\runtime\opt\sagemath-8.6\local\share\texmf\tex\latex\sagetex* into *c:\Program Files\MiKTeX 2.9\tex\latex\sagetex*

Now using sagetex on windows is possible according this:

1.- Use texniccenter to compile your .tex document. Remember you have to load sagetex package: \usepackage{sagetex}

2.- Sagemath installation on windows has 3 shotcurts. You should open Sagemath 8.6, not Sagemath 8.6 Shell or Sagemat 8.6 Notebook. Remember, Sagemath 8.6. After that a shell is opened and when we see sage:, sagemath is ready.

3.- Navigate to folder where our files are using "cd" command, like cd documents. Is important, if your folder's name has spaces placing it between ' ', i.e. cd 'folder 1'

4.- When you are into your destination folder, you can see its contents with "ls". There should be your sagetex.sage file. To process the file you have to write load(file.sagetex.sage') (file is the name of your .tex file) and the procces will start when you press enter.

5.- Finaly, use texniccenter to compile again the .tex file.

When you need to use again sage, you don't need to write the command, because using up arrow on your keyboard will apear the command and you only have to press enter.

I think will be possible automatize 3 steps using postprocessor on texniccenter, but I don't know how to do it right now.