Skip to content

Instantly share code, notes, and snippets.

@realamirhe
Last active August 3, 2025 07:22
Show Gist options
  • Select an option

  • Save realamirhe/b212442f4800e9e3dcf0ec1f24502a86 to your computer and use it in GitHub Desktop.

Select an option

Save realamirhe/b212442f4800e9e3dcf0ec1f24502a86 to your computer and use it in GitHub Desktop.
setup minimal latex in mac (basicTex and vscode)
  1. Install BasicTeX. pkg or homebrew
  2. Validate installation
which pdflatex
  1. Update the native TeX Live Manager itself and all aviable packages
sudo tlmgr update --self
sudo tlmgr update --all
  1. Install all packages you might need
tlmgr install amscd amsfonts amsmath amssymb amsthm bidi bigfoot chktex epersian framed geometry graphicx latexindent latexmk lipsum lwarp perpage synctex wasy zref
  1. Install LaTeX Workshop

  2. In case you want to use xelatex for compiling, update your vscode settings

{
   "latex-workshop.formatting.latex": "latexindent",
    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-xelatex",
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        }
    ],
}
@realamirhe
Copy link
Author

brew is preferred in mac

brew install basictex --cask
brew install tex-fmt

.vscode/setting

{
"latex-workshop.latex.autoBuild.run": "never",
  "latex-workshop.message.error.show": false,
  "latex-workshop.message.warning.show": false,
  "latex-workshop.latex.recipe.default": "lastUsed",
  "latex-workshop.formatting.latex": "tex-fmt",
  "latex-workshop.latex.tools": [
    {
      "name": "latexmk",
      "command": "latexmk",
      "args": [
        "-xelatex",
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "%DOC%"
      ]
    }
  ],
  "latex-workshop.latex.clean.fileTypes": [
    "*.acn",
    "*.acr",
    "*.alg",
    "*.aux",
    "*.bbl",
    "*.bcf",
    "*.blg",
    "*.fdb_latexmk",
    "*.fls",
    "*.glg",
    "*.glo",
    "*.gls",
    "*.gz",
    "*.hd",
    "*.idx",
    "*.ilg",
    "*.ind",
    "*.ins",
    "*.ist",
    "*.lof",
    "*.log",
    "*.lot",
    "*.nav",
    "*.out",
    "*.run.xml",
    "*.snm",
    "*.toc",
    "*.xdv"
  ],
  "[latex]": {
    "editor.tabSize": 2,
    "editor.defaultFormatter": "James-Yu.latex-workshop"
  },
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment