%!TEX TS-program = xelatex 
%!TEX encoding = UTF-8 Unicode 


\documentclass[12pt, oneside]{amsart}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue, 
            citecolor=blue, urlcolor=blue]{hyperref}
            
\usepackage{fontspec,xltxtra,xunicode} 
\defaultfontfeatures{Mapping=tex-text} 
%\setromanfont{Hoefler Text} 
%\setromanfont{Optima}
\setromanfont{Baskerville} 
\setsansfont[Scale=MatchLowercase] {Gill Sans} 
\setmonofont[Scale=MatchLowercase] {Andale Mono} 

            
\title{What Is Installed}
%\author{The Author}
%\date{}                                           % Activate to display a given date or no date

\begin{document}
%\twocolumn[\maketitle]
 \maketitle
%\section{}
%\subsection{}

\section {The Package}


The Mac\TeX{}-2022 install package contains four subpackages: 
\begin{itemize}
\item TeXLive-2022
 \item GUI-Applications 
 \item Ghostscript-9.55
 \item Ghostscript-9.55-libgs
\end {itemize}
 In the default installation, the first three are installed. Use the ``Custom Install'' option to select which packages to install.


\section{\TeX{} Live}

The most important package is TeXLive-2022, which installs the full \TeX{} Live 2022 distribution in \path{/usr/local/texlive/2022}. \TeX{} Live is the reference \TeX\ distribution produced by \TeX\ user groups across the world; it runs on almost all computer architectures including macOS, Windows, GNU/Linux, and other Unix systems. The distribution is the same on all of these platforms; nothing has been added or removed to customize it for macOS.

You can find a complete list of files and install locations by double clicking on the Mac\TeX{}-2022 package and then choosing the menu item ``Show Files''. The important fact is that everything in \TeX{} Live is put in the ``2022'' folder.

When you want to add files to \TeX{} Live which are visible for all users on your machine, the files should be installed in \path{/usr/local/texlive/texmf-local}. This tree is not inside the 2022 folder so it can be used with future versions of \TeX{} Live as well. If the texmf-local directory exists when Mac\TeX{}-2022 is installed, then it is not touched by the installer. But if there is no such tree, then Mac\TeX{}-2022 installs an empty tree waiting to be used. This is exactly what would happen if you installed \TeX{} Live using its native install script.

Incidentally, if you want to add files to \TeX{} Live for one particular user, install them in a similar tree 
 \path{~/Library/texmf} where \path{~/Library} is the Library folder in that user's home directory. The folder \path{texmf} and other folders for the tree will have to be created. For instance, \TeX\ will find any file in \path{~/Library/texmf/tex} or a subfolder of this location, \LaTeX\ will find any file in
 \path{~/Library/texmf/tex/latex} or a subfolder of this location, and Bib\TeX\ will find any .bib file in \path{~/Library/texmf/bibtex/bib} or a subfolder of this location, and any .bst file in \path{~/Library/texmf/bibtex/bst} or a subfolder of this location. It is not necessary to use texhash when adding files to this local tree.
 
 In Apple's  latest operating systems, the \path{~/Library} folder is present but not visible in the Finder. Use the ``Go To Folder'' command in the Go menu to show this Folder. 

MacTeX also installs a \TeX\ Distribution Data Structure in /Library/TeX. This structure does not modify TeX Live in any way. It  was designed by J\'{e}r\^{o}me Laurens and Gerben Wierda and contains a small folder of symbolic links for each \TeX\ distribution installed on your machine. The structure is in  \path{/Library/TeX} and contains four subfolders: \path{.scripts}, \path{Documentation}, \path{Distributions}, and \path{Root}. The data structure is very small, only about 332 KB.

The \TeX\ Data Structure allows you to have more than one \TeX\ distribution on your machine and trivially switch between them. It also makes it possible to add GUI front ends and utilities to \TeX\ without any configuration whatever; these applications are automatically configured for your current \TeX\ distribution.  For example, if you already installed \TeX{} Live 2020 last year, that distribution remains after you install \TeX{} Live 2022; if you are in the middle of an important project and find that something in \TeX{} Live 2022 doesn't work correctly, you can switch back to \TeX{} Live 2020 with a single button push.

A user can ignore \path{/Library/TeX} entirely because the data is controlled from the GUI program TeX Live Utility. MacTeX installs this in \path{/Applications/TeX}. 
Using TeX Live Utility, here is how to switch active TeX distributions. Select the
menu item ``Reconfigure Distributions'' in the Configure menu and a panel will appear listing TeX Distributions on your machine. Click on the radio button attached to an element of this list to activate that particular TeX distribution. Automatically all of your GUI front ends and utilities will reference the new distribution, and PATH and MANPATH will point to the new distribution in Terminal.

Currently everything in the folder \path{TeX} inside \path{/Library} was installed by Mac\TeX{}, but in the future developers may install other things in this location. It isn't necessary to discuss the full contents of \path{TeX}, but two items will be of interest.

