1

I am new to latex, and I have some problems when I try to run a latex code in TexStudio.
I wrote the following latex program in TexStudio:

\documentclass{article}
\begin{document}
    Hello world
\end{document}

and when I try to run it, TexStudio shows me the following error:

Could not start Build & View:PdfLatex:
pdflatex.exe -synctex=1 -interaction=nonstopmode
"<FileName>".tex

I am using TexLive in Windows.
I already added C:\texlive\2020\bin\win32 to the PATH,
and in TexStudio -> Options - > Configure TexStudio -> Commands -> PdfLatex, I wrote:

pdflatex.exe -synctex=1 -interaction=nonstopmode %.tex

When I run pdflatex test in the cmd I get:

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:\texlive\2020\bin\win32\mktexfmt
Running the command C:\texlive\2020\bin\win32\fmtutil-user.exe
C:\texlive\2020\bin\win32\runscript.tlu:935: C:\texlive\2020\bin\win32\runscript.tlu:858: no appropriate script or program found: fmtutil
I can't find the format file `pdflatex.fmt'!

Can someone please help me ?

18
  • After document class add '\usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel}' see if it works. Anyway if you didn't do it I suggest you to read one of the many guides available online, because the time you spend on it is worth it and saves you a lot of other time that you would miss trying to solve the basic problems that everyone encounters in the start – Rob Tan Sep 29 '20 at 18:00
  • I think that what is in the code is irrelevant because when I write "pdflatex test" in the cmd it gives me errors. I don't need any guides on latex right now because I can't even run it on my computer. @Rob – Freud Sep 29 '20 at 18:11
  • Hi..Welcome to TeX. In TeXStudio, could you check the LaTeX installation. Go to Help -> Check LaTeX installation. – Tanvir Sep 29 '20 at 18:47
  • I checked the LaTex installation in TexStudio and it gave me a "System Report.txt" file which has a bunch of information that I don't understand. What should I be looking for exactly in this text file? @Tanvir – Freud Sep 29 '20 at 18:55
  • Did the entire process exited normally? If not, then probably TeXStudio is unable to locate the TeXLive installation. – Tanvir Sep 29 '20 at 19:01
0

I tried using MikTex instead of TexLive and it works now.

0

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.