I am using LaTeX in Vim with VimLaTeX-Suite and i just started using Sage and i want to implement SageTex in my documents, but everytime i want to compile a have to follow this process in the terminal

$ pdflatex <doc.tex>

$ sage <doc.sagetex.sage>

$ pdflatex <doc.tex>

Ref:commands to compile from terminal

I want to run a command this \ll one which compiles the files to pdf.

I saw that you can make something like this:

map <leader>ls :w<cr><leader>ll<cr>!sage %.sagetex.sage<cr><leader>ll

or this

<leader>ls :w<cr>:!pdflatex %<cr>:!sage %.sagetex.sage<cr>:!pdflatex %

in the ~/.vim/ftplugin/tex.vim or the ~/.vimrc file but it doesnt work for me and i dont know what to do?

Can someone give me a hint? plz. :)

  • I think you're missing a colon before !. Does that work? – Dai Bowen Jan 31 '19 at 15:05
  • No i tried this <leader>ls :w<cr>:!pdflatex %<cr>:!sage %.sagetex.sage<cr>:!pdflatex % and still no output – Martin Mårtensson Feb 10 '19 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.