dyrda.
page science technology design games art page

Okay, I'll be honest. I'm writing this text for myself, because I have to look for the same instructions over and over again when I need to set up my writing environment on a new computer. So this is primarily documentation for me. I have only tested it on my own computers. But maybe it will help others.


Step 1: Install TeX Live as described here by the TeX Users Group. Note that the installation may take a long time if you install TeXLive with all features. On Windows, you are done. If you are installing this setup on Linux, you have to update PATH manually. For me, this usually involves the following steps:

  • Go to the home directory of the current user logged in.
  • Display hidden files.
  • Edit the .zshrc / .bashrc / ... file depending on the shell you are using.
  • Add PATH="/usr/local/texlive/YEAR/bin/PLATFORM:$PATH" adapted to your TeX Live installation to the end of the file. (e.g. PATH="/usr/local/texlive/2022/bin/x86_64-linux:$PATH".)

Step 2: Install Visual Studio Code as described on their official website. After that, you should customize the editor so that it sparks joy. This is an important step. Personally, I use the Monokai theme. It's just beautiful and a pleasure to work with.


Step 3: Install the VS Code Extension "LaTeX Workshop" by James Yu and contributors as described in the ReadMe of the project's repository. Afterwards you can test your setup with a .tex file containing a simple document: \documentclass{article} \begin{document} hei \end{document}


Step 4: Setup Markdown in your LaTeX project Open a new LaTeX project and edit the .tex file. In order to write Markdown in your .tex file, load the markdown package in your document preamble. Overleaf has a great tutorial article about "Writing Markdown in LaTeX Documents" that describes the various ways to use the package.

You may need to change the default LaTeX recipe used by LaTeX Workshop to "latexmk (lualatex)".


Step 5: Prepare your setup for collaboration. Git is an excellent choice as version control for your LaTeX project and for collaboration with others. Plus: If you want to collaborate with others who don't want to install a LaTeX solution on their local system, you can synchronize the Git repository with Overleaf, as described here: "How do I connect an Overleaf project with a repo on GitHub, GitLab or BitBucket?".


That's it! Now you can write documents with LaTeX + Markdown in VS Code.

Please be attentive when installing software on your computer. Only install programs from sources you trust. This guide was written in 2022. The links were last checked when this guide was written.

— Setup LaTeX and Markdown in Visual Studio Code

navigation