# SwiftLaTeX

## Introduction for SwiftLaTeX

SwiftLaTeX, a WYSIWYG WebAssembly client-side LaTeX Editor. All computation is done locally and files are stored in user-provided cloud storage. 

![Screenshot](https://www.swiftlatex.com/images/screenshot-light.png)

## What are the differences to Overleaf or ShareLaTeX?

1. __Speed__. SwiftLaTeX engines run in browsers, all computation is done strictly locally. It makes SwiftLaTeX more responsive (i.e., faster compilation) and scalable.

2. __WYSIWYG__. SwiftLaTeX provides a WYSIWYG viewer, allowing users to editing PDF output directly.

3. __Flexible Storage Backend__. SwiftLaTeX stores files in user-provided cloud storage or potentially self-hosting S3/Minio. 

4. __Realtime collaboration__. Send a secret link to your friend to start real-time collaboration. (Working in Progress!)

## Installation Guide!
No installation needed, just try it in https://www.swiftlatex.com

If you want to host SwiftLaTeX by yourself, you could compile the source code by yourself.
If you already have Node 12 and yarn, just run
```
git clone https://github.com/SwiftLaTeX/SwiftLaTeX
cd SwiftLaTeX
yarn
yarn start
```
If you do not have node and yarn yet, try the following commands first.
```
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install 12
npm install yarn -g 
```

If you prefer using Docker, you could try the following commands.
```
git clone https://github.com/SwiftLaTeX/SwiftLaTeX
cd SwiftLaTeX
docker build . -t swiftlatex/swiftlatexv2
docker run -p 3011:3011 swiftlatex/swiftlatexv2
```

The server will be up and running in http://localhost:3011.
All storage options should work of the box. You could host your own Minio server and provide the credential info to src/server/minio.tsx, such that you can store playgroud files in your server. 

For more deteiled information, have a look at https://github.com/SwiftLaTeX/SwiftLaTeX