An AI-native editor
for LaTeX.

Sundial is a collaborative LaTeX editor where the agent compiles, fixes errors before you see them, and checks your citations while you write — and every AI edit arrives as a reviewable suggestion. No compile timeouts, unlimited collaborators.

No card, no compile quota. Free forever for .edu addresses.

main.tex Edit Aa ···
% R2.1: quantify the speedup claim
\section{Results}\label{sec:results}
Our sparse decoder matches the dense
baseline within 0.2 points on all
four benchmarks \citep{tay2022}.
Decoding is substantially faster
on long inputs.
Decoding is 3.1x faster at 32k
tokens (Table~\ref{tab:speed}).
Claude Opus 5 Keep Undo ✓ Kept · in history
\begin{equation}\label{eq:score}
s_{ij} = q_i^\top k_j / \sqrt{d}
\end{equation}
where $d$ is the head dimension.
We ablate the distance bias
in Appendix~\ref{app:bias}. Priya
\begin{table}[t]
\centering
\caption{Decoding throughput by
context length.}
\label{tab:speed}
\begin{tabular}{lrr}
Sparse Attention Decoding for
Long-Context Transformers
Priya Raghavan   Jonas Weber   Mei Chen
Department of Computer Science
Abstract

Attention dominates the cost of long-context inference. We introduce a sparse decoding scheme that routes each query to a small, learned subset of keys, matching dense-attention quality on all four benchmarks we evaluate while decoding 3.1x faster at 32k tokens. The gain grows with context length and requires no retraining of the base model.

1  Introduction

Per-token decoding cost grows linearly in context length, and attention quickly dominates as contexts reach tens of thousands of tokens. Prior work prunes heads or compresses the KV cache, trading quality for speed. We instead learn a routing function over the scores

(1)sij = qikj / √d

which the decoder evaluates on a small routed subset of keys in place of the dense score matrix. Routing adds under 2% overhead and is trained jointly with a learned distance bias.

2  Related work

Efficient attention spans fixed sparse patterns, low-rank approximation, and cache eviction. Sliding-window and block-sparse layouts fix the pattern in advance, while eviction policies discard keys the model may later need. Learned routing instead adapts the pattern per query at decode time, keeping the full cache addressable.

1 / 9 Compiled · 1.9s
main.tex · 214 lines · Edited just now
Used by researchers at

LaTeX, without the friction.

Errors fix themselves while you type, completion knows your whole library, and a photo of a whiteboard becomes a table. Every build passes.

Never see a LaTeX error again.

The agent watches every build. When one breaks, it reads the compile log and fixes the error — live, usually before you notice it happened.

And no compile timeouts: a 40-minute thesis build is fine.

main.tex
39\section{Results}\label{sec:results}
40The decay rate follows the envelope
41\begin{equation}\label{eq:decay}
42 \Gamma(t) = \beta e^{-t/\tau}
43\end{equation}
44with $\tau$ the relaxation time, where
45$a_i$ denotes the weight of mode $i$.
watching · every build passingmain.tex · 96 lines

Citations and autocomplete, one keystroke.

Type \citep and search your whole library without leaving the line — Zotero synced, the BibTeX entry written for you. The same completion knows every command, environment, and label in your project.

Citations that don't exist get flagged before they compile.

related-work.tex
31Glacier retreat accelerated in the
32first decades of the century \citep{zemp2019}
Cite · searching your library Zotero
zemp2019 · Global glacier mass changes 2006–2016 · Zemp et al.
2hugonnet2021 · Accelerated global glacier mass loss · Hugonnet et al.
3marzeion2014 · Attribution of glacier mass change · Marzeion et al.
✓ zemp2019 added to refs.bib · synced from Zotero

From sketch to LaTeX.

Drop in a whiteboard photo, a table screenshot, or a hand-drawn figure. It comes back as clean LaTeX — compiled, checked, and reviewable as a suggestion.

