1 | initial version |

If you use arara, known as "The cool TeX-automatisation Tool", written by @PauloCereda, you can set compilation instructions into your tex-document, i.e.

`% arara: pdflatex`

an then only one run `arara example.tex`

is needed.

In TeXLive arara is installed by default. You can also integrate arara into your TeX editor.

There is no arara-rule for Sage in the main set of arara-rule, but it has been written:

See the original post arara: sage - A Sage(math)-rule for arara

It is `sagetex.yaml`

, which works for Windows-users and for Linus-users:

```
!config
# SageTeX-Rule for arara.
#
# Dear Windows-users, please check the paths
# pathToBashExecutive and pathToSageStartfile
# due to your Sage-installation!
#
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Programme\\SageMath8.9\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(file) + ".sagetex.sage"));
}
```

Let's test a `example.tex`

```
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
```

2 | No.2 Revision |

If you use arara, known as "The cool TeX-automatisation Tool", written by @PauloCereda, you can set compilation instructions into your tex-document, i.e.

`% arara: pdflatex`

~~an ~~and then only one run `arara example.tex`

is needed.

In TeXLive arara is installed by default. You can also integrate arara into your TeX editor.

There is no arara-rule for Sage in the main set of arara-rule, but it has been written:

See the original post arara: sage - A Sage(math)-rule for arara

It is `sagetex.yaml`

, which works for Windows-users and for Linus-users:

```
!config
# SageTeX-Rule for arara.
#
# Dear Windows-users, please check the paths
# pathToBashExecutive and pathToSageStartfile
# due to your Sage-installation!
#
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Programme\\SageMath8.9\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(file) + ".sagetex.sage"));
}
```

Let's test a `example.tex`

```
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
```

3 | No.3 Revision |

If you use arara, known as "The cool TeX-automatisation Tool", written by @PauloCereda, you can set compilation instructions into your tex-document, i.e.

`% arara: pdflatex`

and then only one run `arara example.tex`

is needed.

In TeXLive arara is installed by default. You can also integrate arara into your TeX editor.

There is no arara-rule for Sage in the main set of arara-rule, but it has been written:

See the original post arara: sage - A Sage(math)-rule for arara

It is `sagetex.yaml`

, which works for Windows-users and for ~~Linus-users:~~Linux-users:

```
!config
# SageTeX-Rule for arara.
#
# Dear Windows-users, please check the paths
# pathToBashExecutive and pathToSageStartfile
# due to your Sage-installation!
#
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Programme\\SageMath8.9\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(file) + ".sagetex.sage"));
}
```

Let's test a `example.tex`

```
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
```

4 | No.4 Revision |

If you use arara, known as "The cool TeX-automatisation Tool", written by @PauloCereda, you can set compilation instructions into your tex-document, i.e.

`% arara: pdflatex`

`% arara: biber`

`.....`

and then only one run `arara example.tex`

is needed.

In TeXLive arara is installed by default. You can also integrate arara into your TeX editor.

See the original post arara: sage - A Sage(math)-rule for arara

It is `sagetex.yaml`

, which works for Windows-users and for Linux-users:

```
!config
# SageTeX-Rule for arara.
#
# Dear Windows-users, please check the paths
# pathToBashExecutive and pathToSageStartfile
# due to your Sage-installation!
#
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Programme\\SageMath8.9\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(file) + ".sagetex.sage"));
}
```

Let's test a `example.tex`

```
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
```

5 | No.5 Revision |

If you use arara, known as "The cool TeX-automatisation Tool", written by @PauloCereda, you can set compilation instructions into your tex-document, i.e.

`% arara: pdflatex`

`% arara: biber`

`.....`

and then only one run `arara example.tex`

is needed.

In TeXLive arara is installed by default. You can also integrate arara into your TeX editor.

There is no arara-rule for Sage in the main set of ~~arara-rule, ~~arara-rules, but it has been written:

See the original post arara: sage - A Sage(math)-rule for arara

It is `sagetex.yaml`

, which works for Windows-users and for Linux-users:

```
!config
# SageTeX-Rule for arara.
#
# Dear Windows-users, please check the paths
# pathToBashExecutive and pathToSageStartfile
# due to your Sage-installation!
#
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Programme\\SageMath8.9\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(file) + ".sagetex.sage"));
}
```

Let's test a `example.tex`

```
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
```

6 | No.6 Revision |

If you use arara, known as "The cool TeX-automatisation Tool", written by @PauloCereda, you can set compilation instructions into your tex-document, i.e.

`% arara: pdflatex`

`% arara: biber`

`.....`

and then only one run `arara example.tex`

is needed.

In TeXLive arara is installed by default. You can also integrate arara into your TeX editor.

There is no arara-rule for Sage in the main set of arara-rules, but it has been written:

See the original post arara: sage - A Sage(math)-rule for arara

It is `sagetex.yaml`

, which works for Windows-users and for Linux-users:

```
!config
# SageTeX-Rule for arara.
#
# Dear Windows-users, please check the paths
# pathToBashExecutive and pathToSageStartfile
# due to your Sage-installation!
#
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Programme\\SageMath8.9\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(file) + ".sagetex.sage"));
}
```

Let's test ~~a ~~an `example.tex`

```
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.