\documentclass[twocolumn]{article} \title{Ben's \LaTeX\ Notes} \author{Ben Salzberg\\\texttt{ben@bluesky.com}} \usepackage{color,graphicx} \begin{document} \maketitle \font\newtimes=times at 10pt \section{\LaTeX\ in General} This file is meant to help out Textures{\newtimes \char168} users using our special \LaTeX\ set. It includes information about the \LaTeX\ system in general, how to make \LaTeX\ go faster, and some help on graphics and color. It's meant to be a supplement to the file \texttt{sample2e.tex} which you'll find in the \texttt{TeX inputs} folder, in the subfolder $\bullet$\texttt{LaTeX}, and not a replacement. You'll also need a book on \LaTeX ; several are mentioned in the last section of this document. If you can typeset and print this file, then your whole system is in pretty good shape. If you have trouble with it, then something is wrong. Make sure you have the new \texttt{LaTeX} format selected in your Typeset menu, and that the installation went well. Look at \texttt{http://www.bluesky.com/techsupport/ techhome.html} for a list of common problem areas, or write to \texttt{help@bluesky.com}, or call us at 800-982-6124 for technical help. \subsection{What is \LaTeX ?} \LaTeX$2\varepsilon$ is a bunch of macros built out of \TeX\ pieces. Leslie Lamport, the author of the original \LaTeX\, describes it this way: \begin{quote} Think of \LaTeX\ as a house built with the lumber and nails provided by TeX. You don't need lumber and nails to live in a house, but they are handy for adding an extra room. Leslie Lamport, \textbf{\LaTeX\, A Document Preparation System (2nd ed.)} page 5. \end{quote} The new \LaTeX\ is a consolidation and reorganization of all the extra \LaTeX\ stuff that was developed to work with \LaTeX $2.09$, making everything work together and all under the same roof. This is an ongoing process, although someday there may be a relatively final form: \LaTeX 3. In the meantime, there are updates to \LaTeX\ every six months. The new stuff is always available from CTAN, and it's probably a good idea to keep up-to-date. We don't update immediately after a new release, but generally within a few months. Our \LaTeX\ can provide a template for organizing your files, if you are motivated to update before we do. Blue Sky Research's \LaTeX\ set was assembled with the able help of Arthur Ogawa (Well, really he did almost all of it--thanks Art! (\texttt{ogawa@teleport.com})) who also wrote the Textures-specific pieces. These include any file with \texttt{.cfg} at the end of the name, as well as the file \texttt{textures.def} which implements much of the \LaTeX\ graphics package. \subsection{What are all these files?} The base of \LaTeX\ is made up of the documentclass files. These are indicated by the \texttt{.cls} suffix. Also in the same category are the documentclass options (like default type size options) and these are indicated by the \texttt{.clo} suffix. The next major set of \LaTeX\ files are the style files, which can cover anything from graphics inclusion to language styles to equation layouts. These style files are indicated by the \texttt{.sty} suffix. Some macros are saved with the \texttt{.def} suffix. These are usually small macros that don't quite live up to the title of style~file. Then there are all the font definition files, indicated by the \texttt{.fd} or \texttt{.fdd} suffix. (There are a lot of these, many of which you won't ever need. You can trim some of them after you determine which ones are superfluous by studying your TeX log over the course of time.) The files designated by the \texttt{.ltx} suffix are only used when \LaTeX$2\varepsilon$ is recompiled. Specifically the file \texttt{latex.ltx} is the file to $\backslash$dump compile \LaTeX$2\varepsilon$. Textures sometimes needs files that are not part of the standard \LaTeX\ distribution to get \LaTeX\ working. These files are indicated by the \texttt{.cfg} suffix. There may be other files that don't have any of these suffixes, and these can serve many different functions. The best way to find out about them is to read the CTAN source files, either the \texttt{.dtx} files or the \texttt{.txt} or \texttt{.tex} files. There are also files that are created by \LaTeX $2\varepsilon$, the \texttt{.aux} file, the \texttt{.toc} file and the \texttt{.bib} file. The \texttt{.aux} (auxiliary) file is where \LaTeX\ stores all the information about the counters (like section numbers), footnotes, bibliography entries, reference marks, and anything else that \LaTeX\ may need to keep track of. This file is written over whenever a file is typeset by \LaTeX . Whenever a document is typeset \LaTeX\ reads this file to get the information it need, and writes to it after typesetting is completed. This is why changes in the counters will not take effect until \LaTeX\ is run twice, because the .aux file is not up to date the first time. The \texttt{.bib} file is where all the bibliography information is kept. You can either make this file yourself, or you can use BibTeX to create the file. The \texttt{.toc} file contains all the information needed to create the Table of Contents. This file is created when \LaTeX\ sees the command $\backslash$tableofcontents, and the section names, numbers and page numbers are all read from the \texttt{.aux} file. \section{Recompiling the \LaTeX\ Format} If you should ever need to recompile your \LaTeX\ format, I have included a folder called \texttt{% LaTeX2e Sources} which contains the files need for recompilation (minus \texttt{hyphen.tex}, which should be in your \texttt{TeX inputs} folder. You shouldn't need to do this unless you're using the \texttt{babel} package or you get a new version of Textures{\newtimes \char168} which gives you the incompatible format file message. The format that comes with our \LaTeX\ set is already ``fat'', compiled for both the regular and PowerPC versions of Textures{\newtimes \char168}. To recompile \LaTeX : \begin{enumerate} \item Make sure that Textures{\newtimes\char168} has at least 6500 Kb (you can change this in the Get Info window in the Finder). \item Open the file \texttt{latex.ltx}. \item Make sure Flash Mode is not checked. \item Make sure \texttt{VirTeX} is picked under the Typeset menu. \item Typeset the file. You'll get a Finder dialog box asking you to save the new format. \item Save the format with the name \texttt{LaTeX} \end{enumerate} Next time you launch Textures, you'll see the new format in your Typeset menu. \section{How can I get \LaTeX$2\varepsilon$ running faster?} \LaTeX$2\varepsilon$ is much larger, and much slower with Textures than \LaTeX 2.09 (until it starts typesetting!), but there are several ways of making it run faster. Most of the overhead is in the Macintosh file system, which is slow to find and open the many input files required by \LaTeX$2\varepsilon$. The easiest way to speed \LaTeX\ is to give Textures more memory --- 4500K is a good size. \subsection{Compiling your usual macros into the format} $\backslash$\texttt{dump} a new format which already includes your usual preliminary declarations. (David Carlisle has created a \LaTeX\ file to do this called \texttt{mylatex.ltx} which is available from CTAN in the \texttt{/latex/contrib/supported/carlisle} folder.) For my example I will use article style and load the Lucida fonts package and the color package, so I want to make a \texttt{LucidaArtColLaTeX} format so this will go faster. First I enter the \LaTeX\ code and $\backslash$\texttt{dump} ``on top of'' \LaTeX\ (i.e. with \texttt{LaTeX} selected as the format)---don't forget to give Textures plenty of memory before doing this: \begin{verbatim} \documentclass[12pt]{article} \usepackage{color} \usepackage{lucidbry} %\begin{document} % see the note below about adding this \dump \end{verbatim} Then I save the format as \texttt{LucidaArtColLaTeX}, then I make an alias of the $\bullet$\texttt{LaTeX} folder and rename it $\bullet$\texttt{LucidaArtColLaTeX}. Now I can select the format under the typeset menu (and try to remember not to reenter those commands again). \emph{Important!} If you include $\backslash$\texttt{begin\{document\}} before $\backslash$\texttt{dump}-ing, the format won't make \texttt{.aux} files properly. If you remove that command before dumping it will work properly, but a little slower, but still faster than before. A customer told me recently that he has two formats, one that he writes in with Flash mode on and the $\backslash$\texttt{begin\{document\}} command included in the format, and the other for final processing without the command (which gets the .aux file right). \section{Using the psfonts packages with Textures and \LaTeX$2\varepsilon$} \emph{\textbf{Important!}} If you want to use the cool font packages like times or palatino, you'll need to go get Constantin Kahn's ``lw35psnfss'' and ``8r reencoding'' metrics suitcases from CTAN, in the /fonts/psfonts/textures directory. We do not have permission to distribute these files. Two CTAN sites: \texttt{ftp.dante.de} and \texttt{ftp.cdrom.com}. Once you're on, look for the \texttt{tex} area. To use any package with Textures, you'll need to load in in the preamble of your document. For example, to use the \texttt{times}, \texttt{graphicx} and \texttt{color} packages, add the line \begin{verbatim} \usepackage{times,graphicx,color} \end{verbatim} anywhere in the preamble of your document. \section{Using the graphics and color packages} Textures{\newtimes \char168} supports many of the new features of the graphics, graphicx, and color packages; it doesn't support all of them. The best way to find out is to try them! Remember that most of these manipulations rely on \textsc{PostScript} code to do their magic, and the Macintosh{\newtimes \char170} doesn't really support \textsc{PostScript} in any meaningful way. Thus, things like \rotatebox{30}{rotation} and \resizebox{50pt}{10pt}{stretching} out text will show up in \textsc{PostScript} output, but not on the screen or when printed to a non-\textsc{PostScript} printer. Most of the graphics and color features are well documented in the file \texttt{grfguide.tex} which you'll find in the \texttt{docs} folder. \subsection{Including EPS files} It's easy to include EPS files using the graphics or graphicx package. Using this method will work well for EPS files (it won't work for PICT or items in the pictures window yet) and will definitely be portable to any other system running \LaTeX . The most basic command is: \begin{verbatim} \includegraphics{smallrose} \end{verbatim} If you'd like to use more advanced features like rotation and scaling, they're available too. The graphicx package is the one to use for these features, as the syntax is much simpler and the scaling will show up in your preview window (only scaling will show up, not rotation). Here's an example with the smallrose pictures scaled to 50\% and rotated 30 degrees: \begin{verbatim} \includegraphics[scale=.50,angle=30]% %this is graphicx syntax {smallrose} \end{verbatim} \includegraphics[scale=.50,angle=30]{smallrose} There are many more options available, many of which are supported. For more documentation on these, please read the \texttt{grfguide.tex} file. \subsection{\textcolor{red}{Colour?}} \LaTeX\ already has some colors defined: \textcolor{red}{red}, \textcolor{green}{green}, \textcolor{blue}{blue}, \textcolor{cyan}{cyan}, \textcolor{magenta}{magenta}, \colorbox{blue}{\textcolor{yellow}{yellow}}, and \textcolor{black}{black}. In addition, you may define your own colors. \texttt{grfguide.tex} also tells how to do this: \begin{verbatim} \definecolor{purple}{rgb}{0.8,0.0,0.8} \end{verbatim} \definecolor{purple}{rgb}{0.8,0.0,0.8} And now we can use \textcolor{purple}{purple}. See the \texttt{Crayola} files for some more color ideas. \section{For Foreign Language Users} There is a package called \texttt{babel} which allows you to load multiple hyphenation pattern files for use with languages other than English. Instructions on how to unpack \texttt{babel} and recompile \LaTeX\ using the new patterns are in the \texttt{install.txt} file inside the \texttt{babel} folder, which is inside the $\bullet$\texttt{LaTeX} fdolder, inside your \texttt{TeX inputs} folder. We can't provide an EC font set at this time, so the T1 encoding can't be used with Textures as it is. There is a set of EC fonts in bitmap form provided by Uwe Schmock which would allow one to use the \texttt{t1enc} package. To use them one would first need to install the fonts and metrics, then unpack \texttt{ec.ins}, place the resulting unpacked files into the \texttt{LaTeX2e Sources} and recompile the format. This would allow words conataining diacritical marks to be properly hyphenated. \section{Final Notes} You'll notice that the name of this file has a lot of periods in it. This is to make a point about filenames: Textures{\newtimes\char168} doesn't like filenames with spaces in them. Don't give your \LaTeX\ files names with spaces in them! If you're writing a book, or would like to use the MakeIndex or BibTeX programs, please look at the FrogKing example. It is an example of the book format, and includes a table of contents, an index, and a bibliography as well as instructions on how to use the extra software. There's a bunch of useful information on our web pages, and sometimes that's the fastest way to solve a problem. look at \texttt{http://www.bluesky.com/ techsupport/techhome.html} for a list of common problem areas. There's a page for \LaTeX\ problems there, and for fonts and printing and many others. There are also links to CTAN sites and info-mac sites, good places to download software. You really need to have a separate book about \LaTeX\ to be able to use it. We have several books for sale, or you can look for them at your local bookstore. For the beginning \LaTeX\ user, and for general reference I recommend Leslie Lamport's \textbf{\LaTeX\, A Document Preparation System (2nd ed.)}. It's the book I check first when I have a question. Thicker and more advanced, but less easy to use, are \textbf{The \LaTeX\ Companion} by Goosens, Middlebach and Samarin and \textbf{A Guide to \LaTeX $2\varepsilon$} by Kopka and Daly. These last two books are recommended for the advanced \LaTeX\ programmer, who wants to fiddle with more of \LaTeX 's default parameters, or even write their own classes and packages. Finally, if all this is overwhelming, you can pay someone to help you with your documents. This may really be worth it if you're preparing a book, even if you can do most of it yourself. I recommend Art Ogawa (\texttt{ogawa@teleport.com}, 209-561-4585) but there are others. Some are listed on our TeX Wizards web page, linked from the Services page at \texttt{http://www.bluesky.com}. Thanks for reading! I'd love to hear some feedback. Please write to \texttt{ben@bluesky.com} with comments, suggestions, and especially kudos :-) \end{document}