LaTeX editor features

LaTeX Multi-File Support

CoCalc’s support for multi-file documents is now available. Here’s a summary of features:

  • The user interface is initially identical to the current single-file interface.
  • If you explicitly input other files, then build, there is a new menu on the top of a text editor that lets you select from any of the subfiles.
  • If you double click on the pdf on some latex generated by a subfile, then that file is automatically opened.
  • Errors and warnings have links that, when clicked, may open a subfile.
  • Forward search from subfiles works as it should.
  • Saving a subfile saves all files and kicks off a build.

See the section LaTeX/Modular Documents in the WikiBooks LaTeX book for a helpful introduction to working with multiple files in LaTeX.



Spell checking during LaTeX editing is available for several languages. You can enable/disable Spellcheck and change the language for a particular file by opening the Settings frame as shown:


You can use your browser’s spell checking for the document if you prefer. Choose “Browser (your browser’s spell check)”. You can find out more about browser spell checking here. In many browsers, a misspelled word is indicated by a colored underline, and control-clicking the underlined word will bring up a menu of suggested spellings.

Note that the Spellcheck feature is also available in Markdown and HTML editors.

Word count

CoCalc can show you current word count statistics generated by texcount. In order to see them, change one of the frames or created a new one in the Frame editor. Select “Word Count” as shown below:


LaTeX Engines

  • latexmk + PDFlatex: the default configuration, works in most cases
  • latexmk + XeLaTeX: this is useful for foreign languages with many special characters.
  • latexmk + LuaTex: uses the LuaLaTeX engine.


UTF8: the build process runs in a Linux environment. All edited documents are assumed to be encoded as UTF-8. Therefore, depending if you compile via PDFLaTeX or XeLaTeX, the following encoding definitions are the preferred choices:

  • PDFLaTeX:

  • XeLaTeX or LuaTeX:


The default template already selects the correct configuration for you.