\path{Root} is just a symbolic link to the active distribution, and so in our case to \path{/usr/local/texlive/2022}. It is visible in the Finder, so to inspect \TeX{} Live 2022 without using tricks, click on \path{Root} and navigate to any portion of the \TeX{} Live 2022 tree you'd like to study.

The \path{Distributions} folder contains one ``.texdist'' folder for each distribution on your machine. . Note that ``.texdist'' folders may exist for distributions you don't have; this causes no trouble because TeX Live Utility is intelligent and checks to make sure the .texdist folder points to active data. So if you later remove \TeX{} Live 2022, it is not necessary to modify \path{/Library/TeX}.

Our package also installs a crucial symbolic link:
\begin{verbatim}
         /Library/TeX/texbin
\end{verbatim}

This link points through the TeX Dist Data structure to the executables directory of the active distribution. Consequently, all GUI apps should be
configured to find TeX at this location. This automatically happens for GUI applications provided by MacTeX. Users should not attempt to rewrite
this link themselves when changing distributions; instead use the ``Reconfigure Distributions...'' command in TeX Live Utility described earlier.

Before 2015, MacTeX created a different symbolic link for the purpose, \path{/usr/texbin}. This changed in 2015 because El Capitan does not allow
users to write into the \path{/usr} folder, although users  can still write to \path{/usr/local}. The links \path{/Library/TeX/texbin} and \path{/usr/texbin}
point to exactly the same spot and are entirely equivalent. Some third party GUI apps may still use \path{/usr/texbin};  reconfigure them to use
\path{/Library/TeX/texbin} on El Capitan and higher. 

Finally, our package modifies your PATH and MANPATH so command line utilities also work automatically with the active distribution. . On recent systems, the directory \path{/etc/paths.d} contains a file for each addition of a new location to the default PATH on the system. As shipped by Apple, this folder has only one file: \path{X11}. Our install package adds a second file, \path{TeX}, which contains the single line \path{/Library/TeX/texbin}. Similarly the directory \path{/etc/manpaths.d} contains a file for each addition of a new location to the default MANPATH. As shipped by Apple, it contains only one file: \path{X11}. We add a second file: \path{TeX}.




\section{GUI Applications}

This package installs TeXShop, LaTeXiT, TeX Live Utility, and BibDesk  in \path{/Applications/TeX}. Note that many other editors, front ends, and utilities are available for \TeX\ on the Internet; you may want to experiment with a variety of such programs. All of these programs can be removed by dragging them to the trash.

TeXShop is a front end  for TeX. It contains an editor and previewer for TeX. If you are new to TeX, you can begin learning it by running TeXShop and following the instructions in the READ ME FIRST file in \path{/Applications/TeX/} in the folder named \emph{Docs and Spell Utilities}.  Experienced users may want to switch to their own favorite editor.

TeX Live Utility has been mentioned earlier. It is  a program which can update TeX Live 2022 packages over the network, and can configure paper size in TeX. The program is self explanatory. When it starts, TeX Live Utility lists packages in TeX Live 2022 for which updates are available. Select the ``Update All Packages'' item in the Actions menu to update these packages. TeX Live Utility calls a command line utility named tlmgr in TeX Live 2022 to perform the updates; it is possible to directly run tlmgr in Terminal.


\section{Ghostscript 9.55}

The Macintosh comes with a distiller which converts postscript to pdf: \path{/usr/bin/pstopdf}. For this reason, it is not essential to install Ghostscript when installing \TeX. However some \TeX\ style files assume the existence of Ghostscript and many people prefer to distill using it. Any Ghostscript installation will do, and some users have the Fink or MacPorts distributions, which all work well with \TeX. For others we provide the latest version of Ghostscript in this package.

You can find a complete list of files installed by double clicking on the Mac\TeX{}-2022 package and then choosing the menu item ``Show Files''. 

Ghostscript executables are placed in \path{/usr/local/bin}, support files are placed in \path{/usr/local/share/ghostscript/9.55}, man pages are in \path{/usr/local/share/man}, and fonts are installed in \path{/usr/local/share/ghostscript/fonts}. Most Ghostscript executables are just shell scripts. There are only two binaries containing code, gs-X11 and gs-noX11; the first is compiled with X11 support and the second without X11 support. The symbolic link gs points to one of the two versions depending on whether the installer found X11 on your system at install time. 

\section{Ghostscript 9.55 libgs}

This optional install package installs the Ghostscript library libgs in /usr/local/lib and /usr/local/share/ghostscript/9.55/lib. This library is used by only one TeX Live program, dvisvgm. MacTeX deliberately does not install library files in /usr/local/lib to avoid confusing other third party program with an unexpected dynamic library. Unless you use dvisvgm, there is no reason to install this package.

\end{document}
  