I was writing my own thesis in LaTeX, but when I press the "Build & View" button, it doesn't work and this message appears:

Error: Could not start the command: Build & View.

I have written almost three chapters and I didn't have any error before, but I can't understand this. The only different thing I have written is this: $ T_{ai} $. I've tried to delete it but the problem still remains. What could I do?

  • Welcome to TeX.SX! What IDE are you using? (Have you tried restarting your session?) – ebosi Jun 21 '17 at 18:55
  • I'm using TexStudio and yes, I've tried to open a new session and restart the PC but nothing. I've tried also to start another project but I get the same result. – salvo9415 Jun 21 '17 at 18:58
  • 1
    You might want to try to reset the default settings. Make a copy of the config.ini file before if you have modified some settings (e.g. path, color sheme, etc.). If it works with default settings, then update your .ini file based on your back-up step by step and observe what causes the problem. – ebosi Jun 21 '17 at 19:00
  • I've deleted the file and it works with default settings, but the old one is very long and it's difficult to find the problem. Can I lose important changes if I use the default file? – salvo9415 Jun 21 '17 at 19:42
  • Keep the backup, but if you're ok with the current state of your system, that's fine. The texstudio.ini contains your preferences (i.e. all settings: enabled/disabled feature, colorsheme, path, etc.). It also contains the list of recent files and commands (for Ctrl+Z). So you can delete it at the cost of losing settings you customized – ebosi Jun 21 '17 at 19:46

The issue is likely to be caused by an error in the predefined command "Build & View" due to an (un)voluntary modification of this setting. (See in Options/Configure TeXstudio/Build/Build & View and Options/Configure TeXstudio/Commands.)

The easiest way to solve it, is to restore default settings. For this, you just need to delete the texstudio.ini file on your computer while TeXstudio is turned off.

Note: The texstudio.ini file stores all your preferences and customized settings (shortcuts, color sheme, previous files, etc.). You might want to save a backup before deleting it. Then, if you want to restore your customized settings, just copy necessary content of your backup into the new texstudio.ini file. (Again, while TeXstudio is turned off: indeed, TXS overwrites the texstudio.ini file when closing a session.)

  • A friend of mine passed me his texstudio.ini file and it actually works. He uses the same preferences, so I don't think I can have other problems (right?). Anyway, thank you so much for your help. – salvo9415 Jun 21 '17 at 20:34
  • @salvo9415 Yep, it's safe. The most boring part is if you have to reconfigure all the syntaxt highlighting, the most critical part is if you had changed path directories. But as long as it works and you're satisfied, that's ok! – ebosi Jun 21 '17 at 20:36
  • Sure, I can't understand how it happened, but the most important thing is that I can continue my work. Thank you again! – salvo9415 Jun 21 '17 at 20:41

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.