Call Sage in TeXstudio (Windows)
I have installed and tried SageTeX (using pdflatex, opening the sage console and using pdflatex again). This works fine. I want to get a user command in TeXstudio that calls sage without the need to open the console. I have found the question here that answers this question for Linux and Texmaker. This states that I have to plug in the complete path of sage in the command line: <path>/sage %.sagetex.sage. I was not able to adapt this answer to Windows since in my Sage-folder there are only links to executables and I dont know which .exe I should take. Can someone help?
texstudio sagetex
|
show 1 more comment
I have installed and tried SageTeX (using pdflatex, opening the sage console and using pdflatex again). This works fine. I want to get a user command in TeXstudio that calls sage without the need to open the console. I have found the question here that answers this question for Linux and Texmaker. This states that I have to plug in the complete path of sage in the command line: <path>/sage %.sagetex.sage. I was not able to adapt this answer to Windows since in my Sage-folder there are only links to executables and I dont know which .exe I should take. Can someone help?
texstudio sagetex
Which executables are there in the folder? Presumably something calledsage.exeshould work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio.
– Marijn
Feb 2 at 4:39
There is a .lnk file named "Sage Math Shell" that I use to open the console. This links to"<path>SageMath 8.6runtimebinmintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh'and typesagethere. I tried using the executableminttybut this did not work. Also I did not find any executable namedsage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file).
– Martin
Feb 2 at 9:18
You could try that full line (without the-t 'SageMath 8.6 Shell'and thei- sagemath.icowhich set the title and the icon for the terminal window) with or without the--loginand probably without the-shand addsage %.sagetex.sageat the end - maybe you need to play around a bit to find the correct configuration options.
– Marijn
Feb 2 at 16:39
Using"<path>SageMath 8.6runtimebinmintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sageopens sage in the console, but nothing happens (if I omit--loginand/or-shthe console just opens for a short time and closes again).
– Martin
Feb 2 at 17:16
Opening and closing directly is what you want - as long as Sage is executed in between. Maybe you can add;sleep 5after the sage command to pause the console for 5 seconds so you can see what is happening before it closes?
– Marijn
Feb 2 at 22:00
|
show 1 more comment
I have installed and tried SageTeX (using pdflatex, opening the sage console and using pdflatex again). This works fine. I want to get a user command in TeXstudio that calls sage without the need to open the console. I have found the question here that answers this question for Linux and Texmaker. This states that I have to plug in the complete path of sage in the command line: <path>/sage %.sagetex.sage. I was not able to adapt this answer to Windows since in my Sage-folder there are only links to executables and I dont know which .exe I should take. Can someone help?
texstudio sagetex
I have installed and tried SageTeX (using pdflatex, opening the sage console and using pdflatex again). This works fine. I want to get a user command in TeXstudio that calls sage without the need to open the console. I have found the question here that answers this question for Linux and Texmaker. This states that I have to plug in the complete path of sage in the command line: <path>/sage %.sagetex.sage. I was not able to adapt this answer to Windows since in my Sage-folder there are only links to executables and I dont know which .exe I should take. Can someone help?
texstudio sagetex
texstudio sagetex
asked Feb 1 at 20:05
MartinMartin
324113
324113
Which executables are there in the folder? Presumably something calledsage.exeshould work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio.
– Marijn
Feb 2 at 4:39
There is a .lnk file named "Sage Math Shell" that I use to open the console. This links to"<path>SageMath 8.6runtimebinmintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh'and typesagethere. I tried using the executableminttybut this did not work. Also I did not find any executable namedsage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file).
– Martin
Feb 2 at 9:18
You could try that full line (without the-t 'SageMath 8.6 Shell'and thei- sagemath.icowhich set the title and the icon for the terminal window) with or without the--loginand probably without the-shand addsage %.sagetex.sageat the end - maybe you need to play around a bit to find the correct configuration options.
– Marijn
Feb 2 at 16:39
Using"<path>SageMath 8.6runtimebinmintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sageopens sage in the console, but nothing happens (if I omit--loginand/or-shthe console just opens for a short time and closes again).
– Martin
Feb 2 at 17:16
Opening and closing directly is what you want - as long as Sage is executed in between. Maybe you can add;sleep 5after the sage command to pause the console for 5 seconds so you can see what is happening before it closes?
– Marijn
Feb 2 at 22:00
|
show 1 more comment
Which executables are there in the folder? Presumably something calledsage.exeshould work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio.
– Marijn
Feb 2 at 4:39
There is a .lnk file named "Sage Math Shell" that I use to open the console. This links to"<path>SageMath 8.6runtimebinmintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh'and typesagethere. I tried using the executableminttybut this did not work. Also I did not find any executable namedsage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file).
– Martin
Feb 2 at 9:18
You could try that full line (without the-t 'SageMath 8.6 Shell'and thei- sagemath.icowhich set the title and the icon for the terminal window) with or without the--loginand probably without the-shand addsage %.sagetex.sageat the end - maybe you need to play around a bit to find the correct configuration options.
– Marijn
Feb 2 at 16:39
Using"<path>SageMath 8.6runtimebinmintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sageopens sage in the console, but nothing happens (if I omit--loginand/or-shthe console just opens for a short time and closes again).
– Martin
Feb 2 at 17:16
Opening and closing directly is what you want - as long as Sage is executed in between. Maybe you can add;sleep 5after the sage command to pause the console for 5 seconds so you can see what is happening before it closes?
– Marijn
Feb 2 at 22:00
Which executables are there in the folder? Presumably something called
sage.exe should work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio.– Marijn
Feb 2 at 4:39
Which executables are there in the folder? Presumably something called
sage.exe should work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio.– Marijn
Feb 2 at 4:39
There is a .lnk file named "Sage Math Shell" that I use to open the console. This links to
"<path>SageMath 8.6runtimebinmintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh' and type sage there. I tried using the executable mintty but this did not work. Also I did not find any executable named sage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file).– Martin
Feb 2 at 9:18
There is a .lnk file named "Sage Math Shell" that I use to open the console. This links to
"<path>SageMath 8.6runtimebinmintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh' and type sage there. I tried using the executable mintty but this did not work. Also I did not find any executable named sage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file).– Martin
Feb 2 at 9:18
You could try that full line (without the
-t 'SageMath 8.6 Shell' and the i- sagemath.ico which set the title and the icon for the terminal window) with or without the --login and probably without the -sh and add sage %.sagetex.sage at the end - maybe you need to play around a bit to find the correct configuration options.– Marijn
Feb 2 at 16:39
You could try that full line (without the
-t 'SageMath 8.6 Shell' and the i- sagemath.ico which set the title and the icon for the terminal window) with or without the --login and probably without the -sh and add sage %.sagetex.sage at the end - maybe you need to play around a bit to find the correct configuration options.– Marijn
Feb 2 at 16:39
Using
"<path>SageMath 8.6runtimebinmintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sage opens sage in the console, but nothing happens (if I omit --login and/or -sh the console just opens for a short time and closes again).– Martin
Feb 2 at 17:16
Using
"<path>SageMath 8.6runtimebinmintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sage opens sage in the console, but nothing happens (if I omit --login and/or -sh the console just opens for a short time and closes again).– Martin
Feb 2 at 17:16
Opening and closing directly is what you want - as long as Sage is executed in between. Maybe you can add
;sleep 5 after the sage command to pause the console for 5 seconds so you can see what is happening before it closes?– Marijn
Feb 2 at 22:00
Opening and closing directly is what you want - as long as Sage is executed in between. Maybe you can add
;sleep 5 after the sage command to pause the console for 5 seconds so you can see what is happening before it closes?– Marijn
Feb 2 at 22:00
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472941%2fcall-sage-in-texstudio-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472941%2fcall-sage-in-texstudio-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Which executables are there in the folder? Presumably something called
sage.exeshould work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio.– Marijn
Feb 2 at 4:39
There is a .lnk file named "Sage Math Shell" that I use to open the console. This links to
"<path>SageMath 8.6runtimebinmintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh'and typesagethere. I tried using the executableminttybut this did not work. Also I did not find any executable namedsage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file).– Martin
Feb 2 at 9:18
You could try that full line (without the
-t 'SageMath 8.6 Shell'and thei- sagemath.icowhich set the title and the icon for the terminal window) with or without the--loginand probably without the-shand addsage %.sagetex.sageat the end - maybe you need to play around a bit to find the correct configuration options.– Marijn
Feb 2 at 16:39
Using
"<path>SageMath 8.6runtimebinmintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sageopens sage in the console, but nothing happens (if I omit--loginand/or-shthe console just opens for a short time and closes again).– Martin
Feb 2 at 17:16
Opening and closing directly is what you want - as long as Sage is executed in between. Maybe you can add
;sleep 5after the sage command to pause the console for 5 seconds so you can see what is happening before it closes?– Marijn
Feb 2 at 22:00