OH MAN, SO I'VE SEEN YOU ALL BEING LIKE, "I'MMA GONNA TAKE ALL MY NOTES ON LATEX ON MY LAPTOP IN CLASS WEARING SUNGLASSES TRYING TO KEEP THIS BUSGOING OVER 50 MPH SO WE ALL KEEP OUR LIVES" AND I WAS WONDERING HOW I COULD BE AS COOL AND EGOTISTICAL AS YOU?

Well, if that actually was your question, you're in luck, and you better put on your sunglasses, because me and Friend Dino are gonna tell youhow to LaTeX like the COOL KIDS (tm).

TABLE OF CONTENTS

Getting Started
-How Do I Get Started With LaTeX?
Main LaTeX Sites
-Where Can I Download LaTeX?
-How Can I Learn LaTeX?
-Where Can I Find Examples?
-Which Command Does X?
LaTeX Editors
-What Editors Can I Use To Tex?
-Why Is Vi The Best And Emacs For Losers?
-Where To Find The LaTeX Suite
-What's a Good Vimrc setup?
Tips
-What Are Macros? What Are Some Good Ones?


How Do I Get Started With LaTeX?
First step is to go to a download site for TeX packages, and put them on your computer. If you're using Windows, it's fairly straightforward point and click. If you're using Linux, search through your package manager of choice (you poor, poor Gentoo fools) for TeX and download.

You can use this as is. If you go into tex's bin folder there should be a latex2pdf compile exe that you can use if you're a Windows user. This involves putting the file in that folder and compiling it that-a-way. If you're using vi or emacs you can set commands to automatically do that; but it will take a while to do.


Where Can I Download LaTeX?
http://www.tug.org/texlive/


How Can I Learn LaTeX?
LaTeX is fairly simple and works just like HTML. Only instead of covering up commands with brackets, you cover them with $'s.

A typical TeX file will look like the following:

Long rambling preamble, first include the packages you want to include, then use the \newcommand to make whatever macros you want (more on macros later). There are no $ here.
\begin{document}
Type like you normally would here. If you want extra space inbetween your lines, use $\newline$ inbetween each line. Whenever you activate a command here, or generally want to go into math mode, surround things by $'s.
\end{document}

That's pretty much the general outline. To learn more, look up other people's code and steal from them, or look up cheatsheets to find out what the LaTeX commands are.


Where Can I Find Examples?
Here's a sample TeX file from yours truly:

http://www.math.purdue.edu/~dimberti/sample.html


Which Command Does X?
Here's a great site to figure that out:

http://detexify.kirelabs.org/classify.html


What Editors Can I Use To Tex?
Use any of the common text editors. Vi, emacs, eclipse, pico, nano, or notepad. Although it is technically possible to use any of the ones I just mentioned, some are easier to use than others. That previous statement included both in the long run and short run. For example, although it may seem easier to use notepad in the short run, it will hurt you in the long run. Specifically, if you're running Windows and are using notepad to made LaTeX documents, you're process might go like this:

(1) Write .tex file using notepad.
(2) Move .tex file to corresponding tex-live/bin folder to compile.
(3) Compile. Most likely, since you're new at this (no offense intended), there will be bugs.
(4) Re-open .tex file, count the line numbers by hand, try parsing the errors one by one.
(5) After a while, because notepad/nano/pico don't have automatic highlighting and error recognition, you will realize that you've spent the last half hour trying to find a missing dollar sign.

This is why you should suck it up and use some advanced editor like vi, emacs, or eclipse. They come with advanced debugging, highlighting, word completion, etc. that help you write this tex files really, really fast. Yes, there is a high learning curve, these things come at some cost after all; but trust me, you will be saving yourself in the long run. Vi and emacs have their own built-in tutorials you can use, it shouldn't take more than an hour to get the basics down. After a while you'll slowly learn how Vi or the other advanced editors work through seeming osmosis and the above features I mentioned will help you out a lot in the future.


Why Is Vi The Best And Emacs For Losers?
O.k., so this section isn't really needed. The honest answer is that you should choose the text editor that's right for you!

Heh.

Eheheh.

BWAHAHAHA

AS IF EMACS WERE A TEXT EDITOR, AAAAAHAHAHAHAHAHAHAHA!

O.k., but seriously, why do I care? What opinion do I have on the matter? And I will admit, this is just my opinion here...

\begin{rant}

Aren't emacs and Vi very similar after all? I mean, one use meta tags like crazy and the other uses all of these modes and colon creations likecrazy. One is meant for lisp and the other for C, and their style and purpose reflects this. Bottom line: emacs is a good OS, but it has yet tomake a good text editor. The hyperactive feature creep and availability to do almost anything sounds good in theory, but in practice this is thedouble-edge sword. While going for versatility, emacs has created a system that, like the jack-of-all-trades, is good at everything butspectacular at nothing. It seems like a limiting feature, but in harnessing its scope directly to text editing, Vi has focused its energies,attention, and productivity capacities to one thing, thus making it good in that area. It is a practice of passive and active management. So emacs, were it to consciously try to improve its ability as a text-editor, would have to make a very active such approach to programmers in the area to do so, and not port ALICE into lisp for emacs to run or other such silly unnecessary add-ons. Meanwhile, Vi has a passive management on such affairs. By making it not possible, without its mission scope and structure of the program itself, to create such unnecessary bloat, it harnesses its talents and latent ability of those working on the Vi project to do what it's honestly set out to do: build a good text-editor. And that it is.

