Categories
Life

Recovery of a technical post

The material below was originally part of a page in my economics-oriented site. Since it suddenly stopped been displayed there, I am attempting to resurrect it here as a stopgap measure.

What is \text{\Large \LaTeX}?

\LaTeX is a free software package for typesetting documents for printing and for on-screen viewing. It is particularly strong for documents that involve a lot of mathematical expressions, but it also pays serious attention to refined aspects of typesetting. Documents typeset with \LaTeX are considerably more beautiful than documents created in any word processing application. Mathematicians, physicists, chemists, economists, and many other scholars use \LaTeX to typeset their works due to its superiority and free availability.

\LaTeX is a package based on the computer application \TeX, created in 1978 by Donald E. Knuth. The original author of \LaTeX is Leslie Lamport, but now \LaTeX is maintained by others. Please visit http://www.latex-project.org/ for the history of \LaTeX and other related information. Knuth chose the name TeX because of the ancient Greek word τέχνη, which means art. People who know this pronounce TeX as “tech”, not “tex”. Knuth made \TeX freely available and it became one of the earliest and most successful open source software programs, around which there also sprang an amazingly large collection of extensions and packages, of which \LaTeX is a particularly successful example that lets you pay attention to creating content, while leaving the details of typesetting to professionally created templates.

A very good introduction to \LaTeX is the Not-So-Short Introduction to LaTeX 2e.

I have been using \LaTeX over many years to typeset papers, presentations, lecture notes, and a book.

Sources for downloading \text{\Large \LaTeX} and related programs free of charge

The version of \LaTeX you will need in order to create and typeset documents depends on the operating system you run on your computer. Here are some good choices, arranged by operating system.
TeX Live 2009 – runs on every widely used operating system (Linux, other versions of UNIX, Mac OS X, Windows).
For those who use Windows, you can instead download miktex.
For the Max OS X, the best setup is MacTeX, which adds some very good tools to the TeXLive 2009 distribution. It includes the excellent \LaTeX development environment TeXShop (\LaTeX editor with a well-integrated previewer).
For editors I recommend Emacs (see below if you are using a Mac), Kile or Emacs on Linux, and LEd or Texniccenter on Windows. Winedt is an old favorite for Windows, but is is not free (shareware) and it is showing its age. TeXLive these days comes with TeXworks, which attempts to provide a development environment like TeXShop for all operating systems. It still has some rough edges. A special ability of Emacs, when the AucTeX emacs package is installed, is the ability to show equations and images within the text document as you prepare it, sparing you the need to keep compiling your document very frequently to see the output of your work.
For the hardy souls who are familiar with Emacs, the Aquamacs version for Mac OS X is by far the best Emacs implementation I have seen, and I have tried Emacs on Linux, Windows, and the Mac. In fact, it is so well configured that you don’t really need to be a hardy soul to use it.

ADDITION: After the 3/3/2010 presentation at Temple University, Sandeep Bhaskar suggested that I should add a mention of the TeXmaker program for composing, compiling, and previewing \LaTeX documents. It has graphical ways of entering commands that you may find hard to remember and runs on every widely-used operating system.

Tutorials and Examples

You create documents in \LaTeX by editing a text file with extension .tex. It is a good idea to avoid spaces in the name of the file. It is also a good idea to avoid word processors and instead use a text editor for this; I offered suggestions of editors earlier. A particularly problematic aspect of using a word processor for a .tex document is that most of them are configured to use curly apostrophes and other special marks that are most likely going to be misinterpreted by \LaTeX. Do not worry, \LaTeX will convert apostrophes to curly ones and will make many other beautifying changes to your text automatically, according to its professionally designed templates. Another advantage of text editors specially made for \LaTeX work is that they highlight commands in color and can automatically match braces, thereby reducing substantially the number of \LaTeX-syntactical errors that you make. The editors also have boilerplate embedded in special macros (these differ by editor) to save you typing; for instance, if I want to insert a bulleted list in my document and I am using Emacs, I type Ctrl+E and then “itemize” (without the quotes), causing Emacs to insert

\begin{itemize}
\item
\end{itemize}

and to put the insertion point right after the \item command for me to type the text of the first bulleted item.

I offer now some hints for creating various kinds of documents. My examples come in two parts: the .tex file and the resulting .pdf output file.

Workflow

The typical workflow in composing \LaTeX documents is as follows.

  1. Start with a template, maybe one of my examples below.
  2. Add text and formulas.
  3. Compile it with PDFLaTeX (each editor listed above provides a simple, one-click way of doing so).
  4. If you have added citations using BibTeX, run BibTeX (your editor should provide a simple, one-click way of doing so).
  5. If you ran BibTeX, run PDFLaTeX twice now, to resolve cross-references. (\LaTeX deals with cross-reference information by writing it into a file first, which it then needs to read to incorporate that information back into the document.)
  6. If you get error messages, do not panic. You probably mismatched braces or mistyped commands. Your document is still there, no matter how many errors you got. Google is your friend as you try to figure out errors, and the not-so-short introduction to \LaTeX mentioned above has some advise on dealing with errors, too.
  7. Preview the ensuing PDF. I recommend strongly against using Adobe Reader. It is slow, unsafe, and locks the files it has open, making it hard for you to repeat this process. Foxit Reader is a good alternative on Windows, and another good one and open-source to boot, is Sumatra. The Mac OS X system provides Preview, its own PDF reader that works very well (or you can download the free Skim which is also an excellent PDF reader); of course, you can just use the integrated PDF reader in TeXShop. On Linux good alternatives are Evince, xpdf, or Okular, which is the native previewer of Kile.
  8. Repeat as needed.

