\documentclass[twocolumn]{article} \font\newtimes=times at 6pt \newcommand{\regtm}{\raisebox{3pt}{\newtimes\char168}} % these two lines define the ¨ (registered trademark) symbol \title{Ben's \LaTeX\ Notes} \author{Ben Salzberg\\\texttt{\href{mailto:ben@bluesky.com}{ben@bluesky.com}}} \usepackage{color,graphicx,times} \usepackage{hyperref} \begin{document} \maketitle \section{\LaTeX\ in General} This file is meant to help Textures\regtm\ users use 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} 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{\href{http://www.bluesky.com/help/} {http://www.bluesky.com/help/}} for a list of common problems, or write to \texttt{\href{mailto:help@bluesky.com}{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, meant to make it easy to create articles, books, and other such structured documents. 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 \textsc{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{\href{mailto:ogawa@teleport.com}{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. In the same category are the documentclass options (like default type size options) 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} 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 compile (or ``dump'') \LaTeX$2\varepsilon$. Textures sometimes needs files that are not part of the standard \LaTeX\ distribution to get \LaTeX\ working. These file 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 \textsc{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$ e.g. \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 needs, 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 .\texttt{aux} file is not up to date the first time. (Textures 2.0 has a typeset option called ``LaTeX Mode'' which typesets twice.) 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}. You shouldn't need to do this unless you're using the \texttt{babel} package (more on this later) or you get a new version of Textures 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. To recompile \LaTeX : \begin{enumerate} \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 (unless something goes wrong, e.g. Textures might need more memory.) \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. \subsection{Recompiling with the \texttt{babel} package} The \texttt{babel} package allows you to use multiple languages within a single document, and have \TeX\ hyphenate them properly. In the \texttt{LaTeX2e Sources} folder you'll find a file called \texttt{language.dat}. It's set up to only load hyphenation patterns for American English, but it can be configured to load patterns for almost any language. I've included patterns from \textsc{ctan} in the folder. The following is an example version of \texttt{language.dat}. The example loads US, UK, German, French, and Italian hyphenation. You will need to modify the file \texttt{language.dat} for your particular needs; you probably don't need all those! Edit the file and save it where it is. \begin{verbatim} % File : language.dat % Purpose : specify which % hyphenation patterns to load % while running iniTeX english UShyphen.tex ukenglish ukhyph.tex german ghyph31.tex french frhyph.tex italian ithyph.tex \end{verbatim} Once you have edited \texttt{language.dat} for your needs, just follow the normal instructions for recompiling \LaTeX. You'll see messages in the log for the various patterns. How do you use \texttt{babel}? I don't know. Please read the file \texttt{babel.dvi} in the \texttt{LaTeX Documentation} folder for help. \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 to make it run faster. The easiest ways to speed up \LaTeX\ are to give Textures lots of memory and increase the disk cache size in your Mac's Memory control panel. \subsection{Compiling your usual macros into the format} The biggest speed boost will come if you $\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}; it's on the CD.) 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}, make an alias of the $\bullet$\texttt{LaTeX} folder, and rename it $\bullet$\texttt{LucidaArtColLaTeX} (to match the name of the format.) Now I can select the format under the typeset menu (and try to remember not to re-enter those commands). \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 \texttt{.aux} file right). \section{Using the graphics, color, and hyperref packages} Textures supports many of the new features of the \texttt{graphics}, \texttt{graphicx}, and \texttt{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{graphics} which you'll find in the \texttt{LaTeX Documentation} folder. \subsection{Including \textsc{eps} files} It's easy to include \textsc{eps} files using the \texttt{graphics} or \texttt{graphicx} package. Using this method will work well for \textsc{eps} files and will definitely be portable to any other system running \LaTeX . The most basic command is: \begin{verbatim} \includegraphics{smallrose} \end{verbatim} You can use Macintosh \textsc{pict} files, but your file won't be as portable and you'll need to include the \texttt{natheight} and \texttt{natwidth} parameters, e.g. \begin{verbatim} \includegraphics[natwidth=4.44in,% natheight=3.33in]{racecar.pict} \end{verbatim} More advanced features like rotation and scaling are available too. The \texttt{graphicx} package is the one to use for these features---the syntax is 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 picture scaled to 50\% and rotated 30 degrees: \begin{verbatim} \includegraphics[scale=.50,angle=30]% {smallrose} \end{verbatim} \includegraphics[scale=.50,angle=30]{smallrose} % here the file is really included There are more options available, some of which are supported. For more documentation on these, please read the \texttt{graphics} 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}. You may also define your own colors; \texttt{graphics} 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. \subsection{Using the \texttt{hyperref} package} Textures 2.0 some of the hyperref package. To use the hyperref package, simply include the following in the preamble of your document: \begin{verbatim} \usepackage{hyperref} \end{verbatim} Here is a sample link, where Blue Sky is the text that will anchor the link: \begin{verbatim} \href{http://www.bluesky.com}{Blue Sky} \end{verbatim} When you Command-click on a link, Textures will use Internet Config to open your preferred web browser. If you don't have Internet Config installed, you will need install it (it is on the Textures 2.0 CD in the \texttt{CD Extras} folder). More information of the \texttt{hyperref} package can be found in the file \texttt{Hyperref guide}, which is in the \texttt{\LaTeX\ Documentation} folder inside of the \texttt{\LaTeX\ support} folder. \section{Using Other Packages} Our \LaTeX\ set does not include every available package. Many of them can be found under the \texttt{contrib} directory on \textsc{ctan}, which I've downloaded and included on the CD in the \texttt{CD Extras} folder. In general you'll want to typeset the \texttt{.ins} file for the package you're interested in. \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' \LaTeX\ 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, index, bibliography, and instructions on how to use the extra software. There's a bunch of useful information on our web pages: Look at \texttt{\href{http://www.bluesky.com/help/}{http://www.bluesky.com/help/}} for a list of common problem areas. There's a page for \LaTeX\ problems there, and for fonts and printing and many others. You really need to have a 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. For the advanced \LaTeX\ programmer who wants to play with \LaTeX 's default parameters (or even write their own classes and packages) I'd recommend \textbf{A Guide to \LaTeX$2\varepsilon$} by Kopka and Daly. 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{\href{mailto:ogawa@teleport.com}{ogawa@teleport.com}}, 209-561-4585) but there are others. Some are listed on our \href{http://www.bluesky.com/wizards/texwizards.html}{TeX Wizards web page}. Thanks for reading! I'd love to hear some feedback. Please write to \texttt{\href{mailto:ben@bluesky.com}{ben@bluesky.com}} with comments, suggestions, and especially kudos :-) \end{document}