
\documentclass[11pt, 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{url}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{url}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\title{Mactex  Web Pages}
\author{Richard Koch}
\date{\today}                                           % Activate to display a given date or no date

\begin{document}
\maketitle
\section{Introduction}

The url for the MacTeX web pages is \url{http://tug.org/mactex}. The source files serving up these pages are on the TUG server in
\url{/home/httpd/html/mactex}. People editing the pages are given an account on the server.

The MacTeX web pages were originally constructed and maintained by Wendy McKay. 

It was Wendy who conceived the idea of a Macintosh install package which would provide everything  needed to use TeX on a Macintosh. After advocating the idea at a couple of  earlier TUG conferences, she organized a lunch meeting for Macintosh users at the TUG Practical TeX Meeting, 2005,  in Chapel Hill, North Carolina. At that lunch, she pointed to Jonathan Kew and assigned the construction of the installer to him. Jonathan stayed up all night and had a package the next morning. Over breakfast, he willed maintenance of it to me. 

Starting at that time and for many years afterward, the MacTeX web pages were entirely under Wendy's control. 
Their basic look and feel is all Wendy.

\section{Making Revision Easy}

But as Wendy moved on to other things, Herbert Schulz and I took on the task of revising the pages. At first we asked Wendy for specific changes in the web pages. Later we did the editing and asked Wendy to take charge in the end and activate the new pages. Finally in 2015 Wendy wrote very careful instructions explaining how to do that and since then Herb and I have been able to activate pages on our own.

The web pages are on the TUG server in \url{/home/httpd/html/mactex}. This folder used to be  a mess, with inactive web pages, backups from previous years, and pages with slightly different names also used for backup. In 2019, Karl Berry asked us to clean up the folder and remove backups, since the entire server is routinely backed up. The folder was much cleaner after that operation, but mysterious elements remained. Finally toward the end of 2020, Karl asked for another cleanup and now the site is fairly straightforward. Since the site is backed up to another disk, it is not necessary to back up old pages; in particular, Karl asks that we avoid zipping material and leaving the zip file there.

 
Earlier in 2013, as Herb and I were doing more work, Wendy brought order to the pages by creating a folder named 2013, which had copies of most of the important and active web pages. These were not the active pages, which remained in the top level of \url{/home/httpd/html/mactex},
but instead exact copies.
That year, whenever Wendy made a change in an active file on the site, she made the same change in the copy of that file in the 2013 folder.

This organization made revising the pages for 2014 very easy. We began by creating 2013.tar.gz from the 2013 folder on the TUG server.  I then downloaded this to my personal Macintosh, and renamed the folder 2014. Viewing the MacTeX pages on the web was  the same as viewing pages in the 2014 folder on my personal computer, so except for a small number of minor pieces, I had a complete copy on my machine.
I could then view the  pages with Safari and edit with my favorite editor,  TeXShop. Obviously any editor would do; notice that we do not use fancy html editors.

After revision was finished, I compressed the 2014 folder to give 2014.tar.gz and uploaded this back to the TUG server. It was placed in  \url{/home/httpd/html/mactex} and uncompressed to give a new folder named 2014. These new pages could be viewed by trusted members of the MacTeX group.

To release, Wendy copied  the contents of the 2014 folder to /home/httpd/html/mactex, overwriting the old files there. After that,  the active files were an exact copy of those in 2014, and 2013 still existed in case retreat was necessary.

Wendy, Herbert, and I  repeated this process until Wendy turned the whole process over to us, and Herbert and I continue to use it to the current day. The great advantage is that no editing is required directly on the server, and thus no knowledge of Unix editors is required.

\section{Updating Over the Year}

This document is being edited for 2022, so from now on I'll refer to the 2022 folder.
To make our update technique work, it is necessary to keep the active pages and the pages in 2022 in sync over the year. Suppose you have edited a page, say downloading a particular html page to  your personal computer. Upload the revised version to the TUG machine. Suppose the name of this page is newpage.html. Then
\begin{verbatim}
     mv -f newpage.html /home/httpd/html/mactex
     cd /home/httpd/html/mactex
     chgrp -R mactex newpage.html
     chmod -R g+rwX newpage.html
     
     cp -f newpage.html 2022
     cd 2022
     chgrp -R mactex newpage.html
     chmod -R g+rwX newpage.html
\end{verbatim}

Changing the group and permissions on these files allows others in the MacTeX group to also edit the files. In particular, Herbert can revise my edits and I can revise his. I used to do all of these steps by hand, but recently I constructed a script which does it automatically. The name of the script is ``movetoweb''. The script must be in the same folder on the TUG machine as the revised html file. To install
\begin{verbatim}
     movetoweb  newpage.html
\end{verbatim}
The year is hardcoded in this script, so the script must be edited once a year.

%\section{Cleaning Up /home/httpd/html/mactex}
%
%Wendy seems to have kept everything she ever used in these web pages. In 2019, there were backups of complete pages for all years from 2006 on. Several pages existed in duplicate versions, indicated by slightly different titles or extensions. Several folders exist labeled ``Still Useful?'' and the like.
%
%Karl Berry pointed out to me in 2019 that TUG makes and keeps regular backups of the TUG server, and these additional files in the MacTeX web pages were degrading the available disk space on the machine. So I removed the main yearly backups, keeping only those for 2018 and the currently active 2019. I also removed duplicate files when it was obvious what to do. But many of those odd folders still remain. 
%
%It is possible that some of those folders are significant. For instance, the web pages have a "header line" at the top with several links; this line only appears when the pages are on the TUG machine, so they are probably created by files not in the yearly folders. It is also possible that some pages refer to html code elsewhere on the TUG machine and not even in the MacTeX portion.
%
%Although I believe I reclaimed most of the memory being using by these extra files, it would be useful for someone to go through the entire site and clean out everything not directly required by our pages.
%
%On the other hand, I think Wendy's basic design is still servicable and I see no reason to reach in and redo the entire web site. I suppose sometime in the future, a young go-ho person will decide to do that. Good luck to him or her. It won't be me.

\section{Details}

Below is the exact code for several important tasks.

To create an archive for the folder 2022 in /home/httpd/html/mactex:
\begin{verbatim}
     cd /home/httpd/html/mactex
     tar -czvf 2022.tar.gz 2022
     mv 2022.tar.gz ~
\end{verbatim}
When this file is uncompressed, it will create a folder named 2022 with the correct contents inside. Change the name to 2023 on your home computer. The link index2022test.html will start up the web page.

Similarly, given MacTeXWeb-2023 in your home folder, move it to TUG as follows:
\begin{verbatim}
     cd 
     mv MacTeXWeb-2023 2023
     tar -czvf 2023.tar.gz 2023
     mv 2023 MacTeXWeb-2023
     
     scp 2023.tar.gz tug.org:
     ssh tug.org
     mv 2023.tar.gz /home/httpd/html/mactex
     cd /home/httpd/html/mactex
     gunzip 2023.tar.gz
     tar -xf 2023.tar
     chmod 755 2023
     cd 2023
     chgrp -R mactex *
     chmod -R g+rwX *
 \end{verbatim}
 
 To activate navigation for testing 2023 by members of the Mactex group:
 \begin{verbatim}
     cd 2023
     rm navigation.hrml
     ln -s navigation2023.html navigation.html
     cd ..
 \end{verbatim}
 
 To do the final activation of 2023 when MacTeX-2023 is released:
  \begin{verbatim}
     cd /home/httpd/html/mactex
     cp -r 2023/* .
     rm navigation.html
     ln -s navigation_mactex.html navigation.html
     rm index.html
     ln -s index2023test.html index.html
 \end{verbatim}
 



\end{document}  