5

How do I make TeXstudio find the MiKTeX file?

I downloaded the MiKTeX distribution first and then TeXstudio and put them in the same folder.

I have tried reinstalling TeXstudio and I have tried deleting the .ini file but neither works...

CarLaTeX
  • 62,716
Mia
  • 51

8 Answers8

6

I have downloaded both in portable versions and just fix it adding: "....\texmfs\install\miktex\bin" to Path in System Variables in Environment Variables.

Civic
  • 61
2

I faced the same problem. I solved the problem this way:

Options > Configure TeXstudio... > Commands > LaTeX

The LaTeX-commands can be found in a sub-folder of the MiKTeX installation folder.

First time, I tried: "C:/Program Files/LaTeX/MiKTeX 2.9/tex/latex/imakeidx.sty"

After a reboot of TeXstudio, it was able to find most of the other commands too.

Then I realized that this line should actually be pointed to the bin file.

For me that was "C:/Program Files/LaTeX/MiKTeX 2.9/miktex/bin/x64/latex.exe".

It doesn't work perfect yet, but at least it is now able to read and compile something. I hope this helps you too.

Teun Zijp
  • 437
2

I was able to solve this by restoring the default commands in TeXStudio. Follow a simmilar path to Teun

Options > Configure TeXstudio... > Commands > LaTeX

and click the arrow button to the right of each command.

Somehow the default commands were not restored even when I uninstalled and reinstalled TeXStudio. Not quite sure how that happened but this fix worked for me.

0

Close TeXStudio. In Windows Explorer navigate to some folder like: C:\Users\YOUR_ACCOUNT_NAME\AppData\Roaming\texstudio

Delete texstudio.ini file.

Restart TeXStudio.

This fixed it for me.

siJa
  • 11
0

put only in dvi something like that

DVI Viewer (view-dvi): '"C:\Program Files (x86)\texmf\miktex\bin\yap.exe" -1 -s @?"c:ame "?am.dvi"'

and in another option put for default

  • You should NOT need to put c:\ifjfjfaf[iaf\ yap.exe blah blah That tells me other commands will fail IT SHOULD BE yap.exe -1 -s @?"c:ame "?am.dvi"' and if your path is configured correctly it WILL WORK –  Jan 25 '19 at 18:59
0

I installed miktex system wide manually
and then used choco install texstudio in powershell to install texstudio.

After that TeXstudio could find latex and worked perfectly.

Damian
  • 153
0

Using the portable version for both programs, I added the following two variables to my user environment (see below). Tthey can be added to the system environment as well, if one wants them to be available for everyone.

MIKTEX_HOME -> %APPS_MY%\miktex
MIKTEX_BIN -> %MIKTEX_HOME%\miktex\bin\x64

(%APPS_MY% should be replaced by the directory above miktex)

To add the variables, go to File Explorer -> Right click on This Computer -> Properties -> Advanced configuration -> User Environment

0

I found this video setup is really helpful, especially if you have to use a portable version. Anyone who faces this problem can watch this: https://www.youtube.com/watch?v=dNvX-6V6v4s&ab_channel=ChandraHas

In short, you need to manually specify the binary executable files for Latex, PdfLateX, XeLateX, LuaLaTeX, BibTeX, Biber, Makeindex, Makeglassaries (which depend on your tex file needed to compile and generate PDF) as follows:

  • Goto Options --> Configure TeXstudio --> Commands
  • Specify the above packages by locating to your downloaded MikTeX. For example:
    • LaTeX: <path_to_portable_miktex>.../PortableSoft/miktex-portable/texmfs/install/miktex/bin/x64/latex.exe
    • PdfLaTeX: <path_to_portable_miktex>.../PortableSoft/miktex-portable/texmfs/install/miktex/bin/x64/pdflatex.exe
    • and other packages.

After that, TexStudio might be required to install some additional packages during compiling, but they can be automatically detected, downloaded, and installed by TexStudio.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – Werner Aug 05 '21 at 05:26
  • @Werner: Thank you for your suggestion. – ngovanmao Aug 05 '21 at 08:01