(Note: my thoughts on passive/active management line up with my thoughts in productivity on using willpower v. environmental factors. Namely, weare the first mammals to use tools to influence our environment, we don't use brute force on every problem (no matter how much you think you're liking combinatorics at the moment); so, in a way, I'm kind of saying that Vi is the next step in human evolution here.)

This is a fact shown also in the design of the programs themselves. Vi has a very modal nature. There is a command mode, text editing mode, etc..And for good reason, after all, you are already in a certain mode by simply opening various programs and utilizing the API of your OS. When youuse emacs, all modes are open, which although it sounds empowering, it is in fact overwhelming. There is a reason we as humans don't multitask,specialize, and depend so heavily on trade and the division of labor. In the same way Vi embelishes this philosophy. Modal nature does notrestrict our pathway for thinking, it defines it and therein makes thinking possible. The thought process that modal nature and strict typing are hampers to our possibilitiesis like saying, "Making the definition for a limit was a bad turn for mathematics, because it hampered our ability to think about limits in anyother way." This is insane. This kind of nonsense thinking has to stop. We do not cast in stone to omit the possibility that such work can be amended.

In other words, the philosophy of Vi is very similar if not indistinguishable from the forces of organization in human soceity, from moderncivilization itself!

So use Vi already.

\end{rant}

A counterargument

You can find Vi at http://www.vim.org. Also, note that there are a lot of plugins you can download just like withFirefox. A lot of these are pretty useful (check out the ctags plugin!).


Where To Find The LaTeX Suite
Hey, did I mention Vi has its own set of macros, commands, shortcuts, etc. built into an add-on package? I didn't? O.k., note that I'm mentioning it now, and furthermore I really highly suggest it. It will automatically color in and highlight your $'s (a HUGE help when texing), it has built in macros (for instance, you only have to type in three letters instead of \begin{array}{cc...c}blabla&blabla&..&blabala\\...\end{array} mess), and when you're ready to compile, just type \ll and it will tell you your compilation errors at the bottom of the screen and compile directly into the same folder. It's absolutely fantastic and is the perfect reason to use Vi in the first place once you have it set up.

Here it is: http://vim-latex.sourceforge.net/

Also, in setting up, you'll probably want to output to .pdf instead of .dvi. To do this, and save you some time, change line 91 of vim/ftplugin/latex-suite/tex.vim from 'dvi' to 'pdf'.


What's a Good Vimrc setup?
There is a 'map' function in Vi that you may want to use so you don't have to type out so much stuff. For instance, I have a key-map on Vi that maps my F2 button so that when I press F2 in Vi, it will automatically type out my preamble, set up my document, and put my cursor on the author line; all with one key press! Also, you'll want to make sure to activate color highlights, and this is done in the vimrc file. To make this easier, below is my vimrc file:

" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimcurrent/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! archlinux.vim


" For more option refer to /usr/share/vim/vimcurrent/vimrc_example.vim or the
" vim manual

:syntax on
:color elflord
:map ggi\documentclass{article}\usepackage{amsfonts,amssymb,amsmath,amsthm,enumerate,mathrsfs}\newtheorem{thm}{Theorem}\newtheorem{coro}{Corollary}[thm]\newtheorem{claim}{Claim}[thm]\newtheorem{lemma}{Lemma}[thm]\theoremstyle{remark}\newtheorem*{dir}{}\newtheorem*{case}{Case}\newtheorem{ex}{Example}[section]\newcommand{\defn}[1]{\paragraph{#1}\index{#1}}\newcommand{\defindex}[2]{\paragraph{#1}\index{#2}}\newcommand{\defnf}[1]{\paragraph{#1:}\index{#1}}\newcommand{\ra}{\rightarrow}\newcommand{\la}{\leftarrow}\newcommand{\halmos}{\qedsymbol}\newcommand{\ve}[1]{\vert#1\vert}\newcommand{\bd}[1]{\mbox{ }\mathbf{#1}}\newcommand{\s}[1]{\mbox{}\mathbf{#1}}\addtolength{\voffset}{-1cm}\addtolength{\hoffset}{-2cm}\addtolength{\textwidth}{4cm}\addtolength{\textheight}{2cm}%opening\title{}\author{DavidImberti}\begin{document}\maketitle\begin{flushleft}\end{flushleft}\end{document}?titlen$i
:filetype plugin indent on
:set grepprg=grep\ -nH\ $*
:let g:tex_flavor = "latex"


What Are Macros? What Are Some Good Ones?
You should check out my sample .tex file up there, that should answer this question, check out what kind of macros I have in my preamble. The main point here is to just notice what commands always take you a long time to write out, and then use the \newcommand in your preamble to change the name to something shorter or faster for you. If you'll notice, in my preamble, I have a lot of automatic bold/italic stuff (like \s) to make formatting for theorems and proofs to go easier. You'll also notice that, I kind of break format and I don't use the \newtheorem command. A lot of this is, in the end, up to you to expirement and find out what takes you longest and use that information to use basic macros to help you tex faster.


Go Back.