Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?