Voice works too: dictate the change, review the diff.

results.tex
whiteboard.jpg · 2.1 MB
61\begin{table}[t]
62 \centering \caption{Ablation over routing depth.}
63 \begin{tabular}{lrr} \toprule
64 Depth & F1 & Latency \\ \midrule
65 2 & 81.4 & 12 ms \\
66 4 & 83.1 & 19 ms \\ \bottomrule
67 \end{tabular}
68\end{table}
✓ compiles · in the doc as a suggestion to review

Hand off a whole pass, then review it in one sweep.

Every AI edit is a signed, reviewable suggestion. Keep or undo, one by one or in batches; history records who wrote what, human or model, at edit granularity.

Inline diffs in the text, not a chat transcript to cross-reference.
Review a big pass in one sweep, filtered by author or by file.
Or leave a margin comment: @agent answers on the thread, with the revision as a suggestion.
Undo one edit from last Tuesday without touching anything else.
conclusion.tex
Claude Opus 5 made 2 suggestions in this file

Our method achieves significant improvements over strong baselines across a wide variety of settings improves macro-F1 by 2.4 points on all four benchmarks at equal parameter count. The gain holds across all three seeds.

Claude Opus 5 · made 1 claim precise

It is important to note that much further work will be needed to fully explore We leave to future work scaling past 7B parameters and multilingual pretraining.

Claude Opus 5 · cut 1 filler phrase
conclusion.tex · 96 lines · Edited now

An editor that checks your work.

Citations are read against the papers behind them, and your numbers stay consistent across files. Every finding arrives as a suggestion, and nothing changes without your say.

Does the source say what you say it says?

Every citation is read against the paper behind it. When a claim drifts past what its source supports, you hear about it first. And when a result changes, every file that repeats it — abstract, tables, conclusion — is flagged until they agree.

Reviewer 2 runs these checks. Now you run them first.

related-work.tex

Alpine glaciers have lost half their ice since 2000 (Zemp et al., 2019).

Citation check overclaims the source
Zemp et al. report a 17% volume loss for 2000 to 2014. Nothing in your library supports "half since 2000".
Zemp et al. 2019 · read from your Zotero library
reads the paper, not the abstract

A full editor, not a plugin.

The suggestion flow sits on top of a serious editor. The day you need any of this, it is already there.

Papers and code on a real computer.

LaTeX with live preview, Jupyter notebooks that run inside the document, Markdown for everything else — the agent compiles, executes, and fixes its own errors in a sandbox.

main.texcompiled ✓ 1.9s
analysis.ipynb14/14 cells pass
draft.mdlive · 3 editors

Unlimited collaborators, live.

Share a project with a private invite or a public link. Coauthors edit live, comment threads stay pinned to the text — and the free plan never caps seats.

youediting §4
Priya2 comments on the intro
Jonasreading the PDF

Claude Code and Codex join the doc.

Point your local agent at the workspace: same document, same signed suggestions, same review flow.

youediting intro
Claude Code3 suggestions in methods.md
Agentfixing citations

100+ models, swappable mid-chat.

Frontier or open source, pick per task. Review works the same no matter who writes.

✳ Claude Opus 5
GPT-5.5
Gemini 3 Pro
+ 100 more…

Overleaf charges for the parts you need most.

Overleaf Sundial
Collaborators on the free plan 1 per project Unlimited
Compile timeout on the free plan Seconds; longer costs $199+/yr None
AI assistance Paid add-on Included, free
When the build breaks You read the log The agent reads the log and fixes it
Track changes Paid plans only Every edit, attributed, forever
Coauthors who stay on Overleaf Everyone stays Two-way sync: they keep Overleaf, you get the agent
Jupyter notebooks Not supported Run inside the workspace
The Sundial agent mascot typing on a laptop

An editor you can hand real work to.

Bring your paper as-is. Two-way Overleaf and GitHub sync means your coauthors do not have to change anything.