LaTeX Editor

Write and compile LaTeX documents with live PDF preview, SyncTeX, dependency management, and AI-powered quick actions.

Omnilib's LaTeX Editor lets you write and compile LaTeX documents using the Tectonic engine. See your PDF output instantly with live preview, structured error reporting, and SyncTeX navigation between source and output.

Overview

The LaTeX Editor provides:

  • Tectonic compilation — Fast, reliable LaTeX compilation with automatic package management
  • Web compilation — Tectonic runs server-side in the web app; no local TeX installation needed
  • Live PDF preview — See results immediately after each compile
  • SyncTeX — Click-to-jump between source lines and PDF positions
  • Structured logs — Parse errors and warnings clearly
  • Review comments — Overleaf-style threaded comments on source lines
  • AI quick actions — Grammar check and paper review from the editor toolbar
  • Resizable panels — Adjust preview and log sizes

Getting Started

Opening a LaTeX File

Click any .tex file in the sidebar. The editor opens with:

  • Source editor on the left
  • PDF preview on the right

Your First Compilation

  1. Write or edit your LaTeX document.
  2. Click Compile in the toolbar, or press Cmd+Enter (Windows: Ctrl+Enter).
  3. Watch the PDF appear in the preview pane.

Writing LaTeX

Basic Document

\documentclass{article}
\begin{document}

\title{My Document}
\author{Your Name}
\maketitle

\section{Introduction}
This is my first LaTeX document in Omnilib.

\end{document}

Common Packages

\usepackage{amsmath}    % Mathematical symbols
\usepackage{graphicx}   % Images
\usepackage{hyperref}   % Hyperlinks
\usepackage{listings}   % Code listings
\usepackage{biblatex}   % Bibliography

Compilation

Compiling Your Document

Click Compile or use Cmd+Enter (Windows: Ctrl+Enter). The status indicator shows:

StatusMeaning
IdleReady to compile
CompilingBuild in progress
SuccessPDF generated successfully
ErrorCompilation failed

The toolbar shows the time since the last compile to help you track freshness.

Web Compilation

Web only. Web compilation runs Tectonic server-side at web.omnilib.ai.

On the web app, clicking Compile sends your source to the Omnilib server, which runs Tectonic and returns the compiled PDF. No local TeX installation is required. Compilation speed is similar to the desktop app.

Desktop only. On the desktop app, Tectonic runs locally for full offline support.

SyncTeX

SyncTeX links your source code positions to locations in the compiled PDF.

  • Source → PDF: Click in the source editor, then click Sync to PDF in the toolbar (or press Cmd+Click (Windows: Ctrl+Click) on a source line). The PDF scrolls to the corresponding position.
  • PDF → Source: Click in the PDF preview while holding Cmd (Windows: Ctrl). The source editor jumps to the corresponding line.

SyncTeX data is generated during compilation. If the PDF is out of date, recompile first.

Dependency Manager

When you add a \usepackage{} command, Tectonic downloads and caches the required package automatically on the next compile:

  • First compile with a new package may take a few extra seconds while the package downloads.
  • Packages are cached locally (desktop) or on the server (web) after the first download.
  • No manual tlmgr install or TeX Live management is needed.

If a package cannot be found or installed, an error appears in the log with the package name.

LaTeX Quick Actions

The floating quick actions bar appears when you select text in the LaTeX editor. In addition to standard selection actions, it includes:

ActionWhat it does
Grammar checkChecks the selected prose for grammar and style issues
Paper reviewAI reviews the selected section for clarity, structure, and academic tone

These actions work on the LaTeX source text and are aware of LaTeX commands — they focus on the prose content, not the markup.

AI Agent Compilation

The AI agent can compile your document and iterate on errors autonomously using the latex.compile tool:

"Compile my document and fix any errors."

The agent compiles, reads the error log, makes targeted edits to fix the issues, and recompiles until the build succeeds or the errors require your input.

Review Comments

Add threaded review comments to any line in your LaTeX source:

  • Press Cmd+Shift+M (Windows: Ctrl+Shift+M) to open a comment on the current line.
  • Select text and click Comment in the selection toolbar.

See Review Comments for the full workflow including suggested edits, @mentions, and resolution.

PDF Preview

The preview pane shows your compiled output. Scroll through pages, zoom in and out, and use SyncTeX to jump between source and output.

Drag the divider between the editor and preview to allocate more space to either side.

Compilation Logs

Below the preview, the log viewer shows:

  • Errors — Red, critical issues to fix
  • Warnings — Yellow, potential problems
  • Info — Blue, informational messages

Toggle between Parsed (structured and readable) and Raw (full Tectonic output) views. Click a log entry to navigate to the referenced line in the source editor. Collapse the log panel to maximize the preview pane.

Common LaTeX Tasks

Adding Images

\usepackage{graphicx}

\begin{figure}[h]
  \centering
  \includegraphics[width=0.8\textwidth]{image.png}
  \caption{My figure caption}
  \label{fig:myimage}
\end{figure}

Mathematical Equations

\usepackage{amsmath}

% Inline math
The equation $E = mc^2$ is famous.

% Display math
\begin{equation}
  \int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
\end{equation}

Citations and Bibliography

\usepackage{biblatex}
\addbibresource{references.bib}

According to \cite{author2023}...

\printbibliography

\cite{} autocomplete reads from all .bib files in your project. See Bibliography System for managing references.

Troubleshooting

PDF Not Updating

  • Click Compile to regenerate.
  • Check for compilation errors in the log.
  • Ensure the .tex file is saved.

Compilation Fails

  • Read the error messages in the log.
  • Check LaTeX syntax.
  • Look for missing or misspelled packages.
  • Verify file paths for images and .bib files.

Missing Packages

Tectonic handles this automatically. If a package fails to download:

  • Check your internet connection.
  • Retry compilation.
  • Ensure the package name is spelled correctly in \usepackage{}.

SyncTeX Not Working

  • Recompile the document to regenerate SyncTeX data.
  • Ensure you are using Cmd+Click in the PDF pane, not a regular click.