Configuration
TeXRA provides extensive configuration options that allow you to customize its behavior to match your workflow (don't worry, the defaults are sensible!). This guide explains the available settings and how to adjust them for optimal performance.
Accessing Configuration
You can configure TeXRA through VS Code's settings:
- Open VS Code Settings (File > Preferences > Settings or
Ctrl+,
) - Search for "TeXRA" to see all available settings
- Adjust settings in the UI or edit the JSON directly
Core Configuration Options
Agent Configuration
Control which agents are available in the dropdown menu. Below is the default list:
"texra.agents": [
"correct",
"derive",
"polish",
"draw",
"ocr",
"paper2cover",
"paper2slide",
"paper2poster",
"paper2note",
"polish_cover",
"solve_qi",
"transcribe_audio"
// Additional custom agents can be added here
]
Model Configuration
Define which AI models appear in the model selection dropdown. The default list is:
"texra.models": [
"sonnet37T",
"sonnet37",
"sonnet35",
"opus",
"o3-",
"o1",
"o1-",
"gpt45",
"gpt4o",
"gpt4ol",
"gemini25p",
"gemini25f",
"gemini2p",
"gemini2f",
"gemini2fT",
"DSV3",
"DSR1",
"grok3",
"grok3-"
]
API Provider Settings
Configure how TeXRA connects to AI model providers:
"texra.model.useOpenRouter": false,
"texra.model.useStreaming": false,
"texra.model.useStreamingAnthropicReasoning": false,
"texra.model.useStreamingOpenAIReasoning": false
useOpenRouter
: Access models through OpenRouter instead of direct APIsuseStreaming
: Enable streaming responses for better handling of long outputsuseStreamingAnthropicReasoning
: Enable streaming specifically for Anthropic reasoning modelsuseStreamingOpenAIReasoning
: Enable streaming specifically for OpenAI reasoning models
File Management Configuration
File Extensions
Control which file types TeXRA includes:
"texra.files.included.inputExtensions": [
".txt",
".tex",
".md"
],
"texra.files.included.mediaExtensions": [
".png",
".pdf",
".jpeg",
".jpg",
".svg",
],
Ignored Directories
Control which directories TeXRA ignores:
"texra.files.ignored.directories": [
"build",
"node_modules",
"__pycache__",
"figures",
"figs",
"versions",
"history",
"venv"
],
"texra.files.ignored.fileExtensions": [
".pdf",
".bst",
".bib",
".json",
".py",
".ipynb",
".png",
".vsix",
".ts",
".js"
],
"texra.files.ignored.inputFiles": [
"command.tex",
"preamble.tex"
],
"texra.files.ignored.keywords": [
"Makefile",
"template",
"_log",
"_thinking",
"_diff",
"diff",
"draw",
"versions",
"history"
]
LaTeX Configuration
LaTeX Indentation
Configure LaTeX indentation behavior:
"texra.latex.latexindentConfig": "/path/to/latexindent.yaml"
This setting points to a configuration file for latexindent
, which controls how LaTeX files are formatted.
TikZ Figure Processing
Configure how TikZ figures are extracted and compiled:
"texra.latex.tikzInputDirectory": "/path/to/tikz/inputs",
"texra.latex.includeWorkspaceInTexinputs": true,
"texra.latex.tikzTemplate": "\\documentclass[tikz,border=10pt]{standalone}\n\\usepackage{tikz}\n\\usepackage{pgfplots}\n\\usetikzlibrary{positioning}\n\\usetikzlibrary{patterns}\n\\usetikzlibrary{arrows.meta, shapes.geometric, matrix, calc, decorations.pathreplacing}\n\\usetikzlibrary{shapes, arrows}\n\n\\begin{document}\n{{ tikzpicture }}\n\\end{document}"
tikzInputDirectory
: Additional directories to include in the TEXINPUTS path when compiling TikZ figuresincludeWorkspaceInTexinputs
: Whether to include the workspace root in TEXINPUTStikzTemplate
: The template used for generating standalone TikZ documents
Execution Configuration
Control agent execution behavior:
"texra.agent.pauseForConfirmation": false
When set to true
, TeXRA will pause for confirmation after each agent, even when reflection is enabled.
Git Integration
Configure Git integration features:
"texra.git.numberOfCommitsToShow": 20
This setting controls how many recent commits are shown in the commit selection dropdown for LaTeX diff operations.
Explorer Configuration
Configure the folder explorer view:
"texra.explorer.agentsDirectory": "/path/to/custom/agents"
This setting specifies a custom root path for the TeXRA file explorer view, which can be absolute or relative to the workspace root.
Logger Configuration
Control logging behavior:
"texra.logger.verboseOutput": false,
"texra.debug.saveMessageObjects": false
verboseOutput
: Show detailed debug messages in the logger viewsaveMessageObjects
: Save message JSON objects to files before API calls (for debugging)
Environment-Specific Configuration
Workspace vs. User Settings
You can configure TeXRA at different levels:
- User Settings: Apply to all workspaces (set in VS Code's user settings)
- Workspace Settings: Apply only to the current workspace (set in
.vscode/settings.json
)
For project-specific configurations, use workspace settings:
// .vscode/settings.json
{
"texra.files.included.inputExtensions": [".tex", ".md", ".txt"],
"texra.latex.tikzInputDirectory": "${workspaceFolder}/styles"
}
For personal preferences that apply to all projects, use user settings.
OS-Specific Configuration
Some settings may need adjustment based on your operating system:
Windows
For Windows, use backslashes or escaped forward slashes in paths:
"texra.latex.tikzInputDirectory": "C:\\Users\\Username\\Documents\\LaTeX\\tikz"
macOS and Linux
For macOS and Linux, use forward slashes:
"texra.latex.tikzInputDirectory": "/Users/username/Documents/LaTeX/tikz"
Creating Custom Profiles
While TeXRA doesn't have built-in profile support, you can create multiple configuration sets using VS Code's settings profiles:
- Create different VS Code profiles for different types of projects
- Configure TeXRA differently in each profile
- Switch between profiles based on your current task
Configuration Best Practices
Optimizing for Performance
For better performance:
"texra.model.useStreaming": true,
"texra.files.ignored.directories": ["build", "node_modules", "versions", "history"],
"texra.logger.verboseOutput": false
Optimizing for Quality
For highest quality results:
"texra.model.useStreamingAnthropicReasoning": true,
"texra.model.useStreamingOpenAIReasoning": true
Optimizing for Collaboration
For team collaboration:
"texra.git.numberOfCommitsToShow": 30,
"texra.latex.latexindentConfig": "${workspaceFolder}/.latexindent.yaml"
Use workspace settings to ensure consistent configuration across the team.
Advanced Configuration
Manual Settings File Editing
For advanced configurations, you can directly edit the VS Code settings JSON:
- Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS)
- Run "Preferences: Open User Settings (JSON)"
- Add or modify TeXRA settings
Command-Specific Configuration
Some TeXRA commands can be configured through their own settings:
"texra.setApiKey": {
"defaultProvider": "anthropic"
},
"texra.cleanOutput": {
"confirmBeforeDeleting": true
}
Cross-Extension Compatibility
Configure TeXRA to work well with other extensions:
// LaTeX Workshop compatibility
"latex-workshop.latex.outDir": "%DIR%/build",
"texra.files.ignored.directories": ["build"],
// Git extensions compatibility
"git.enableSmartCommit": true,
"texra.git.numberOfCommitsToShow": 20
Troubleshooting Configuration
If you encounter configuration issues:
- Reset to Defaults: Clear custom settings to return to defaults
- Check Syntax: Ensure your JSON settings are correctly formatted
- Reload Window: Use "Developer: Reload Window" from the Command Palette
- Check Logs: Look for configuration-related errors in the ProgressBoard
Common configuration issues include:
- Incorrect file paths (especially across operating systems)
- JSON syntax errors in settings files
- Conflicting settings between user and workspace levels
- Missing required dependencies for configured features
Next Steps
Now that you understand how to configure TeXRA, you might want to explore:
- Custom Agents - Learn how to create your own specialized agents
- Best Practices - Discover recommended settings for different workflows
- Troubleshooting - Resolve common configuration issues