LaTeX tips

Two things are often bothering when one starts to work with LaTeX: in text referencing of literature and Umlaute (for our German speaking friends)

Referencing: Here is a list of 5 types of in text referencing. To get them to work in a LaTeX file you need to define a referencing style in your document (in the example I use APA – American Psychological Association), you can of course use any style you want!

In the header:

usepackage{apacite}
bibliographystyle{apacite}

In the actual text part the command on the left results in the reference on the right:

cite{Bortz1993} – (Bortz, 1993)
citeA{Bortz1993} – Bortz (1993)
citeNP{Campbell1959} – Campbell, 1959
citeauthor{Spiel2001} – Spiel citeyearNP{Bortz1993} – 1993

At the end of the document enter a reference to your .bib file, in the example below my file is called biblio.bib: bibliography{biblio}

Umlaute: In German there are several Umlaute that are not included in the standard english setup of a LaTeX installation. There are two ways to get them right: 1) given a standard LaTeX document use (again command on the left, result on the right): “a – ä “u – ü “o – ö) given that you actually want to write in German do the following:

usepackage[german]{babel}
usepackage[ansinew]{inputenc}

Two useful links:

1) Wikipedia book on LaTeX http://en.wikibooks.org/wiki/LaTeX

2) A page at the University of Salzburg’s Psychology department (German!)

Gernot Kleiter was the person who introduced me to LaTeX, decision making, good experimenting … actually, there should be a whole post about him …

XAMPP activating mysql

Here is the problem: I want to have a server (Apache, MySQL) on my local machine (for the current purpose it was a Windows machine) to do some developing, testing or a demo. Getting XAMPP at Sourceforge is straight forward, installing it works like a charm.

BUT

A problem coming back from time to time is the following: the MySQL daemon does not start.
Hmmmm

Here are some steps that helped me:

1) make sure to deactivate any services related to MySQL and Apache
2) shutdown XAMPP
3) to be sure I restart the machine
4) do not start XAMPP with the .bat file but use the MySQL and Apache batch scripts – these open a command window which you should not close as long as you use XAMPP

Through these steps everything worked fine …

double, triple or even sextuple blind?

There is an interesting discussion on how the scientific review process should be handled going on at orgtheory.net blog. The point is that the obvious shortcomings in the current review system (the authors know who the editor is (and vice versa), the reviewer knows (or can easily infer) who the author is …) can be handle through triple blind reviews: authors, reviewers AND editors are included (anonymous upload to a webpage (id through a code), quatruple blind reviews: no one know who the editor of the journal is, quintimple blind: after publication of a paper the authors name is kept secret for some years or, and that’s the actual kicker: sextuple blind: there is no journal name any more – just the paper and the users decide whether it is worth citing or not …
In a more detailed way you can find this approach explained here

Inference and R

Dan Goldstein posted a short overview of Inference which allows working with R code in Microsoft Office and Excel.

I want to point at Sweave which does an excellent job in connecting R to LaTeX. Here is a short demo of Sweave which also connects the approach of Sweave to the ‘literate programming‘ idea of Donald Knuth (Father of ‘The Art of Computer Programming’ and TeX).

The basic idea is to combine programming (an analysis in the case of R) with documentation into one process. This seems to be useful when one goes back to an older analysis and tries to find out what was done some months ago.

Additionally you find a longer interview with Paul van Eikeren on the same topic here.

Enjoy!