Auch:

sage --> arara: https://tex.stackexchange.com/questions/520683/arara-sage-a-sagemath-rule-for-arara

sage --> cmd: https://tex.stackexchange.com/a/521197/46023


NEU editiert:

Für eine SageTeX-beinhaltende Datei sagebsp01.tex sieht der Lauf so aus:

pdflatex sagebsp01.tex
sage sagebsp01.sagetex.sage
pdflatex sagebsp01.tex
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

In Linux sollte man das so ohne Weiteres in eine Shell eingeben können.

Für Windows wird der Sage-Aufruf maximal kompliziert:

Code, hier editierbar zum Übersetzen:
C:\Programme\SageMath8.9\runtime\bin\bash
-l C:/Programme/SageMath8.9/runtime/opt/sagemath-8.9/sage
-c "os.chdir('C:\Users\ccc\Desktop\Test\SageTeX');
load('sagebsp01.sagetex.sage')"
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Erläuterung:
· Die ersten beiden Zeilen starten Sage (in der cmd; wobei darauf zu achten ist, dass die Dateien bash.exe bzw. sage [ohne Zusatz] auch unter diesen Pfaden sind).

· In den letzten beiden Zeilen wird zunächst das "Sage-Home" auf den aktuellen Arbeitsordner-Pfad gelegt und endlich die sage-Datei übersetzt.

Kann man das arara'en?

Mit dem alten arara hätte ich es vermutlich gekonnt; mit dem neuen weiß ich nicht so recht.

Eigener Versuch:

Siehe Ergebnisantwort

gefragt 19 Dez '19, 20:30

cis's gravatar image

cis
9.5k95460491
Akzeptiert-Rate: 29%

bearbeitet 24 Dez '19, 13:26


Der liebe @TeXnician hat aus meinem fehlerhaften Ansatz eine funktionierende arara-Regel geschrieben:

!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"));
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Der Lauf ist damit:

Code, hier editierbar zum Übersetzen:
% arara: pdflatex
% arara: sagetex
% arara: pdflatex
\documentclass{report}
\usepackage{sagetex}
\begin{document}
\sage{2^1234}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Permanenter link
Dieser Antwort ist "Community Wiki" markiert.

beantwortet 24 Dez '19, 13:25

cis's gravatar image

cis
9.5k95460491
Akzeptiert-Rate: 29%

wikifiziert 24 Dez '19, 13:25

Deine Antwort
[Vorschau ausblenden]

Folgen dieser Frage

Per E-Mail:

Wenn sie sich anmelden, kommen Sie für alle Updates hier in Frage

Per RSS:

Antworten

Antworten und Kommentare

Frage-Themen:

×30
×11

gestellte Frage: 19 Dez '19, 20:30

Frage wurde gesehen: 3,652 Mal

zuletzt geändert: 24 Dez '19, 13:26

Willkommen, erstes Mal hier? Schau mal unter FAQ!

×