Do not get worried that the compilation process will be slow. Modern computers are amazingly fast doing this. On my computers, I can typeset a 300-page book in about 5 seconds.

Composing papers

There are many choices for papers, some based on the default LaTeX article document class, others on different \LaTeX document classes. Here is an example (and the PDF output generated by compiling it with PDFLaTeX, the default variant of the \LaTeX compiler) based on some lecture notes of mine, with portions removed to make the file shorter. Even after the removals, the file shows you the use of many interesting packages, such as setspace for declarations such as \onehalfspacing or \doublespacing, fourier for a nice collection of fonts (try commenting out the line \usepackage{fourier} by typing % in front of it and recompile to see the default \LaTeX font set) and the wonderful graphics package tikz (written, like Beamer, by Till Tantau, who also wrote a fantastic manual for tikz).

Bibliographies

The creation and maintenance of bibliographies is easily automated in \LaTeX via the program BibTeX. Here is an easy introduction. There are also programs that help with the creation and maintenance of the .bib file that you will need to have to use BibTeX. A good one that runs on Java, and so can be used on many operating systems, is Jabref. It is a good idea to start work on your bibliography as you start composing the paper itself. You can then take advantage of the automation of bibliography management that \LaTeX offers when used in conjunction with BibTeX.

Making presentations

There are several presentation packages for \LaTeX. My favorite, and the one most \LaTeX-savvy economists use for their presentations, is called Beamer. A tutorial for Beamer can be found at here(PDF). I also strongly recommend the Beamer manual, written by Till Tantau, the creator of Beamer, which should be in your TeX installation (and is easily found via a Google search if it is not). It is one of the best software manuals I have encountered; do not be put off by its length, it is lengthy in order to be clear and to cover all the myriad features of Beamer.

Here is an example Beamer presentation with the source file (.tex file) and the file’s PDF output.

Lecture Notes on the Fly

I have not used \LaTeX in this way, but someone else has. The linked article has a treasure trove of good advice on how to make your creation of LaTeX documents more efficient and accurate.

List of Symbols Available in \text{\large \LaTeX}

There is a comprehensive list.

CTAN

This acronym stands for the Comprehensive TeX Archive Network. There you can find an unbelievably extensive collection of informative documents, packages, fonts, and software related to all things \TeX / \LaTeX.

Categories
Life Science

Mathematical formula predicts clear favorite for the FIFA World Cup

Mathematical formula predicts clear favorite for the FIFA World Cup. OK, it’s a little hard to believe that people have been collecting this level of detailed ball-passing data, but I guess so much money is involved with soccer that it all makes sense.

Update: The prediction was correct. (I thought the final itself was a horrible match.)

Categories
Computer stuff

Google Lays Out Its Mobile User Experience Strategy – Mobile Blog – InformationWeek

I found this on Kottke.org. Link to the full article at end. It has good advice for web designers and web app designers for mobile applications, and it may well be good to think about for my own purposes as the Lyric Fest redesign work continues.

“Understanding users, anywhere, anytimeRechis said that Google breaks down mobile users into three behavior groups:

A. “Repetitive now”
B. “Bored now”
C. “Urgent now”

The “repetitive now” user is someone checking for the same piece of information over and over again, like checking the same stock quotes or weather. Google uses cookies to help cater to mobile users who check and recheck the same data points.

The “bored now” are users who have time on their hands. People on trains or waiting in airports or sitting in cafes. Mobile users in this behavior group look a lot more like casual Web surfers, but mobile phones don’t offer the robust user input of a desktop, so the applications have to be tailored.

The “urgent now” is a request to find something specific fast, like the location of a bakery or directions to the airport. Since a lot of these questions are location-aware, Google tries to build location into the mobile versions of these queries.”

via Google Lays Out Its Mobile User Experience Strategy – Mobile Blog – InformationWeek.

Categories
Life

Few Are Coming to See Greece’s Modern Olympic Ruins – WSJ.com

Few Are Coming to See Greeces Modern Olympic Ruins – WSJ.com. So now we have the ancient ruins and the folly of 2004 ruins. Nice.

Categories
Life

WordPress 3.0

As of today, version 3.0 of WordPress is released. I upgraded the blog and shifted it to the new default Theme, which I find very appealing.

Categories
Life Science

Infographic about the Gulf of Mexico disaster

