Troubleshooting Common TeXstudio Issues (and How to Fix Them)
1. TeXstudio won’t compile / “Command not found” errors
- Cause: LaTeX distribution (TeX Live, MiKTeX, MacTeX) not installed or not on PATH.
- Fix:
- Install a LaTeX distribution for your OS.
- Ensure compiler binaries (pdflatex, xelatex, lualatex, bibtex, biber) are in your system PATH or set full paths in TeXstudio: Options → Configure TeXstudio → Commands.
- Restart TeXstudio after changes.
2. Wrong PDF viewer or PDF not updating
- Cause: External viewer caching or TeXstudio configured to use wrong viewer.
- Fix:
- Use TeXstudio’s internal viewer: Options → Configure TeXstudio → Build → PDF Viewer → Internal PDF Viewer.
- If using external viewer, enable “Automatically check for external changes” in viewer, or use a viewer that supports forward/inverse search (SumatraPDF on Windows).
- Toggle continuous compilation (Tools → Build & View) or manually refresh.
3. BibTeX/Biber bibliography problems
- Cause: Wrong backend selected, missing run order, or .bib entry/key errors.
- Fix:
- Confirm backend (bibtex vs biber) matches your .sty (biblatex uses biber often). Set in Options → Configure TeXstudio → Build: adjust Bibliography tool.
- Use correct build sequence (LaTeX → BibTeX/Biber → LaTeX → LaTeX). Configure a custom build if needed.
- Check .bib syntax and citation keys; run log to find errors.
4. UTF-8 / character encoding issues
- Cause: File encoding mismatch or engine not set to handle UTF-8.
- Fix:
- Save files as UTF-8: File → Save As → Encoding.
- Add \usepackage[utf8]{inputenc} (for older LaTeX) or use modern engines (XeLaTeX/LuaLaTeX) which handle UTF-8 natively.
- In TeXstudio, set default encoding: Options → Configure TeXstudio → Editor → Default Encoding.
5. Missing packages reported in log
- Cause: Package not installed in LaTeX distribution.
- Fix:
- Use your distribution’s package manager (TeX Live Manager, MiKTeX Console) to install the missing package.
- On MiKTeX, enable on-the-fly package installation or install manually.
- Re-run compilation.
6. Slow performance with large documents
- Cause: Syntax checking, real-time spellcheck, or large project indexing.
- Fix:
- Disable real-time spell checking or grammar checking selectively: Options → Configure TeXstudio → Editor.
- Reduce number of open files, or split project into smaller files using \includeonly.
- Increase TeXstudio memory limits if applicable and close other apps.
7. Forward/inverse search (sync) not working
- Cause: Viewer and engine not configured for SyncTeX.
- Fix:
- Ensure compilation uses -synctex=1 (Options → Configure TeXstudio → Build → Commands include %).
- Use internal viewer or an external viewer that supports SyncTeX (SumatraPDF, Skim).
- Configure viewer commands in TeXstudio accordingly and test with Ctrl+Click (or configured shortcut).
8. Spellcheck language incorrect or missing dictionaries
- Cause: Missing language dictionaries or wrong language setting.
- Fix:
- Install hunspell dictionaries for your language.
- Set spellcheck language: Options → Configure TeXstudio → Language Checking.
- Add language comment in file for per-file override, e.g., % !TeX spellcheck = en_US
9. Code completion/snippets not triggering
- Cause: Completion settings disabled or filetype not recognized.
- Fix:
- Enable completion and snippets: Options → Configure TeXstudio → Completion.
- Ensure file saved with .tex extension.
- Reset or update cwl files (Configure TeXstudio → Completion → Add/Remove cwl files).
10. Strange compiler errors with packages or fonts
- Cause: Engine mismatch (pdfLaTeX vs XeLaTeX/LuaLaTeX) or outdated packages.
- Fix:
- Switch engine to match features (XeLaTeX/LuaLaTeX for system fonts, unicode).
- Update LaTeX distribution/packages.
- Inspect .log for exact error line and minimal example to isolate.
Quick troubleshooting checklist
- Ensure LaTeX distribution installed and up to date.
- Verify TeXstudio commands point to correct binaries.
- Use -synctex=1 for sync; enable internal viewer for fewer issues.
- Confirm bibliography backend and run order.
- Check file encoding is UTF-8.
- Install missing packages via distribution manager.
If you want, I can produce a one-page checklist tailored to your OS (Windows/macOS/Linux) with exact menu paths and sample command paths.
Leave a Reply