A fully offline, completely local Overleaf alternative that can switch to online Overleaf in the blink of an eye.
MIT License
Overleaf is a fantastic tool for writing LaTeX documents that is widely used among academics. The main reasons it's so great:
However, it has one big problem: it relies on an internet connection to do the heavy lifting of compiling on a server, and any minor internet disruption breaks the editing process. That is far from ideal when working on the plane on your way to a conference or on the train during your commute.
With the success of Native Overleaf, which wrapped Overleaf in a native app and added native OS integration, the most requested feature was to be able to work offline. This requires a completely different approach that is a lot more involved than extending a website and wrapping it.
Hence, introducing... TurnALeaf! A completely new app for writing and compiling LaTeX documents without any of the associated hurdles. As it runs on your own device, not only are you no longer dependent on an internet connection, you also get much tighter system integration than any website can bring. The best part? It's all free, and anyone can contribute ideas. TurnALeaf is for academics, by academics.
TurnALeaf is currently in development. The following roadmap outlines what will be released after which features are implemented. This contains moving targets; items can be added / changed.
Installation is as simple as downloading the latest release for Mac, Linux, and Windows. HomeBrew and App Store releases are planned (see Roadmap). To use TurnALeaf with Overleaf, you need to have access to Overleaf's git integration (premium feature). If you don't have this, you can still use the app by for by hosting it on any Git platform (e.g. GitHub). Local file support is currently not planned, because Git is used to automatically backup your important work. For building from source, see Setting up the development environment.
TurnALeaf runs as a native web app, similar to Native Overleaf, but has a completely standalone editor and viewer built-in that functions as much like Overleaf as possible. The Git integration built into Overleaf allows for seamless switching between TurnALeaf and Overleaf. Under the hood, TurnALeaf uses SwiftLaTeX to compile LaTeX to PDF locally and very fast thanks to WebAssembly. Note that an internet connection may still be required to download some files for compilation. Edits are automatically saved to both your system and the remote server, meaning you won't have to worry about losing your work.
For those interested, this project involved a lot of design decisions.
One of the most difficult choices was in picking between Electron and a more native approach, Tauri being the most popular.
On the one hand, the small bundle size, performance, self-updater and tight embedding in the OS provided by Tauri was very appealing.
On the other, Electron remains massively popular, well-documented and, most importantly, provides a consistent experience across platforms because of the bundled browser.
As this is one of the reasons the previous project Native Overleaf was hard to maintain, Electron was chosen. Vite is used as a bundler (for hot-reload speed), React as the interface library, and PostCSS / Tailwind as the styling language (for convenience), based on a electron-forge-react-vite boilerplate.
Mantine is used as the UI component library.
To provide a standalone, Node-compatible git implementation, isomorphic git is used.
Between Electron-Forge and Electron-Builder, electron-forge
is used, the reasons for which are well summarized here.
Please use the GitHub discussions page for this project. This allows others to read and chime in as well. If you'd like to contribute, great! Feel free to submit pull requests via forks. Please note that pull requests on features in active development (see Roadmap) will likely not be accepted; to avoid duplicate work, first open an issue. Be sure to check the contributing guidelines for more practical information.