TexMex


TexMex is a Visual Studio Code extension that provides live LaTeX preview functionality, similar to Overleaf, but integrated directly into your editor. It allows you to write, compile, and preview LaTeX documents in real-time.
Features
- Live Preview: See your LaTeX document rendered in real-time as you type
- PDF Download: Save your compiled documents as PDF files
- Automatic Updates: Preview updates automatically when you save or edit
- Error Handling: Clear error messages when compilation fails
- Customizable: Configure compiler path and update delay
Requirements
- Visual Studio Code version 1.85.0 or higher
- A LaTeX distribution installed locally (e.g., TeX Live, MiKTeX)
- Node.js and npm (for development)
Installation
- Open VS Code
- Press
Ctrl+Shift+X
(Windows/Linux) or Cmd+Shift+X
(macOS)
- Search for "TexMex"
- Click Install
Usage
Opening the Preview
- Open a
.tex
file
- Press
Ctrl+Shift+P
(Windows/Linux) or Cmd+Shift+P
(macOS)
- Type "TexMex: Open Live Preview" and press Enter
- The preview will open in a side panel
Downloading PDF
- With the preview open, click the "Download PDF" button in the top-right corner
- Choose where to save the PDF file
- The PDF will be saved to your chosen location
Configuration
You can customize TexMex through VS Code settings:
{
"texmex.latexPath": "pdflatex", // Path to your LaTeX compiler
"texmex.updateDelay": 1000 // Delay before preview updates (in milliseconds)
}
Development
Building from Source
Clone the repository:
git clone https://github.com/RahulChalla/texmex.git
cd texmex
Install dependencies:
npm install
Compile the extension:
npm run compile
Package the extension:
npx @vscode/vsce package
Available Scripts
npm run compile
: Compile the TypeScript code
npm run watch
: Watch for changes and recompile
npm run lint
: Run ESLint
npm run test
: Run tests
npm run clean
: Clean build artifacts
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add some amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Marketplace: https://marketplace.visualstudio.com/items?itemName=RahulChalla.texmex
Extension Management Hub: https://marketplace.visualstudio.com/manage/publishers/RahulChalla/extensions/texmex/hub
System Requirements
- Visual Studio Code version 1.85.0 or higher
- A LaTeX distribution installed locally (e.g., TeX Live, MiKTeX)
- Node.js and npm for extension development or local builds
Usage
- Open a
.tex
file in the editor.
- Open the Command Palette (
Ctrl+Shift+P
or Cmd+Shift+P
).
- Run the command TexMex: Open Live Preview. This will open a side panel with a rendered PDF view of your document.
- As you edit and save the
.tex
file, the preview will update automatically.
- To manually compile and save the PDF to your working directory, run TexMex: Save as PDF from the Command Palette.
Configuration Options
TexMex can be customized through the VS Code settings (.vscode/settings.json
or global settings):
"texmex.latexPath": "pdflatex",
"texmex.updateDelay": 1000