This infographic gives a nice perspective on the ongoing disaster in the Gulf. HT to Mona Nomura, on whose posterous blog I first saw it.

Categories
Books

Books I read recently

The semester is over and finally I can read books outside my required reading list for work. I have managed to read two books cover-to-cover:

  • Bursts, by Albert-László Barabási, and
  • How the Economy Works: Confidence, Crashes and Self-Fulfilling Prophecies, by Roger Farmer.

The first is from the former physicist who made his name with some incisive work on the growth of social networks, followed by his very popular book Linked. His latest, Bursts, is even better than Links in how it tells the story. The story is based on Barabasi’s latest research. It talks about the predictability of our decisions. For instance, it explains why the time intervals between repetitions of an action (say, sending an email or making a phone call) do not follow the standard Poisson process that many events in nature follow. State this way, the book appears boring, but it is chock-full of great examples and stories and you would enjoy reading it just for those.

The second is from the chair of the UCLA department of economics. It is the second of two books by Farmer, both of which appeared in the last couple of months. In this one, Farmer presents his theory of macroeconomics that attempts to understand economic crises like the Great Depression and the recession of 2007-????. His theory is well presented, with a nice overview of standard macroeconomics given first to provide background. If there is a book that the average non-economist should read to understand what macroeconomics has been up to in the last century or so, this is it. It did make me buy his other book, which presents the technical version of his theory; currently it is on top of one of the two tottering piles next to my bedside.

Categories
Computer stuff

Welcome to our velvet prison, say the boys and girls from Apple. – By Jack Shafer – Slate Magazine

Jack Shafer wrote an excellent article in Slate about the closedness of the new devices that Apple is foisting on us. Welcome to our velvet prison, say the boys and girls from Apple. – By Jack Shafer – Slate Magazine. I hope people continue to buy the excellent Mac computers that Apple makes, which are open platforms, and shun the iPad until it also becomes open. Wepad, from Germany, is supposed to come out in the summer and be based on ANdroid/Linux. I am waiting for that, or any other open tablet device, and I will gladly accept inferior battery life to have openness. Also, I could easily move on to an Android phone, and I hear another great one is coming along soon.

Categories
Books Computer stuff

The threat of closed digital devices, iPad version

Today the lame jokes about Steve Jobs being Moses carrying the iTablet down from the mountain turned quickly to much lamer jokes about iPads and feminine hygiene. But I think the name was not the only reason for this negative response. There are various ways that the iPad delivered less than was expected and definitely less than it could have. Instead of an open platform, like Apple’s superb Mac line of computers, it is an overgrown iPod Touch. It restricts you to the applications Apple approves. I don’t care that there are 140,000 of them; I care about the ones that will never be because of the Appstore Cerberus. Also, what’s with the refusal to allow multitasking? Under the constraints of a device as small as the iPhone, this is perhaps acceptable (but why can Droid phones do it so easily?) but for such a device it seems like a really stupid restriction.

What’s much worse, in my mind, is that the iPad may succeed wildly (Dave Parry, @academicdave on Twitter, tweeted today: “The problem with the iPad, is it just might succeed. http://bit.ly/c1DUPo (via @Chanders)”). Then we will have DRM’d e-books all over the place, competitors will try to have the same closed mentality embedded in their devices, people will begin to forget the freedom to install any program on your computer. I fervently hope we are not witnessing the beginning of the end of the consumer-oriented computer as an open platform.

Apple did choose temptingly low prices for the various versions of the iPad and I can see lots of attractions for students and book/textbook publishers. The device is not all bad. It’s truly tempting me, which made me sit down and articulate the above to stay level-headed.

Ideas for the above, and lots of good discussions, can be found at createdigitalmusic.com, siliconAngle, Ars Technica, CNET, the New York Times, and Gizmodo on (more than) eight things that suck about the iPad.

UPDATE: See this post for the point that the iPad does allow unrestricted Web apps, and these are truly open with HTML5 and other free technologies. Point taken, but why only web apps are unrestricted?

Incidentally, I am going to pay attention to the State of the Union Address, which is on right now, but not by watching it. My desire to hear oratory, even excellent oratory from people I respect, is non-existent any more. When it’s all summarized in a newspaper online so I can get the main points in less than five minutes.

Categories
Books Life

Semester’s on…

All my projects are behind schedule. The semester started too early! Of course I have not improved my book-reading habits, so now I have more books I’ve started to add to that long list: My Name Is Red, by Turkish Nobel winner Orhan Pamuk, and Postwar: A History of Europe Since 1945, by Tony Judt. I will be sure to report here when I finish a book (I hope it won’t take months and months…)

On the positive side, I am enjoying making all new lecture notes for my undergraduate mathematical economics class, as it has been several years since the last time I developed my teaching materials for that. There are now many more cheap and very capable software applications for making useful graphs, for instance. Of course math and math econ don’t change all that much from year to year, but the ability to illustrate the topic better is now very tempting and, really, needs to be put to good use.