I just started with TeXstudio and when I enter the simple commands that are


and save as PDF I still get the error seen on the picture. error i get

Picture of commands in picture My commands

  • Welcome to TeX SX! What is your viewer? Probably the .pdf is locked.
    – Bernard
    Commented Sep 8, 2016 at 9:19
  • 4
    TeXstudio is not enough. You also have to install the program and packages that do the real work, for example TeX Live. Have you installed TeX Live?
    – Johannes_B
    Commented Sep 8, 2016 at 9:25
  • 1
    first of all: TeXstudio is an editor. you need to make sure, you have the compiling engine installed as well, as already mentioned. second: you can't compile *.pdf-files. you need to save them with the extension .tex. these you then compile into PDFs.
    – naphaneal
    Commented Sep 8, 2016 at 9:43
  • 1
    You need to install TeX Live in order to create the PDF. You can either use packages provided by your distro (e.g. Ubuntu), if applicable, or you can use the installer provided by upstream. The former is probably easier right now. The latter is easier in the long run.
    – cfr
    Commented Sep 8, 2016 at 11:03
  • 2
    TexStudio proposes in its Help menu a "Check LaTeX installation" command, use it and report what it tells you.
    – DRi
    Commented Sep 8, 2016 at 13:44

1 Answer 1


Welcome to TeX.sx.

First things first :)

  • Be sure that Texlive is installed and that Texstudio recognizes the installation, check if it calls the compiler (pdflatex), do as @naphaneal and @DRi said;

  • LaTeX is supposed to compile .tex files into .pdf files, so the document you edit is the source, and therefore must be saved with the .tex extension. When you run the command pdflatex upon it a .pdf file will be produced. And basically that's how TeX works.

What next?

After compiling your simple first document you should take a look at the following documents that will explain how TeX and LaTeX work and show you very useful commands that will help you write more efficiently. The following books are good for beginners.

Geting started with LaTeX: http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/GSWLaTeX.pdf

The not so short introduction to LaTeX2e: http://repositorios.cpai.unb.br/ctan/info/lshort/english/lshort.pdf

And keep us posted!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .