How compilation works
When you click the Compile button:Document sent to server
Your current LaTeX code is sent to the Typeset compilation API endpoint (
/api/compile).Tectonic processes the file
The server runs Tectonic with your document, downloading any required LaTeX packages automatically.
Tectonic automatically downloads LaTeX packages from the internet as needed. You don’t need to manage package installations.
Compiling your document
Desktop interface
On desktop, the interface shows three panels:- Chat panel (left) - AI assistant
- Editor panel (center) - Your LaTeX code
- Preview panel (right) - PDF output
- Play icon when ready to compile
- Spinning loader while compiling
- “Compile” label for clarity
Mobile interface
On mobile, the interface uses tabs:- Chat tab - AI assistant
- Editor tab - Your LaTeX code
- Preview tab - PDF output
Understanding the preview
Successful compilation
When compilation succeeds:- The PDF renders in the preview panel
- You can scroll through pages
- Zoom controls let you adjust the view
- The PDF updates each time you compile
The preview displays the most recent compilation. Previous versions are not saved automatically.
Before first compilation
The preview panel shows a placeholder state:- File icon
- “Preview your document here” heading
- “Compile to see the output PDF” message
Handling compilation errors
If your LaTeX code has errors, compilation fails and the preview panel shows:- Alert box with a red warning icon
- “Compilation failed” title
- Error message with details from Tectonic
Common error types
- Syntax errors
- Missing packages
- Math errors
- File errors
Missing braces, unclosed environments, or invalid commands.Example:Fix: Check the line number (l.10) and correct the command.
Debugging compilation errors
Read the error message
The error message includes:
- The type of error
- The line number where it occurred
- Context about what went wrong
Locate the problem
Navigate to the line number mentioned in the error. Look at surrounding lines too—errors often appear after the actual problem.
Ask the AI
Copy the error message and paste it in the chat: “I’m getting this error: [paste error]. How do I fix it?”
The AI assistant is trained to understand LaTeX errors and can often suggest specific fixes based on the error message.
Compilation performance
Typical compile times
- Simple documents (few packages, short): 1-3 seconds
- Medium documents (multiple packages, several pages): 3-7 seconds
- Complex documents (many packages, images, references): 7-15 seconds
First compile
The first compilation of a document may take longer because:- Tectonic downloads required LaTeX packages
- Package caching happens on the server
- Subsequent compiles reuse cached packages and are faster
If compilation takes longer than expected, check your internet connection. Slow connections can delay package downloads.
Advanced features
Automatic package management
Tectonic automatically:- Detects
\usepackage{}commands in your document - Downloads packages from the internet as needed
- Caches packages for future compilations
- Handles package dependencies
Server-side execution
Compilation happens on Typeset’s servers:- No local setup - Works on any device with a browser
- Consistent environment - Same LaTeX version for all users
- Resource efficient - Doesn’t use your computer’s processing power
- Secure - Your document is processed in an isolated environment
Limitations
Unsupported features
Tectonic doesn’t support some advanced LaTeX features:- Shell escape - Commands that run shell scripts (
\write18) - External tools - Integration with tools like BibTeX is limited
- Custom fonts - Some font packages may not work
If you need features Tectonic doesn’t support, consider exporting your document and compiling locally with pdfLaTeX or XeLaTeX.
File size limits
Very large documents may:- Take longer to compile
- Timeout if compilation exceeds 30 seconds
- Produce large PDFs that load slowly
Best practices
Compile frequently
Compile after significant changes to catch errors early. Don’t wait until your document is complete.
Start simple
Begin with a minimal document and add packages gradually. This helps identify which package causes problems if compilation fails.
Check line numbers
Error messages include line numbers. Use them to quickly locate issues rather than searching manually.