I'd like to do the following : create a .tex and directly show it after compilation with evince, ideally it would be like this:

showpdf file.tex

so I wrote

pdflatex $1 && evince ?

where the ? is for something that would take $1 and replace the .tex with a .pdf

  • OT: have you checked latexmk?
    – Rmano
    Mar 16 '15 at 22:49

You mean:

pdflatex "$1" && evince "${1%.tex}.pdf"

what about

pdflatex "$1" && evince "${1%.tex}.pdf"


  • ${x%suffixe} will delete suffixe from end of ${x}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.