SageMath, Inc.’s platform for collaborative computation, CoCalc, contains the most powerful online LaTeX editor available today.
Not only does it offer the full set of features expected from similar online services today for professionals and students on a par with and exceeding other leading products, such as Overleaf, but CoCalc offers a number of additional benefits.
This includes features such as a complete Course Management System for teaching, file system for sharing/performing research (whether that be scripts run by Terminal or Jupyter Notebooks), and even a Computational Whiteboard.
We now host publications such as the Journal of Fluid Mechanics by Cambridge University Press, which allows for interactive plot capabilities, and makes code-based scripts more accessible (and practical to use) for readers.
Here are a few examples of hosted texts on the CoCalc Share Server.
1. Python Data Science Handbook
2. Cambridge University Press Journal of Fluid Mechanics, Interactive 3D Plot
3. Cambridge University Press Journal of Fluid Mechanics, Script and Time Plot
Overview of Key CoCalc Features for Editing LaTeX.
CoCalc has true real-time collaboration with no limit on the number of simultaneous users. Each user can even customize the color of their cursor.
Note that if your network connection temporarily fails, you can continue editing as long as you want, and your changes will be merged into the live document when you reconnect.
Moreover, if the user creates multiple cursors using command or alt click, all cursors are visible to other users.
In addition, as with Google docs, CoCalc has a text chat (as well as video chat) on the side of each document. Improving on Google docs, you can include mathematical formulas in LaTeX and format using markdown in the side chat (which are beautifully rendered), and you can edit any past chat message.
Other collaborators are notified of messages via a bell in the upper right, similar to social media platforms like Instagram and Facebook.
CoCalc also has TeX-aware spell checking.
Editable chat beside file views.
Viewing Document History and Backups
First off, every edit (at 2-second resolution) is recorded and stored forever in our backend database. You can browse the history using the TimeTravel view, which includes a diff mode that shows exactly what changed between two points in time (and who made those changes). We are also fully integrated with GitHub, that way you can use Git via Terminal, and you can can access your favorite scripts via the Share Server with just a few clicks.
Edit history showing diff between two versions.
In addition, we store several hundred read-only snapshots of the complete filesystem state, which users can easily browse. This lets them recover older versions of files that might not have been edited via the graphical editor (e.g., vim or emacs via a terminal).
Accessing backups of a file.
Recent snapshots of project shown under backups.
You can use Git, Subversion, RSync, etc. on the command line to explicitly track all files or synchronize with a remote server such as GitHub.
No Local Software Needed, Use Anywhere
Furthermore, because CoCalc is a cloud service, there is no software to install locally, and projects are reachable from any device with an internet connection. Files can be exported online to .pdf and .docx format without the need for local installation of LaTeX software.
Advanced Editing Features
CoCalc fully supports processing even the most complicated imaginable LaTeX documents using custom build systems. We support several LaTeX engines – pdflatex, latexmk, and xelatex – with most packages pre-installed. Users can easily request additional packages (by clicking the help button), or install them themselves. The LaTeX build command is fully customizable, and can involve running arbitrary Linux programs, since we offer a full command line terminal environment. It is, for example, even possible to use GNU
make to orchestrate the full compilation via a
You can put anything you want in the command line such as in the image below:
Customizing build command to use XeLaTeX.
Also, our LaTeX editing environment comes with SageTeX pre-installed, which makes it easy to add the output of Python (and SageMath!) computations to any LaTeX document. No competitors offer running sophisticated mathematical software as part of the compilation process. This is very useful to people creating randomized homework, too.
Besides SageTeX, CoCalc supports embedding R code via knitr into LaTeX documents. This technique is very popular for generating documents with statistical and data science content.
Compiling an R Markdown File in CoCalc.
Our environment offers integrated Jupyter notebooks and Sage worksheets, with chat and TimeTravel as well. Jupyter notebooks are an excellent rich editor for creating certain types of LaTeX documents. For example, many books and papers have been written entirely in Jupyter notebooks, then published both to the web and exported (via
nbconvert) as LaTeX documents. The two images below show use of LaTeX in Sage worksheets. Cells can be started with
%latex to typeset their contents using LaTeX.
Sage worksheet with LaTeX in markdown and symbolic expressions, with units of measure.
Sage worksheet with symbolic expression and calculation in R.
Additionally, we provide a Docker image so that users who need an offline version of CoCalc in which to use LaTeX (e.g., on an flight) can easily do so.
Editor User Interface
CoCalc fully supports online preview, even for documents that are 150 or more pages. It progressively refines the resolution of the preview images and nearby pages.
Preview supports inverse search, which means that by double-clicking on an area on a preview page, the cursor in the input area jumps to the corresponding location. Similarly, you can jump from a point in the text editor to the corresponding point in the preview.
Fun Fact: CoCalc Founder and CEO wrote his book “Prime Numbers and the Riemann Hypothesis”, published by Cambridge University Press, entirely using CoCalc.
Forward search in LaTeX edit window.
Inverse search in LaTeX edit window.
We have a full-featured text editor for LaTeX documents. Like a coding IDE, it has horizontal and vertical split view. This lets you look at two points in the LaTeX document simultaneously. Also, we wrote a code folding mode (see https://github.com/codemirror/CodeMirror/pull/4498), so one can easily toggle display of sections, subsections, etc. We support Emacs, Vim, and Sublime keybindings, and many color schemes.
We have a side-by-side Markdown (and HTML) editor with real time preview, which fully supports LaTeX formulas.
Jupyter notebook with Python kernel showing LaTeX.
Newcomers to LaTeX find the overall CoCalc environment helpful for learning how to typeset formulas. E.g., they will see beautiful math output in Jupyter notebooks or Sage worksheets, then click to see what LaTeX code generated that output, and start using it in their documents. They learn a few features at a time and include them in their workflow.
CoCalc has a clean, modern real-time user interface with tens of thousands of passionate active users. We have been polishing the CoCalc user experience based on feedback since April 2013. CoCalc has users around the world who give our customer service high marks.
Access and Security
CoCalc is fully web-accessible, and we provide sign-in integration with Google Apps, Twitter, Facebook, and GitHub (as well as institutional Single-Sign-On services).
CoCalc has an integrated course management system, which makes it easy to fully use LaTeX with students in the context of teaching courses and workshops. For example, you can create a document template (with questions), push it to all students, let them work on it, then collect it later, grade it, and return it. For more information on this feature of CoCalc, view our formal documentation on the course management system at https://doc.cocalc.com/teaching-course-management.html
LaTeX documents are stored in projects. Users may add a chosen list of collaborators to a project. There is no limit to the number of collaborators that may be added, and collaborators can be removed at any time. By default, files are only visible and editable by collaborators on a project. Users can make specific files and directory publicly visible to make sharing easier.
Secure storage and backup
Here’s our current storage and backup system:
- The files in your project sit on a VM at Google, whose filesystem is snapshotted daily. All files at Google are encrypted at rest (see https://cloud.google.com/security/encryption-at-rest/).
- The files are rsync’d to another server whenever your project is saved (so every 5 minutes when actively used).
- The files on the second server are snapshotted using ZFS with snapshots saved for six months (but trimmed over time). You can expect to have regular snapshots for the past hours, the last few days and a few weeks and months before that.
- Every few hours a Git-based archive is made of modified projects and saved in a Google cloud storage bucket, which is globally distributed.
- At least once per week (and usually once per day), we rsync the new archives to an encrypted USB drive.
- We periodically rsync that USB drive to another encrypted USB drive, which is stored offline in a locked office at a separate location.
As noted above, CoCalc gives you access to a full Linux environment, with dozens of programming languages and thousands of libraries and packages pre-installed. You are ready to go with computer algebra systems for theoretical mathematics, scientific packages for physical sciences and bioinformatics, and statistical and machine learning software for data science.
You can temporarily boost your RAM, CPU, and/or Disk Space for a small fee, which makes flexible compute resources both cost efficient and accessible for whenever you need them! Now available for purchase on the CoCalc store under: Boost Licenses
Pricing and Cost Effectiveness
CoCalc allows for unlimited projects and collaborators, with 3GB of disk space per project, on free accounts. You can start using CoCalc for free right now by creating an account at https://cocalc.com/.
Our pricing is by project and is listed here: Licenses
One could in theory, have thousands of LaTeX documents in the same project.
We charge for other upgrades, including extra disk space and more RAM. The two most important upgrades are “outside network access” and “members-only hosting”. Outside network access makes it possible to connect to the Internet from within a project in order to push and pull data to remote sites (e.g., GitHub). Projects are placed on two separate pools of computers: the free machines and the members-only paid computers. The computers are similar, but the free ones are rebooted frequently (usually once every 24 hours) and are more crowded. Member only machines are almost never rebooted.
The best quantity discount is the “Large course plans”; the price to provide members-only hosting and have outside network access for one project is about $10/year. This is cheaper than the published prices from our competitors.
Unlike Overleaf, we do not remove any of the functionality of CoCalc when you use it for free. Having a free account only limits disk space, network access, and how quickly and robustly documents are compiled.
In conclusion, we invite people to use our very powerful LaTeX environment and see how useful it is. Not just for for creating documents, but also for computation, research and teaching!