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.

_images/latex-multifile.png

Spellcheck

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:

_images/latex-spellcheck123.jpg

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:

_images/latex-word-count.png

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.

Encoding

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 defintions are the preferred choices:

  • PDFLaTeX:

    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{lmodern}
    
  • XeLaTeX or LuaTeX:

    \usepackage{fontspec}
    

The default template already selects the correct configuration for you.