Skip to content

Working environment

Mikkel Roald-Arbøl edited this page Nov 3, 2022 · 2 revisions

Working environment

This section will be reviewed and rewritten soon. I also plan to add references/resources for those of you inexperienced with LaTeX - help is on the way!

There is many ways to work with the template. Which one you choose may depend on your experience with LaTeX and the command line, whether you prefer to work offline, or you need to do collaborative writing. Some suggestions are:

  • Overleaf*
  • Visual Studio Code
  • TeXStudio
  • Docker

*For most people, using Overleaf is great for collaborative writing. They are however also owned by Holtzbrinck, one of the big wigs in publishing, and a major surveillance publishing actor that make money from selling our data. So I'll also propose an alternative solution using Visual Studio Code (or even better the non-tracking alternative VSCodium)

Overleaf

Import into Overleaf is incredibly simple:

  1. On the Projects page, click New Project
  2. Import from Github
Screenshot 2022-08-23 at 10 10 10

VSCode

  1. Install VSCode or VSCodium.
  2. Install Tex
  3. Open VSCode
  4. Install extension LaTeX Workshop by James Yu
  5. Open User Settings (JSON): Cmd+Shift+P, Preferences: Open User Settings (JSON)
  6. Add the following:
    "latex-workshop.view.pdf.viewer": "tab",
    "latex-workshop.latex.autoClean.run": "onFailed",
    "latex-workshop.latex.outDir": "build",
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    "[latex]": {
        "editor.wordWrap": "on"
    }
  1. Clone your new repository to your device
  2. File, Open Folder and select your newly cloned repository.

TeXStudio (thanks to dangom and hvoss49)

Download the files

git clone https://github.com/roaldarbol/LaPreprint.git
cd LaPreprint

Add them to your texmfhome:

TEXMFLOCAL=$(kpsewhich -var-value TEXMFLOCAL)
mkdir "$TEXMFHOME"/tex/latex/LaPreprint
cp lapreprint.cls "$TEXMFHOME"/tex/latex/base
sudo texhash

Docker (thanks to @hoelzer)

If you don't have LaTeX installed, you can use a Docker image to compile a PDF from the LaTeX template. You only need Docker installed - nothing more.

When you have Docker, clone this repository, change to the cloned directory, and run:

docker run --rm -v $PWD:$PWD -w $PWD nanozoo/pdflatex:3.14159265--f2f4a3f pdflatex main.tex If you run the command for the first time, the Docker image will be automatically downloaded and then executed to compile the PDF.