Tools for the imath10 REU students.

20may10
\textit{$\C$ 2010, Prof. George K. Francis, Mathematics Department, University of Illinois} \begin{document} \maketitle \begin{document} \section{Introduction} We will be using various tools for various purposes. While there is some time to learn some of them when they are immediately needed, it is not possible to follows the advice "never learn something until it is needed" exclusively. No real work would get done in the short 8 weeks of the REU. Therefore, here is a review of what we'll use sometime, together with two additional pieces of information: where to obtain the tool and what it will be used for. \section{Documentation} We will document all work on an on-going basis. But the documentation will be part of developing a webtree, rooted in the portal page, and branching into project pages and also into your personal webpages connected to the REU. That way we'll all have a usable draft of the documentation by the end of the summer, and finishing it off for publication won't get neglected. \subsection{LaTeX} While a document can begin as an ascii file, like this one, it will be transmuted into an .html which displays proper mathematical notation based on a rudimentary subset of the LaTeX typesetting language as invented by Knuth (TeX) and Lamport (LaTeX). Please note the conventional spelling in ascii, with capitalized consonants and lower case vowels. \subsubsection{Real LaTeX} Historically, TeX consisted of three files with suffixes .tex, .dvi and .ps. Putting pictures into .ps (for "postscript") was a pain. The .tex file was and still is an ascii file. The .dvi intermediary was a binary file, and the .ps file is ascii again, but written in a language nearly incomprehensible to humans using ascii editors. Some decades ago matters were improved by replacing the second and third files by a .pdf file, which is again ascii and even more unreadable. To turn a plain ascii .tex file into the .pdf you need a LaTeX package which has to be installed separately on your computer. \subsection{texWins} There are websites where you can ship your .tex file and receive back the .pdf. In such so-called "webservices" the package exists on the remote server. One that was built right here is called "texWins", and with a little effort, you can learn how to use texWins to help you learn LaTeX itself. \subsection{MathML and fake TeX} Modern web browsers, like Firefox and IE7 or above, have a built-in language, called MathML, for "Mathematics Markup Language". This language can produce excellent mathematical typesetting on the web which is (almost) indistinguishable from real TeX. While the family of markup languages, such as MathML, XML, and HTML, are in ascii, and hence their source files (with suffixes like .xml, .html) could theoretically be composed on an ascii line editor. In fact, however, all those angle brackets make such files unreadable too. To write such files one uses tools which translate much simpler text into MathML. REU students in illiMath2008 used such a factory, called "AsciiDoc". This language also lets you compose mathematical symbols without having to learn proper TeX. While easier in the beginning, it is much harder to ever learn proper LaTeX starting with this "PidginTex". Asciidoc, like all ascii-to-MathML translators, make heavy use of Java Scripts and Cascading Style Sheets (suffixes .js and .css respectively). \subsubsection{The Pudding ... as where the proof is.} As a result, we now use now use a huge simplification of this process in the form of the tiny Pudding factory (built by two now graduated math students) consisting of just two files, named ltmml.js and ltmml.css. The ltmml is just an abbreviation for "LaTeXMathML". The design problem that ltmml solves is this: \begin{itemize} \item Begin with a .tex file with relatively modest demands on LaTeX and "put it on the web" (by embedding it inside an ltmml assisted .html file). \\ \item And conversely, after composing an ltmml assisted .html file, convert it, into a .tex file to be compiled into a .pdf. \\ \item Do both with minimal editorial effort. For instance, using only an ascii line editor, like vim, and a MathML capable browser. \\ \end{itemize} \subsubsection{texPad} One of 2 additional aids to learning how to write .tex files is a small, somewhat limited tool that uses your browser's MathML facility, just like the Pudding. Because it also has the texWins appearance, it may be useful for writing simple .tex phrases off line, when you not able to reach the webservice, texWins. \subsubsection{LaTeX examples} This is a repository of examples for real LaTeX. The way to use this is to download the examples .tex files. (If there is a .pdf too, download it so you know what it's supposed to look like.) Edit the preamble suitable for texWins, and feed it to texWins, making changes until it "works", i.e. returns the expected .pdf. \subsubsection{iPaint editor} There are many editors for making simple (iPaint for macs, Paint for pcs) changes to \textit{bitmap graphics} picture files. There are two kinds of files types in current usage. Files with suffixes like .png, .bpm, .jpg, contain information about what color to fill each pixel with in a specific region. The industry standard for an editor for bitmap files is Adobe Photoshop. When bitmaps are reduced in size they are sampled and perhads dithered to improve the smaller image. They cannot be enlarged without "pixilation", i.e. the visual distortions associated with corser graphics. By contrast, there is \textit{vector graphics} files are scaleable without distortion. They containt the instructions on how to draw the picture, rather than the picture itself. Good type setters (TeX, for example) are based on vector graphics. When you change the font size, the same TeX code generates a larger or smaller letter which looks as good as the original. The iPaint (for macs) and the Paint (for pcs) editors are the simplest of their kind for editing the former kind of files. Vector graphics files must always be edited by the proprietary editor that created them in the first place. \section{Summary} The quickest (and there most painless) way to learn LaTeX is to have lots of .tex files available for looking things up in, a convenient setup for testing typsetting your code, and access too a TeX typsetting package. An alternative is to learn LaTeX and HTML together with the help of appropriate browsers, and the two ltmml files in the Pudding. \subsection{Editor} Looking things up in a text file is invariably faster with an ascii editor like vim, because such editors are designed to be driven from the keyboard where you're typing anyway, and do not use the mouse. Secondly, scrolling is an inefficient way of finding something ina file, provided you have even a fragement of the phrase you're looking for. That is, if you also have an efficient "find" tool in the editor. Vim, for incstance, has the \textit{slash finder} in its travel-mode. You type "/foo bar" and the editor locates the first instance of "foo bar" in your text. But even with something as primitive as \textit{Wordpad} on the pc or \textit{TextEdit} on the mac, it is possible to edit and save without exiting the editor. Elsewhere, I will explain more about the advantages of a keyboard-driven editor like vim, versus a mouse-driven editor. Of course, every editor uses the keyboard to enter text. But editing is done with a mouse or keyboard shortcuts. The keyboard shortcuts are proper to the editor, of course. For example, copying and pasting is nowadays universally done with the mouse. But that is inherently slow, and contributes to carpal tunnel syndrome. Inside the vim editor, for example, copying and pasting is done from the keyboard, and is incredibly efficient. \subsection{Typesetter} Journeyman TeXistas prefer their own brand of TeX package on their personal computer. On the lab computers we have \textit{TeXShop} always available. Installing such a package on your personal computer is daunting to some. Therefore, apprentices should use texWins for a start. \subsection{Pudding} The single greatest advantage to this route is that every webpage can have its source file examined by the user. There are no secrets. But there are obstacles. If the .html file was created by a factory, and it is one you're not familiar with, then you will not be able to find the needle because the haystack is too enormous. If the .html was written by a human hand, you generally can learn to decipher it. You can even steal it, and mess with the code in you own space. An .html file is just an ascii file, but with a lot of links which will probably break when you mess with the stolen copy. By editing (vim or wordpad, your choice) the file in one window, saving it, and refreshing it's interpretation in the browser window, it's pretty fast and reliable. In the Pudding you can use proper HTML lingo, and proper LaTex lingo, but both limited by what's in ltmml.js and ltmml.css, and the capacity of your browser. \subsection{This File} This file an example for this. Anything between angle-brackets (<...>) is HTML. Anything beginning with a backslash (\\) is TeX. There is no math in this document. Look at different one for that. It has, however, one image in it, which is composed in HTML. LaTeX also has picture making features, but they are NOT implemented in the Pudding because the HTML version is quicker and easier to manage. The one here, for example, is designed to have the text flow around it. Experiment by placing the line in a different location in the text. \section{End of edition 1 of these notes.} \end{document}