# Docker LaTeX Setup with vscode and Grammarly

LaTeX is a document preparation system, which builds `.pdf` documents from text and commands for formatting. I use it to write academic research papers and other documents, like my [résumé](https://github.com/michidk/resume).

> I wanted an easy setup for a powerful LaTeX environment using an extensible IDE with Grammar.ly integration, running in Docker so my system stays clean.

#### Requirements

So the requirements for the setup were:

*   Works on Windows and Linux
*   Uses [Visual Studio Code](https://code.visualstudio.com/) (vscode) as editor
*   [Grammar.ly](https://grammarly.com) integration
*   Uses [texlive-full](https://www.tug.org/texlive/) together with biber and latexmk
*   … but without installing them to my system
*   Should not require more than a few clicks (or commands) to set up

#### Setup

Thanks to the awesome vscode extension [latex-workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop), which [recently added Docker support,](https://github.com/James-Yu/LaTeX-Workshop/wiki/Install#using-docker) this was quite easy to achieve.

Requirements:

*   Docker
*   vscode

Here are the steps:

1.  Install these two vscode extensions: [latex-workshop,](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) [Grammarly](https://marketplace.visualstudio.com/items?itemName=znck.grammarly)
2.  Set *“latex-workshop.docker.enabled”: true* in your vscode settings
3.  [Build your project](https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#building-the-document) with latex workshop

#### Additional Setup

If you have a Grammarly account, log in by specifying

```jsonh
"grammarly.username": "your grammarly email",  
"grammarly.password": "your grammarly password",
```

I also like to add the following configuration values:

```jsonh
// Grammarly academic writing style  
"grammarly.domain": "academic",
```

```jsonh
// always open pdf preview in new vscode tab  
"latex-workshop.view.pdf.viewer": "tab",
```

I also use the vscode [Material Icon Theme](https://marketplace.visualstudio.com/items?itemName=pkief.material-icon-theme) plugin in my LaTeX projects.

Which vscode plugins do you use in your LaTeX projects?

Have fun!

Header picture by [ron dyar](https://unsplash.com/@prolabprints?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)
