SandHouse
Articles and contents

Help / Spaces

LaTeX

A LaTeX space is for papers, theses and reports written in LaTeX. Everyone on the board can type in the same files at once, and the compiled PDF sits beside them, Overleaf style.

Start a document

Open the space and choose New document. It opens straight away as "Untitled document", with a short article in main.tex, ready to compile. To rename it, click its title at the top of the document, or choose ⋯ → Rename next to it in the space's list. That menu can also copy a link to it or move it to the trash. A document is a small project of files: the main .tex file, chapters, a .bib, figures, and a journal's .cls or .sty if it needs one.

The page has three parts:

  • Files, on the left. + adds a file; type a path like chapters/intro.tex to put it in a folder. The upload button adds pictures (PNG, JPEG, PDF), fonts and other files. A file's ⋯ menu can rename or move it, download it, or delete it. The file marked main is the one that's compiled; choose Compile this one on another .tex file to change that.
  • The editor, in the middle, with LaTeX colouring. Typing \cite{ offers the references in the space's library, \ref{ offers the labels in the file, and \begin{ offers environments (and closes them for you). Point at a citation key to see what it refers to.
  • The PDF, on the right.

Compile

Choose Compile, or press Ctrl+S (Cmd+S on a Mac). The PDF updates in place and keeps your place in it. Use −, + and the fit button to zoom.

Under the PDF is what the compile said: errors in red, then warnings. Click one to go to its file and line; the editor underlines the same lines. Show the log shows TeX's whole log. Layout notes (overfull and underfull boxes) are counted but not listed.

Documents are compiled with XeTeX (Tectonic), with BibTeX and the usual journal classes (revtex4-2, acmart, elsarticle, IEEEtran, llncs, AASTeX and more). A template that only works with pdfLaTeX may need small changes.

References

Each LaTeX space has one library of references, shared by all of its documents. Open it with References at the top of the space, or from a document's ⋯ menu.

  • Type a DOI (10.1038/nature14539), an arXiv id (1706.03762) or words from a title, and choose Find. Choose Add next to the right one.
  • Or choose Paste BibTeX and paste one entry or several.

Each reference gets a key like vaswani2017attention; the copy button next to it copies \cite{…} to paste into the text. When you compile, the library is the file references.bib, so a document cites it with:

\bibliographystyle{plain}
\bibliography{references}

A new document already has these lines. If a document has its own references.bib file, that file is used instead.

Writing together

Everyone with the document open sees each other's typing within a moment, and nobody's typing is lost or saved over. Others' changes show as soon as you pause. Anyone who can edit the board's spaces can compile, and everyone with the document open sees the new PDF.

Viewers can read the files and the PDF but not change them. LaTeX spaces can't be made public.

Type /link or /embed in a page to point at a LaTeX document. An embed shows its abstract (or its first words) and whether it has a PDF.

Ask an assistant

An assistant connected to the board (see Connect an AI assistant) can read and write a document's files, compile it and read the errors, and find and add references, as you could. What it writes merges with what people are typing.