How to install LaTeX in Mac
LaTeX is free software under the terms of the LaTeX Project Public License (LPPL). LaTeX is distributed through CTAN servers or comes as part of many easily installable and usable TeX distributions provided by the TeX User Group (TUG) or third parties.
There are two approaches to download and install latex in MacOS.
- First, go to the link of MacTeX distribution and install the LaTex in one of two ways, A or B. Details are given below.
A) Install the full package: Click on MacTeX Download to download the MacTex.pkg file and install in a conventional way. The is very large in size and takes enormous space from the hard disk. It contains all the packages available which one may not need to use all of them. But it eliminates the manual install of the packages and always ready when needed.
B) Install core package: To install only the core packages, follow only one of the two methods mentioned below.
I) Click on BasicTex Download to download the BasicTex.pkg file and install it in a conventional way. This file is small in size compared to the MacTex.pkg. But all necessary packages need to be installed manually. No spaces will be wasted on unused packages.
II) Install using Homebrew, ( Only if you did not install it before)
To install Homebrew, first install command line tools using the following command in terminal.
xcode-select --install
Copy the code and paste in the terminal to install Homebrew in your system if you not already.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Now install Homebrew Cask using the following command.
brew install cask
Now install BasicTex using Homebrew Cask
brew cask install basictex
Now you have successfully completed installing the BasicTex either using Homebrew or directly installing the .pkg from MaxTex distribution. It contains the core files so one needs to install the packages separately when needed. In this way, hard disk space can be saved to some extent.
As you guessed, installing the packages explicitly is required for BasicTex. To install any package, we need to use the TeX Live Manager (tlmgr) tool from the terminal.
First update the databse of tlmgr.
sudo tlmgr update --self
Install the missing package using the following command.
sudo tlmgr install <package-name>
The package name can be found from CTAN website. Just search the package which is missing and you will get the name of the package.
2. Now it's time for editor where you will write. I recommend Texmaker as it is free and cross-platform. We are done !!
Comments
Post a Comment