Troubleshooting
Even the best research assistants (human or AI) have off days. This guide helps you diagnose and resolve common issues you might encounter when using TeXRA. We've organized troubleshooting tips by category to help you quickly find solutions to specific problems.
Installation Issues
Extension Not Loading
Problem: TeXRA doesn't appear in the sidebar or shows errors during load.
Solutions:
Check VS Code compatibility:
- Ensure you're running VS Code version 1.96.2 or newer
- Update VS Code if needed
Verify installation:
- Go to Extensions view (Ctrl+Shift+X)
- Search for "TeXRA"
- If not installed or disabled, install or enable it
- Try reinstalling from the VSIX file
Check error logs:
- Open Output panel (Ctrl+Shift+U)
- Select "TeXRA" from the dropdown menu
- Look for specific error messages
Check extension conflicts:
- Temporarily disable other extensions that might conflict
- Restart VS Code and check if TeXRA works
Dependency Installation Problems
Problem: Error messages about missing dependencies like LaTeX, Perl, or GraphicsMagick.
Solutions:
Verify dependencies: Run these commands in your terminal to check installations:
bashpdflatex --version perl --version gm version # For GraphicsMagick gs --version # For Ghostscript
Check PATH environment:
- Ensure installation directories are in your system PATH
- Restart your terminal and VS Code after updating PATH
Manual installation:
- Follow the detailed installation steps in the Installation Guide
- Use the recommended installation methods for your OS
Fix permissions issues:
- Ensure you have adequate permissions to run these tools
- On macOS/Linux, check file permissions with
ls -la
API Connection Issues
API Key Problems
Problem: Error messages related to API keys or authentication failures.
Solutions:
Verify API keys:
- Open TeXRA in VS Code
- Click "Set API Key" option
- Re-enter your API keys carefully
Check API key validity:
- Verify your API keys are active in the provider dashboards
- Check for any billing issues or usage limits
Network issues:
- Ensure your network allows connections to API endpoints
- Check if you need to configure proxy settings
Provider status:
- Check the status pages for OpenAI, Anthropic, or Google
- Temporary API outages may cause connection issues
OpenRouter Connectivity
Problem: Issues connecting to models via OpenRouter.
Solutions:
OpenRouter configuration:
- Verify your OpenRouter API key is correctly set
- Check that
texra.model.useOpenRouter
is set totrue
Model availability:
- Ensure the requested model is available via OpenRouter
- Check the OpenRouter dashboard for model status
Rate limiting:
- OpenRouter may have different rate limits than direct APIs
- Check for rate limit error messages in the logs
Document Processing Issues
LaTeX Processing Errors
Problem: Errors when processing LaTeX documents.
Solutions:
Verify LaTeX installation:
- Ensure your LaTeX distribution is properly installed
- Check if required packages are installed
- Run
tlmgr list --only-installed
(TeX Live) or check MiKTeX Package Manager
Document validation:
- Verify the document compiles correctly outside of TeXRA
- Fix any LaTeX errors in the original document
Package dependencies:
- Some LaTeX packages might be missing
- Install required packages using your LaTeX package manager
File path issues:
- Ensure file paths don't contain special characters
- Use relative paths within your workspace
TikZ Figure Extraction Problems
Problem: Issues with extracting or compiling TikZ figures.
Solutions:
TikZ package installation:
- Verify TikZ and PGF packages are installed
- Check for other required TikZ libraries
Template configuration:
- Customize the TikZ template in settings to include necessary packages:
json"texra.latex.tikzTemplate": "\\documentclass[tikz,border=10pt]{standalone}\n\\usepackage{tikz}\n..."
Path configuration:
- Set the correct TikZ input directory:
json"texra.latex.tikzInputDirectory": "/path/to/tikz/inputs"
Compilation errors:
- Check build logs for specific error messages
- Simplify complex TikZ figures that might exceed compiler limits
Image Processing Issues
Problem: Errors related to image or PDF processing.
Solutions:
GraphicsMagick/ImageMagick:
- Verify installation with
gm version
orconvert -version
- Reinstall if necessary
- Verify installation with
Ghostscript:
- Check installation with
gs --version
- Ensure compatible version (9.52 recommended for Windows)
- Check installation with
Permission issues:
- Ensure write permissions in output directories
- Check temporary directory permissions
Format compatibility:
- Some image formats might not be supported
- Convert images to PNG or JPG for better compatibility
AI Model Issues
Model Response Errors
Problem: Errors when getting responses from AI models.
Solutions:
Check API quotas and limits:
- Verify you haven't exceeded usage limits
- Check billing status for your API account
Response timeout:
- For large documents, the model might timeout
- Try breaking down the task into smaller chunks
- Enable streaming for long responses:
json"texra.model.useStreaming": true
Context length:
- Documents might exceed the model's context window
- Use models with larger context windows for big documents
- Split large documents into smaller parts
Model-specific issues:
- Some models might have specific limitations
- Check if the task is appropriate for the selected model
- Try a different model for your task
Quality Issues
Problem: Low-quality or unexpected outputs from AI models.
Solutions:
Improve instructions:
- Be more specific in your instructions
- Provide clear examples of desired outputs
- Specify what should and shouldn't be changed
Enable reflection:
- Turn on the "Reflect" option to allow the model to review its work
- This often improves output quality significantly
Use better models:
- Upgrade to more capable models for complex tasks
- Try Claude 3 Opus or GPT-4o for highest quality
- Match the model to your specific task
Reference materials:
- Provide better reference files to guide the model
- Include examples of desired style and formatting
Interface Issues
File Selection Issues
Problem: Problems with selecting or managing files in TeXRA.
Solutions:
Workspace configuration:
- Ensure you're working within a VS Code workspace
- Open a folder rather than individual files
File path issues:
- Avoid very long file paths or special characters
- Use relative paths within the workspace
File list not updating:
- Click the refresh icon next to the file type
- Restart VS Code if file lists remain outdated
- Check file extension settings to ensure your files are included:
json"texra.files.included.inputExtensions": [".txt", ".tex", ".md"]
Multiple file selection issues:
- Verify the multiple selection panel is expanded
- Try adding files one by one instead of in bulk
- Check the browser console for any JavaScript errors
Output File Issues
Missing Output Files
Problem: Output files are not generated or cannot be found.
Solutions:
Check file paths:
- Verify where TeXRA is saving output files
- Look in the same directory as the input file
- Check the ProgressBoard log for file paths
Permission issues:
- Ensure you have write permissions in the output directory
- Try running VS Code with administrator/sudo privileges
Naming conflicts:
- Check if output files exist but with unexpected names
- Look for files with pattern:
original_filename_agent_r0_model.extension
Process interruption:
- The AI process might have been interrupted before completion
- Check the ProgressBoard for error messages or signs of interruption
Output File Corruption
Problem: Generated output files are incomplete or corrupted.
Solutions:
Incomplete generation:
- Check if the AI reached the token limit
- Enable streaming for more reliable completion:
json"texra.model.useStreaming": true
XML parsing issues:
- TeXRA uses XML to structure its output (e.g.,
<document>...</document>
). - Malformed XML (e.g., missing closing tags like
</document>
) generated by the LLM can cause extraction failures. - Solution: Check the raw output file (e.g.,
*_r0_*.xml
) for XML structure problems. Manually add missing closing tags or fix other structural errors, then re-run any necessary processing or manually extract the content.
- TeXRA uses XML to structure its output (e.g.,
Encoding problems:
- Ensure consistent text encoding (UTF-8 recommended)
- Check for special characters that might cause issues
File size limits:
- Very large outputs might be truncated
- Break down large tasks into smaller parts
Performance Issues
Slow Response Times
Problem: TeXRA operations take too long to complete.
Solutions:
- Model selection:
- Faster models: Gemini Flash, Claude Haiku, GPT-4o Mini
- Match model to task complexity
- Reserve powerful models for tasks that need them
- Document size:
- Large documents take longer to process
- Break down large documents into smaller chunks
- Use only essential context files
- Network issues:
- Check your internet connection speed
- API requests might be delayed by network issues
LaTeX Diff Issues
Diff Generation Failures
Problem: LaTeX diff fails to generate or produces errors.
Solutions:
LaTeX compatibility:
- Ensure both documents use compatible LaTeX commands
- Some complex LaTeX constructs might cause diff issues
- Simplify documents if necessary
latexdiff installation:
- Verify latexdiff is installed:
latexdiff --version
- Install or update if needed:
bash# Perl installation cpan Algorithm::Diff cpan Latexdiff
- Verify latexdiff is installed:
File encoding:
- Ensure consistent encoding across files (UTF-8 recommended)
- Check for special characters that might cause issues
Document validation:
- Verify both documents compile correctly independently
- Fix any LaTeX errors before attempting diff
Diff Visualization Problems
Problem: LaTeX diff output is difficult to read or doesn't show changes correctly.
Solutions:
- LaTeX style conflicts:
- Custom document classes might conflict with diff markup
- Try simplifying the preamble for diff documents
- Complex changes:
- Very large or complex changes might not display well
- Break down the diff into smaller sections
- Consider using the intelligent merge feature instead
Integration Issues
VS Code Integration Problems
Problem: Issues with TeXRA's integration with VS Code features.
Solutions:
- Extension conflicts:
- Disable other LaTeX extensions temporarily
- Enable one by one to identify conflicts
- Version incompatibility:
- Update VS Code to the latest version
- Ensure TeXRA is up to date
- Check the minimum VS Code version requirement
LaTeX Workshop Integration
Problem: Conflicts or issues with LaTeX Workshop extension.
Solutions:
- Output directory conflicts:
- Configure consistent output directories:
json"latex-workshop.latex.outDir": "%DIR%/build", "texra.files.ignored.directories": ["build"]
Debugging Tips
Using ProgressBoard
The ProgressBoard is your main debugging tool. See the ProgressBoard Guide for a full explanation of its features.
Key points for troubleshooting:
Access ProgressBoard:
- Look for "TeXRA ProgressBoard" in the panel at the bottom of VS Code
- If not visible, open it via the Command Palette: "TeXRA: Show ProgressBoard"
Interpreting logs:
- Green entries: Information and successful operations
- Yellow entries: Warnings that might affect performance
- Red entries: Errors that need attention
Finding specific information:
- Use the search function to find relevant messages
- Look for task IDs to track specific operations
- Expand nested entries to see detailed information
Sharing logs for support:
- Copy relevant sections from the ProgressBoard
- Include them when reporting issues on GitHub
Getting Support
If you can't resolve an issue using this guide:
Check GitHub issues:
- Search existing issues on the TeXRA repository
- Look for similar problems and solutions
Report new issues:
- Provide detailed information about your environment
- Include steps to reproduce the problem
- Attach relevant log excerpts from ProgressBoard
- Mention your OS, VS Code version, and TeXRA version
Temporary workarounds:
- Try alternative workflows while waiting for a solution
- Use different models or agents that might work better
- Consider splitting complex tasks into simpler ones
Next Steps
If you've resolved your issue or want to learn more about TeXRA:
- Best Practices - Learn how to use TeXRA effectively
- Configuration - Customize TeXRA for your needs
- Agent Reference - Explore the different agents available