From 46b858ad7b6d801bf0fc7e4785691e73b979afd5 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Tue, 13 Feb 2024 08:54:18 -0600 Subject: [PATCH] instructions added --- Readme.md | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..100c611 --- /dev/null +++ b/Readme.md @@ -0,0 +1,124 @@ +# Introduction +This repository will help you to start working with Visual Studio Code and LaTeX. + +# Step 1: Install a LaTeX distribution + +A LaTeX distribution is mandatory, depending on your system, you can install a complete or lite version. **I recommend to install the full version**. However there are several options like: + +- Texlive +- MacTeX +- MikTeX + +# Step 2: Install Visual Studio + +Of course you will need Visual Studio Code (VSCode) as the main IDE for latex projects. + +# Step 3: Install and configure LaTeX Workshop extension + +You need to install the *Latex Workshop* extension form [James-Yu](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop). This extension requires some extra configuration to properly work. + +Thus, open the `Command Palette` by pressing `Shift + Ctrl + P` (Windows) or `Shift + Cmd + P` (macOS). Then type *Open User Settings JSON* and open the first item. + +![User setting JSON file example](https://mathjiajia.github.io/img/open-json.png) + +Now copy and paste the following two snippets into your json file (inside the brackets {} of your file): + +``` +# "Your previous configuration" , + +"latex-workshop.latex.tools": [ + { + "name": "latexmk", + "command": "latexmk", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "-pdf", + "-outdir=%OUTDIR%", + "%DOC%" + ], + "env": {} + }, + { + "name": "xelatex", + "command": "xelatex", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "%DOC%" + ], + "env": {} + }, + { + "name": "pdflatex", + "command": "pdflatex", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "%DOC%" + ], + "env": {} + }, + { + "name": "bibtex", + "command": "bibtex", + "args": [ + "%DOCFILE%" + ], + "env": {} + } +], + +``` + +**Considers that most probably you already have a previous configuration inputs. Take care that these previous inputs (`# your previous configuration`) end with a comma after each entry.** + +Also copy and paste the next snippet: + +``` +"latex-workshop.latex.recipes": [ + { + "name": "pdfLaTeX", + "tools": [ + "pdflatex" + ] + }, + { + "name": "latexmk 🔃", + "tools": [ + "latexmk" + ] + }, + { + "name": "xelatex", + "tools": [ + "xelatex" + ] + }, + { + "name": "pdflatex ➞ bibtex ➞ pdflatex`×2", + "tools": [ + "pdflatex", + "bibtex", + "pdflatex", + "pdflatex" + ] + }, + { + "name": "xelatex ➞ bibtex ➞ xelatex`×2", + "tools": [ + "xelatex", + "bibtex", + "xelatex", + "xelatex" + ] + } +], +``` + +# Step 4. Write & Compile + +Now you may open a `tex` file or create a new one. If you want to compile the file, press `Ctrl + Alt + B` (Windows) or `option + Cmd + B` (macOS). Moreover, you may choose another recipes from the sidebar. There is a button in the right top corner to preview PDF file.