Working in Citet
The editor
The browser editor is a full-featured LaTeX writing environment. It understands LaTeX structure — commands, environments, citations, labels, and included files — and provides completion, navigation, and diagnostics for all of them.
Workspace views
The workspace is divided into up to four panes: the file tree, the source editor, the PDF viewer, and the review panel. Four built-in views arrange these for common workflows:
- →Editor
- files, source, and PDF side by side. The default.
- →Review
- files, source, and the comment thread panel. Use this when reading through or addressing review feedback.
- →Proofing
- source, PDF, and review threads. Good for cross-checking output against comments without the file tree in the way.
- →Focus
- source only. Hides everything else.
Switch views via the command palette (⌘K / Ctrl+K) → Load view.
The Advanced view lets you drag dividers and resize panes freely. Use Create view to open Advanced with every pane, arrange the workspace, then choose Save view to name it. Saved views are per-project and persist in the browser.
▶Advanced view storage
Advanced layouts and saved views are stored in browser state under citet:workspace-layout, scoped by project ID. They are not synced to the server — each browser keeps its own workspace arrangements. Clearing site data removes them.
The workspace is built on the dockview library. Pane sizes are stored as percentages, so the layout adapts when the window is resized. Minimum widths and heights are enforced per pane to keep the editor usable.
Command palette
Press ⌘K / Ctrl+K to open the command palette. Every project action is reachable from it without leaving the keyboard.
Project
- →Go to file
Ctrl+P - file switcher for the current project.
- →Compile project
Ctrl+S - triggers a PDF compile.
- →Open compile panel
- shows diagnostics, full log, and compile summary.
View
- →Load view
- switch to any built-in or saved view.
- →Create view
- open Advanced with every pane so you can arrange a new view.
- →Save view
- name a new view, or overwrite a previously saved view.
- →Edit view
- open a saved view in Advanced so you can change it.
- →Rename view / Delete view
- manage saved views.
Writing
- →Open citations
- opens the citation library sidebar.
- →Insert citation
- opens the citation picker at the cursor.
Administration
- →Project settings
- name, main file, compiler, backups.
- →Manage members
- invite collaborators and manage roles.
Autocompletion
The editor completes LaTeX constructs as you type. Completions trigger automatically; open them manually with Ctrl+Space.
- →Commands
- type
\for a list of LaTeX commands with short descriptions. Common commands include argument placeholders; pressTabto move between them. - →Environments
- type
\begin{to complete environment names. Accepting an entry inserts both\begin{...}and\end{...}. - →Citations
- type inside a
\cite{argument for entries from.bibfiles and linked Zotero libraries. Matches by key, author, title, or year. - →Labels
- type inside
\ref{,\eqref{, or\pageref{for labels defined anywhere in the project. - →File paths
- type inside
\includegraphics,\include,\input, or\bibliographyfor project file paths, filtered to the relevant types (images for\includegraphics,.bibfor\bibliography, etc.).
▶How completions are implemented
Completions are CodeMirror 6 completion sources in the @citet/lang-latex package. Each source inspects the Lezer syntax tree at the cursor position to decide whether to contribute suggestions.
The built-in command registry is a static list grouped by package with descriptions and optional argument snippet templates. Citation, label, and file completions pull live data from the document index, which stays in sync with Yjs edits.
File-path completions filter by extension per command: \includegraphics accepts .png .jpg .jpeg .pdf .eps .webp .gif; \include /\input accept .tex .ltx; \bibliography accepts .bib.
Hover tooltips
Hovering certain tokens shows a tooltip with more information:
- →Citation keys
- full reference: authors, year, title, and publication venue.
- →Labels
- the surrounding context of the label's definition.
- →Included files
- a preview of the file's content, or the image itself for graphics.
Hold ⌘ / Ctrl and click any of these to jump to the definition: the .bib entry, the \label command, or the included file.
Code folding
Click the fold arrow in the gutter to collapse large sections and keep the working area tidy. The following ranges can be folded:
- The preamble (everything before
\begin{document}) - Sections, subsections, and subsubsections (down to the next heading)
- Paragraphs and subparagraphs
- Comment blocks delimited with
% {and% }
Linting
The editor checks your source as you type and highlights issues inline before you compile. The following problems are detected:
- Missing
\begin{document} - Unmatched
\begin/\endpairs \refor\citekeys that do not appear in any label or bibliography file in the project- Duplicate
\labelkeys - Unclosed braces
- Citations with no corresponding
\bibliographycommand or.bibfile
Linting runs entirely in the browser — it does not require a compile and does not send the source to the server. It catches structural problems early; the LaTeX compiler may produce additional diagnostics on top of these.
▶Linting internals
The linter is a CodeMirror 6 lint source in packages/lang-latex. It walks the Lezer parse tree and emits diagnostics with source positions and severity levels (error, warning, note).
Each check is independently configurable via the extension config object:
checkMissingDocumentEnvcheckUnmatchedEnvironmentscheckMissingReferencescheckDuplicateLabelscheckUnclosedBracescheckCitesWithoutBibliography
All checks are enabled in the web editor. The VSCode and Neovim integrations consume the same @citet/lang-latex package and can enable a subset.
Search and replace
Ctrl+F— open the search bar. PressEnter/Shift+Enterto move between matches.Ctrl+H— open find and replace. Options: case-sensitive, regular expressions, whole-word.Escape— close the search bar and return focus to the editor.
Undo and redo
Ctrl+Z and Ctrl+Y undo and redo as in any editor. In a collaborative session, undo only reverses your own edits — it does not roll back changes made by other collaborators.
▶Collaborative undo
Undo and redo use the Yjs undo manager rather than CodeMirror's built-in history. The Yjs undo manager tracks which operations were produced by the local client and replays inverse operations in CRDT-aware order. Undoing past a point where another collaborator also edited may leave their edits intact while reverting your own.
Keyboard shortcuts
- →
⌘K/Ctrl+K - command palette
- →
Ctrl+S - compile project
- →
Ctrl+P - go to file
- →
Ctrl+F - find in editor
- →
Ctrl+H - find and replace
- →
Ctrl+Z/Ctrl+Y - undo / redo
- →
Ctrl+Space - open completions manually
- →
Tab - accept completion or advance through snippet placeholders
- →
Escape - close search bar or dismiss completions