Instructions on how to install the BasicTeX TeX distribution on macOS.
First step should be to unsinstall any previous BasicTeX installation. This step can be skipped if no BasicTeX version was previously installed.
To uninstall any previous BasicTeX installations use the following command(s):
sudo rm -rf /usr/local/texlive /Library/TeXThe BasicTeX TeX distribution can be obtained here. Copy the link for the package version that you want to install from there.
Get the BasicTeX installer package using the following commands:
mkdir ~/Downloads/BasicTeX
curl --silent --location --retry 3 "https://mirror.ctan.org/systems/mac/mactex/BasicTeX.pkg" --output ~/Downloads/BasicTeX/BasicTeX.pkgRun the installer package using the following command:
sudo installer -pkg ~/Downloads/BasicTeX/BasicTeX.pkg -target /Open a new terminal window and check if the CMake tool is installed:
tex --versionAfter installing the BasicTeX TeX distribution you can remove the downloaded installation package using the following command:
rm -rf ~/Downloads/BasicTeXTo test the installed tools create a file called hello-world.tex with the
following text:
% The LaTeX is in here!
\documentclass{article}
\begin{document}
Hello World
\end{document}Then run the following command to create the pdf version:
pdflatex hellow-world.texTo see the created pdf use the following command:
open hellow-world.pdfTeX packages can be installed using the following command:
tlmgr install <package-name>