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 current default list is maintained in the Models Guide. Override it by specifying your own model identifiers:
"texra.models": ["sonnet37T", "gpt5"]
API Provider Settings
Configure how TeXRA connects to AI model providers:
"texra.model.useOpenRouter": false,
"texra.model.useImprovedConnection": false,
"texra.model.improvedConnectionDomain": "",
"texra.model.baseUrlDeepSeek": "",
"texra.model.useStreaming": false,
"texra.model.useStreamingAnthropicReasoning": false,
"texra.model.useStreamingOpenAIReasoning": false
useOpenRouter
: Access models through OpenRouter instead of direct APIsuseImprovedConnection
: Route all API requests through a proxy serverimprovedConnectionDomain
: Custom proxy domain whenuseImprovedConnection
is enabled. Defaults to the built-in proxy when unset.- ⚠️ Security Warning: When using a proxy, ensure you trust the proxy server as it will receive your API keys. Only use proxies from trusted sources.
baseUrlDeepSeek
: Custom base URL for DeepSeek models; overrides the defaulthttps://api.deepseek.com
endpointuseStreaming
: Enable streaming responses for better handling of long outputsuseStreamingAnthropicReasoning
: Enable streaming specifically for Anthropic reasoning modelsuseStreamingOpenAIReasoning
: Enable streaming specifically for OpenAI reasoning modelsuseCopilot
: Use the Copilot language model through VS Code's Language Model API for instruction polishing and text connection
Provider | Proxy path | Supported |
---|---|---|
OpenAI | openai/v1 | ✅ Yes |
Anthropic | anthropic/v1 | ✅ Yes |
Gemini (Google) | generativelanguage/v1beta | ✅ Yes |
xAI | xai | ✅ Yes |
OpenRouter | openrouter | ✅ Yes |
Groq | groq/openai/v1 | ✅ Yes |
Perplexity | pplx | ✅ Yes |
Mistral | mistral | ✅ Yes |
DeepSeek | N/A | ❌ No |
Moonshot (Kimi) | N/A | ❌ No |
DashScope (Qwen) | N/A | ❌ No |
Note: Only the providers marked with ✅ are supported by the proxy. Other providers will use their direct API endpoints even when proxy is enabled.
Audio Settings
Specify a custom path to the SoX binary when automatic detection fails:
"texra.audio.soxPath": "C:\\Users\\thinking\\scoop\\apps\\sox\\current\\sox.exe"
If unset, TeXRA searches common install locations and your PATH
.
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 Formatting
Configure LaTeX formatting behavior:
"texra.latex.formatter": "none",
"texra.latex.showLatexindentWarning": false,
"texra.latex.latexindentConfig": "/path/to/latexindent.yaml",
"texra.latex.texfmtConfig": "/path/to/tex-fmt.toml"
formatter
: Choose betweenlatexindent
,tex-fmt
, ornone
to disable formatting.showLatexindentWarning
: Set tofalse
to suppress missinglatexindent
warnings.latexindentConfig
: Path to alatexindent
configuration file.texfmtConfig
: Path to atex-fmt
configuration file.
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 and must be an absolute path.
Logger Configuration
Control logging behavior:
"texra.logger.debugMode": false,
"texra.debug.saveDebugObjects": false
debugMode
: Show detailed debug messages in the logger viewsaveDebugObjects
: Save message and response objects to JSON files for debugging purposes (includes both API messages and raw responses)
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"],
"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.debugMode": 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"
"texra.latex.texfmtConfig": "${workspaceFolder}/tex-fmt.toml"
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:
// 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 may want to learn about:
- Custom Agents - Learn how to create your own specialized agents
- Best Practices - Discover recommended settings for different workflows
- Troubleshooting - Resolve common configuration issues
Agent Execution Settings (Webview Interface)
These settings, accessible directly in the main TeXRA webview, control how agents run:
Tool Configuration Dropdown ( ○ next to Instruction label):
- Reflect (): Enables CoT agents to critique/improve their output (adds round 1). Increases cost/time, potentially quality.
- Attach TeX Count (): Includes
texcount
output (word/header/math stats) in the agent's context. Requirestexcount
installed. - Use Prefill from Input (): Uses the input file content to prefill the instruction box (if agent supports it).
- Print Input Prompt (): Adds the full final prompt sent to the LLM to the ProgressBoard log (useful for debugging, increases log size).
Model/Agent Selection:
- Agent (): Select the agent (see Built-in / Custom).
- Model (): Select the language model (see Models).
Instruction Header Actions:
- Settings (): Open TeXRA extension settings.
- History (): Open Agent Execution History panel.
- Pack (): Archive current Agent/Model/Input outputs to
History
folder. - Clean (): Delete current Agent/Model/Input outputs.
- Magic Polish (): Use selected model to polish the instruction text.
- Erase Instruction (): Clear the instruction box.