Quick Start Guide
This guide will help you get up and running with TeXRA quickly. In just a few minutes, you'll be able to use AI to enhance your academic research in VS Code.
Overview
TeXRA integrates powerful AI capabilities directly into your writing workflow. Here's what you can do:
- Fix grammar and typos in academic documents
- Improve writing style and clarity
- Create or enhance technical figures
- Transform papers into different formats (lecture notes, slides, posters)
Set Up API Keys
Before you can use TeXRA's AI features, you need to provide API keys for the services you intend to use (like Anthropic, OpenAI, Google, etc.). TeXRA stores these keys securely using VS Code's secret storage.
- Open the Command Palette: Press
Ctrl+Shift+P
(orCmd+Shift+P
on macOS). - Run the Set API Key command: Type
TeXRA: Set API Key
and select the command. - Follow the prompts: Select the API provider (e.g., Anthropic, OpenAI) and enter your key when prompted.
Repeat this process for each AI provider you plan to use with TeXRA.
Basic Workflow
The typical TeXRA workflow consists of these steps:
- Select files to process (input, reference, auxiliary, figures)
- Choose the appropriate agent (correct, polish, draw, etc.)
- Select the AI model to use
- Provide specific instructions
- Execute the agent
- Review the generated output
Your First TeXRA Task
Let's go through an example to illustrate the basic workflow.
Step 1: Open a Document
- Open VS Code
- Navigate to the TeXRA panel in the sidebar (click the brain icon)
- Open or create a LaTeX document you'd like to improve
TIP
Make sure your document is part of a workspace (folder) for best results.
Step 2: Select Files
- In the TeXRA panel, click the "Current" button next to "Input" to set your active document as the input file
- (Optional) Add reference, auxiliary, or figure files if needed for your task
Multiple Files
For complex documents with multiple input files, use the "Multiple" dropdown to select additional files.
Step 3: Choose Agent and Model
- In the dropdown menus at the bottom of the instruction box, select:
- Agent:
polish
(for improving writing) - Model:
sonnet37
(Claude 3.7 Sonnet) or another available model
- Agent:
Step 4: Write Instructions
In the instruction text area, provide specific guidance for the AI. For example:
Improve the clarity and flow of this document. Focus on making the technical
explanations more accessible. Fix any grammatical issues or awkward phrasing.
Ensure consistent terminology throughout.
Effective Instructions
Be specific about what you want! Vague instructions are like asking a genie for "something cool" – results may vary wildly. Include what should change and what should remain the same.
Step 5: Configure Tools
- Click on the "Tool Config" dropdown
- Enable "Reflect" to allow the AI to review and improve its own work
- (Optional) Enable other tools as needed:
- "Attach TeX Count" to include document statistics
- "Print Input Prompt" to save the generated prompt for reference
Step 6: Execute the Agent
- Click the "Execute" button
- The ProgressBoard panel (typically at the bottom) will show the progress. See the ProgressBoard guide for more details on interpreting the logs.
- Wait for the process to complete - this may take a few moments depending on the document size and model choice
Step 7: Review Results
- When the agent completes, VS Code will open the generated output file (e.g.,
yourfile_polish_r0_model.tex
). - Review the changes made by the AI. Remember, it's smart, but hasn't passed its quals yet!
- You can compare the original and modified versions using:
- VS Code's Diff View: Right-click on the original and output files in the Explorer and select "Compare Selected" for a side-by-side source code comparison.
- TeXRA's LaTeXdiff feature: Use the LaTeXdiffs section in the TeXRA panel for a compiled, visual comparison (see the LaTeX Diff guide).
Common Quick Tasks
Here are some common tasks you can try with TeXRA:
Fixing Grammar and Typos
- Agent:
correct
- Model:
gemini25p
orgpt41
- Instruction: "Fix grammatical errors and typos without changing the content or technical terminology."
Creating a TikZ Figure
- Agent:
draw
- Model:
sonnet37T
oro3-mini
- Instruction: "Create a TikZ figure showing a workflow diagram with three main steps: data collection, processing, and analysis. Use arrows to show the data flow between steps."
Converting a Paper to Slides
- Agent:
paper2slide
- Model:
sonnet37T
orgpt41
- Instruction: "Convert this paper into presentation slides using the beamer template. Create approximately 12-15 slides highlighting the key points, methodology, and results."
Improving Writing Style
- Agent:
polish
- Model:
opus
orsonnet37T
- Instruction: "Improve the writing style to make it more engaging and clear. Enhance the flow between paragraphs while preserving all technical content."
Understanding the Output
When TeXRA completes a task, it produces:
- Output File: The main result with the requested changes
- Log Files: Detailed information about the process
- Diff Files: Visual comparison between original and modified versions (if applicable)
Output files are saved in the same directory as your input file with a naming pattern: original_filename_agent_r0_model.extension
For example, if your input file is paper.tex
and you used the polish
agent with sonnet37
model, the output file would be named: paper_polish_r0_sonnet37.tex
Next Steps
Now that you've completed your first task with TeXRA, you can:
- Explore more built-in agents for specialized tasks
- Learn about LaTeX diff for comparing document versions
- Discover how to use intelligent merge for combining changes
- Optimize your workflow with custom configuration
For any issues or questions, refer to the troubleshooting section or check the GitHub repository.