\documentclass[11pt, oneside]{article}   	% use "amsart" instead of "article" for AMSLaTeX format
\usepackage{geometry}                		% See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   		% ... or a4paper or a5paper or ... 
%\geometry{landscape}                		% Activate for rotated page geometry
\usepackage[parfill]{parskip}    		% Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}				% Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
								% TeX will automatically convert eps --> pdf in pdflatex		
\usepackage{amssymb}
\usepackage{url}
\usepackage{hyperref}

%SetFonts

%SetFonts


\title{About PreTeXt}
\author{Richard Koch}
%\date{}							% Activate to display a given date or no date

\begin{document}
\maketitle
%\section{}
%\subsection{}
\section{Remembrances}

TeXShop was started in May of 2000, when OS X was still in beta. The first web release was in July of that year. Recently I recovered sources for that release and discovered that they still compile on modern versions of OS X. Such a modern copy is available on the TeXShop web page.

Interest picked up with the release of OS X on March 24, 2001.  Sometime after that I was invited by Wendy McKay to speak at the TeX User Group Conference at the University of Delaware in  August of 2001. Wendy McKay worked with Jerry Marsden at Cal Tech; both were Macintosh fans.  MacTeX is Wendy's idea.

I remember just one thing about the talk. To show how easy it was to use TeX on OS X, I installed it during the talk. The Finder crashed in the middle and had to be restarted. After the talk, an audience member came up to me and said ``I'm not interested in TeXShop, but I'm very impressed that you could restart the Finder without rebooting the system!''

\section{The TeX User Group}
In 2001, I had a very distorted notion of TUG. I learned that the central offices of TUG are in Portland, Oregon, and imagined that they covered one floor of a large downtown skyscraper, with many employees handling the journal Tugboat, the DVD's, etc. The executive directory of TUG is Robin Laakso, and actually the TUG office is one room in her house and those many employees are Robin, Robin, and Robin.

