ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 09 Nov 2017 08:52:42 +0100LatexMk and sagetex not workinghttps://ask.sagemath.org/question/39455/latexmk-and-sagetex-not-working/ According to the Sagetex github page (https://github.com/sagemath/sagetex/wiki) the following snippet code put into a .latexmkrc dotfile should make latexmk run sagetex.sage files if necessary:
add_cus_dep('sagetex.sage', 'sagetex.sout', 0, 'makesout');
$hash_calc_ignore_pattern{'sage'} = '^( _st_.goboom| ?_st_.current_tex_line|print .SageT)';
sub makesout {
system("sage '$_[0].sagetex.sage'");
}
But nothing seems to happen, when I run latexmk on the tex file, it gives no errors and does not run the sagetex.sage file, but compiles the pdf nontheless. If I run latexmk and sage manually I have no problems compiling the document with the sage math. Is the code outdated/can it be fixed to work properly?Wed, 08 Nov 2017 20:48:45 +0100https://ask.sagemath.org/question/39455/latexmk-and-sagetex-not-working/Comment by Emmanuel Charpentier for <p>According to the Sagetex github page (<a href="https://github.com/sagemath/sagetex/wiki">https://github.com/sagemath/sagetex/wiki</a>) the following snippet code put into a .latexmkrc dotfile should make latexmk run sagetex.sage files if necessary:</p>
<pre><code>add_cus_dep('sagetex.sage', 'sagetex.sout', 0, 'makesout');
$hash_calc_ignore_pattern{'sage'} = '^( _st_.goboom| ?_st_.current_tex_line|print .SageT)';
sub makesout {
system("sage '$_[0].sagetex.sage'");
}
</code></pre>
<p>But nothing seems to happen, when I run latexmk on the tex file, it gives no errors and does not run the sagetex.sage file, but compiles the pdf nontheless. If I run latexmk and sage manually I have no problems compiling the document with the sage math. Is the code outdated/can it be fixed to work properly?</p>
https://ask.sagemath.org/question/39455/latexmk-and-sagetex-not-working/?comment=39459#post-id-39459The second part of the page you pointed at explains why the solution proposed in the first part doesn't work ;-).
You should try to implement the suggestion given in the second part.Thu, 09 Nov 2017 08:52:42 +0100https://ask.sagemath.org/question/39455/latexmk-and-sagetex-not-working/?comment=39459#post-id-39459