Wendy offered to pay my conference fee and travel to Delaware, and I expected a large conference of perhaps 2000 TeX users. But when I got to Delaware, I discovered that there were around 50 people, most of them  speaking at the conference. All had paid their own way. So I sheepishly repaid TUG the conference and travel amounts (at least, that's how I remember it).

Since Delaware, I've gone to many TUG conferences and learned a lot. Some talks are by beginners explaining what it is like to start using TeX. One such speaker's advice was ``install everything right away, so packages and examples from books just work.'' That is why MacTeX installs the full TeX Live. Other talks were technical by the authors of XeTeX and LuaTeX. One of the most useful talks was on Beamer by Andrew Mertz and William Slough; I'd listen to any talk those two give. After that talk, UO faculty sometimes asked me how to produce slides and I noticed that this question usually came the day before their plane left for Budapest and two days before their talk. I'd always suggested Beamer and the Mertz and Slough article and never had a dissatisfied customer.

\section{Unusual Talks}
But mixed in with these standard talks were some unusual topics I had a hard time understanding. Every conference seemed to have a couple of talks on xml (Extended Markup Language). The speakers were often
able to type xml code at a ferocious rate, and they would indent to show the structure of the code, and soon the indentation level seemed to be several pages wide, particularly if MathML was included. 

I gradually learned that xml code can be edited  by computer programs, while TeX code requires hand manipulation. For this reason, many publishers require submission in xml. It seemed that researchers wanted to manipulate TeX for interactive output and make other advancements and each required xml. But even after many talks, I was unable to understand many details, and I gradually ignored xml.

\section{Pessimistic Talks} 

From time to time, a famous TeX expert's talk would be pessimistic, concluding that TeX had very little future. Sometimes the conclusion was that mathematicians would still input equations using TeX syntax, but the structure of documents would be described by an entirely new language. 

Why the pessimism? Some of my friends concluded ``they are just getting old''. But I began to notice that many of these experts were working in the Open University movement in England, teaching OnLine courses which required material on the web and highly interactive content. Instead of homework graders, homework answers were often checked immediately by machine; this was required by the large number of students, but also made for a more useful homework experience. Interactive graphs and demonstrations were necessary to hold the interest of students distracted by others in their home. All of these things are difficult to do with ordinary TeX. 

I'm retired from teaching at the University of Oregon, but I noticed my colleagues dealing with the same issues locally. So the interest in TeX extensions seemed to have a genuine cause. But practical solutions were another matter.

\section{TUG 2014}

The national meeting of TUG in 2014 was in Portland, Oregon. At last, a conference I could drive to! Among the talks on the first day was Robert Beezer's talk on Mathbook XML. This is the old name of PreTeXt, and as an example Beezer described conversion from LaTeX to PreTeXt of a book by my former Phd student Tom Judson.
The talk was clear and vivid, but I kept thinking ``hey, I know this guy Judson.''
After the talk I discovered that Beezer and Judson met while bicycling in France, and that is what I most remember.  I'm ashamed that I didn't pay closer attention.

\section{Dev Sinha}
A month ago, I was at the University for a groundbreaking ceremony for a new building. The ceremony had donors wearing suits and administrators, and I felt out of place until I recognized another mathematician, Dev Sinha. We left so I could hear a lecture on topology Sinha was to give, and on the way he asked what I knew about xml. I told him that mainly it takes a long time to type. Sinha disagreed, and told me that he was writing course notes in xml using a system from the University of Puget Sound, and he gave me a web address.

That night I went to the web site, and after a few minutes I thought ``wait a minute; I know this project.'' Then I noticed that the xml code was for document structure, but mathematics was still written using LaTeX commands. Finally I noticed that several different people I knew from the University of Oregon were involved in the project.

But what really struck me was the down-to-earth nature of PreTeXt. The author seemed to be interested in solving the problems teachers face in the modern world, not in ideas which might bear fruit in the future. PreTeXt used the best available technology. Thus xml for structure, but Latex for math. To get the Latex on the web, it uses MathJax, a technology promoted by the American Mathematical Society which has become a standard for math on the web.

\section{Enough Personal Stuff; How to Get Started}

Note that xml is a very primitive markup language. PreTeXt is an extension of this language, defined by files in
a folder on the PreTeXt site called xsl. I like to think of xsl as similar to the various style and package files which make up modern TeX. 

The first step in typesetting a PreTeXt file is to convert the xml language to another markup language, like latex or html. The engine which does this conversion is called xsltproc; it is a standard part of OS X. The program xsltproc needs to have access to the document source and also the files in xsl to do the conversion.

After this step, the actual typesetting and text layout is done by LaTeX or by the HTML layout engine.

To begin using the system, go to the PreTeXt site, \url{http://mathbook.pugetsound.edu}. Find the section labeled {\em Code} in the middle of the page, and click on the link ``repository.'' Click the green button ``Clone or download'' and in the resulting dialog, click on ``Download ZIP.''

Your download directory will now contain a folder named ``mathbook-dev.'' Everything you need is in this directory. Find the folder ``xsl'' inside.  Copy or move this folder to
$\sim$/Library/TeXShop/bin. And easy way to do this is to copy or move "xsl" to the desktop. Then run TeXShop
and choose ``Open $\sim$/Library/TeXShop'' in the TeXShop menu. This will show a list of subdirectories of the TeXShop directory. Drag ``xsl'' to the ``bin'' subdirectory.

Incidentally, if you decide to use PreTeXt regularly, you will discover that the author recommends updating ``xsl'' at least once a week, since this is the folder which keeps PreTeXt up to date. You can make this update happen automatically. In that case, you can either update the copy in the bin directory or rewrite the engines slightly to refer to a copy of ``xsl'' somewhere else.

Next return to  the folder ``mathbook-dev'' downloaded from the PreTeXt site. Inside you'll find a folder named ``Examples'' and inside that a folder named ``sample-article''. I recommend making a copy of the folder ``sample-article'' on the desktop. This document has an example of every feature of PreTeXt, so it is a good place to learn about the capabilities of the system. We are going to typeset this document twice, once as a pdf and once as an html file. 

The TeXShop engines like to deal with pdf and html files with the same name as the source and just different extensions. But PreTeXt documents can convert to  LaTeX and HTML documents with different names. Thus ``sample-article.xml'' will produce ``derivatives.tex'' and ``derivatives.html''. There are two ways to deal with this problem. The easiest is to rename
``sample-article.xml'' to ``derivatives.xml''. Or you can keep the name, open the file in TeXShop, find the line
\begin{verbatim}
     <article xml:id="derivatives">
\end{verbatim}
and change it to
\begin{verbatim}
     <article xml:id="sample-article">
\end{verbatim}

Now typeset with the PreTeXt-TeX engine, and again with the PreTeXt-HTML engine. Examine the source, and the two output files.

Want more? Go to the web page \url{http://mathbook.pugetsound.edu}

	










\end{document}  