Friday, December 28, 2012
The Greek Alphabet
Many students and even some professors get sometimes confused about all the Greek letters that are used in economics. Therefore, I made a table of the Greek alphabet for you to print out and put in the back of your binder.
Organizing Your Literature with JabRef
One of the great advantages of LateX is that you don't have to do your bibliography on your own. Of course you can, but most economists like to work 'efficiently'. One might suspect that this includes some degree of laziness, but that is a misconception. Only undergrad students are lazy. Grads and staff are 'busy with other things' or 'prefer to work efficiently'.
Anyways, Jabref and Google Scholar make it pretty easy to organize your literature for your LateX documents. In Google Scholar you can search for literature that is related to your topic by Keywords, similar to e.g. EconLit. A set-back of Google Scholar is that you can not access most of the literature directly. You will have to log in through your university access first. Often links to working paper versions of the actual article are provided. However, you should make the extra effort and go for the published article. The great advantage of Google Scholar is that it provides citations of the literature in TeX format. Unfortunately, this is not the standard option, so you have to adjust the Google Scholar preferences. You can then easily copy and paste the citations in Jabref. Jabref is a useful program that allows you to create and manage a bibliography file that includes all your references. In you LateX document you then ‘link’ to this bibliography file. The LateX document then automatically creates a bibliography for your document with all the literature you have referenced in your document. But let’s go through the set-up process and an example step by step.
I'm assuming you have installed LateX on your computer and you got the first simple example running. Now do the following:
1. Set up Google Scholar
Go to Google and then to Google Scholar.

Now click on ‘Scholar Preferences’ in the top right corner adjust the display of search results to your needs. Important is the last option (Bibliography Manager). Change this option to ‘import citations into BibTeX’.
Now your search results show the option ‘Import into BibTeX’.
If you want, you can also add Google Scholar to your search engines on the top right of your browser.
2. Import citations into JabRef
Search for some example article and click on ‘Import into BibTeX’. Copy whatever comes up in the window. It may look a bit strange for now but it will become clear soon. Now open JabRef. It will be totally blank since your bibliography file doesn’t have any entries yet. Click on the green plus sign on the top to add a new entry. You can either fill in all the information like author, year, journal etc. by hand or you stay with me and go to the last tab, ‘BibTeX source’. Past the TeX code you have copied from Google Scholar.
If you now go to the other tabs, all the relevant fields have been filled automatically. Make sure you adjust any oddities, especially the double brackets around the title name. Important is the ‘BibTeX-Key’ as you will be referring to it in your LateX document. You can change it by hand in the first line of the BibTex source or with the magic wand on the lower left hand side.
If you want, add other pieces of literature, then safe the database (bibliography file) in the appropriate folder. I would recommend to create a new folder for every LateX document. You can then put you bib-file in the superordinate folder and link to it from every document.
3. Citing
Now open WinEdt or whatever editor you are using. If we refer to our bib-file we can cite the papers that it includes. Try the following example. Compared to our first document we have three new more or less self-explaining commands. In the document header, we include ‘bibliographystlye’ that tells LateX how we want our bibliography to look. This document also includes a first ‘comment’. Everything after ‘%’ is not read by LateX and not part of the actual code. Here I’m telling you that you could also use ‘abbrv’ or ‘alpha’ instead of ‘plain’ as the ‘bibliographystlye’ option. The command ‘\cite’ is the actual citation in the text. In the brackets you should put the BibTex key you specified in JabRef. The command \bibliography{'file'} creates your bibliography and tells LateX which bib-file you are using. Here, I use the bibfile all.bib in the superordinate folder (../).
Anyways, Jabref and Google Scholar make it pretty easy to organize your literature for your LateX documents. In Google Scholar you can search for literature that is related to your topic by Keywords, similar to e.g. EconLit. A set-back of Google Scholar is that you can not access most of the literature directly. You will have to log in through your university access first. Often links to working paper versions of the actual article are provided. However, you should make the extra effort and go for the published article. The great advantage of Google Scholar is that it provides citations of the literature in TeX format. Unfortunately, this is not the standard option, so you have to adjust the Google Scholar preferences. You can then easily copy and paste the citations in Jabref. Jabref is a useful program that allows you to create and manage a bibliography file that includes all your references. In you LateX document you then ‘link’ to this bibliography file. The LateX document then automatically creates a bibliography for your document with all the literature you have referenced in your document. But let’s go through the set-up process and an example step by step.
I'm assuming you have installed LateX on your computer and you got the first simple example running. Now do the following:
1. Set up Google Scholar
Go to Google and then to Google Scholar.
Now click on ‘Scholar Preferences’ in the top right corner adjust the display of search results to your needs. Important is the last option (Bibliography Manager). Change this option to ‘import citations into BibTeX’.
Now your search results show the option ‘Import into BibTeX’.
If you want, you can also add Google Scholar to your search engines on the top right of your browser.
2. Import citations into JabRef
Search for some example article and click on ‘Import into BibTeX’. Copy whatever comes up in the window. It may look a bit strange for now but it will become clear soon. Now open JabRef. It will be totally blank since your bibliography file doesn’t have any entries yet. Click on the green plus sign on the top to add a new entry. You can either fill in all the information like author, year, journal etc. by hand or you stay with me and go to the last tab, ‘BibTeX source’. Past the TeX code you have copied from Google Scholar.
If you now go to the other tabs, all the relevant fields have been filled automatically. Make sure you adjust any oddities, especially the double brackets around the title name. Important is the ‘BibTeX-Key’ as you will be referring to it in your LateX document. You can change it by hand in the first line of the BibTex source or with the magic wand on the lower left hand side.
If you want, add other pieces of literature, then safe the database (bibliography file) in the appropriate folder. I would recommend to create a new folder for every LateX document. You can then put you bib-file in the superordinate folder and link to it from every document.
3. Citing
Now open WinEdt or whatever editor you are using. If we refer to our bib-file we can cite the papers that it includes. Try the following example. Compared to our first document we have three new more or less self-explaining commands. In the document header, we include ‘bibliographystlye’ that tells LateX how we want our bibliography to look. This document also includes a first ‘comment’. Everything after ‘%’ is not read by LateX and not part of the actual code. Here I’m telling you that you could also use ‘abbrv’ or ‘alpha’ instead of ‘plain’ as the ‘bibliographystlye’ option. The command ‘\cite’ is the actual citation in the text. In the brackets you should put the BibTex key you specified in JabRef. The command \bibliography{'file'} creates your bibliography and tells LateX which bib-file you are using. Here, I use the bibfile all.bib in the superordinate folder (../).
If you got the document running, you may not be very happy with the result. You should get a bibliography that is numbered and instead of the author (year) citation that is usually used in economics you get just that number. To solve this problem we must load our first ‘package’. Packages allow us to use additional commands that are not included in standard LateX. In a future post, I will include a list of useful packages for economics. For now, we load the package ‘natbib’ that allows for author-year citations. The option [round] makes the brackets around the publication year round ( '(1987)' instead of '[1987]'). Packages are loaded by including \usepackage[‘option’]{‘packagename’} in your header. Note that the options for bibliographystyle have changed and we have a new set of citation commands (see table).
Sometimes WinEdt doesn’t want to change the bibliographystyle and gives you an error message. When getting such an error message, try pressing enter and run it again. Now it should work.
Thursday, December 27, 2012
Installing LateX (on Windows)
If you have decided or are urged to write documents with LateX, first: congratulations! You definitely made the right choice. Documents created with LateX just look beautiful and it certainly is a very useful soft skill to be at least somewhat versatile in programming in LateX. Yes, programming! LateX is a programming language, that needs to be compiled (translated by your computer) and produces a pdf file as output. This means that working with LateX is not WYSIWYG (what you see is what you get) as e.g. Microsoft word. By typing in commands that are a bit similar in structure to html you will rather get what you really mean (WYSIWYM).
Installing LateX is not quite as straight forward as installing other software. You'll have to install several elements separately. First you'll need MiKTeX which acts as a compiler and also provides you with packages. But I will talk about packages in another post. The second important thing you need is an editor. Since LateX is a programming language, you could basically use the windows notepad, but other editors will provide you with some shortcuts and make life a bit easier. There's a link to an overview of editors on Wikipedia below. I used to use WinEdt which is $40 for students after a trial period. Recently, I have discovered TeXstudio which offers the same (if not more) functionality as WinEdt but is completely free!
Lastly, let me note that this is only one way to work with LateX. If you are very uncomfortable with programming, you might want to work with LyX or maybe Scientific Workplace which are more WYSIWYG.
So, let's go:
Try and run your first document. Every \LateX document has a header (everything above \ begin{document}) and a main part (between \ begin{document} and \ end{document}).
Updated: 7/16/16
Installing LateX is not quite as straight forward as installing other software. You'll have to install several elements separately. First you'll need MiKTeX which acts as a compiler and also provides you with packages. But I will talk about packages in another post. The second important thing you need is an editor. Since LateX is a programming language, you could basically use the windows notepad, but other editors will provide you with some shortcuts and make life a bit easier. There's a link to an overview of editors on Wikipedia below. I used to use WinEdt which is $40 for students after a trial period. Recently, I have discovered TeXstudio which offers the same (if not more) functionality as WinEdt but is completely free!
Lastly, let me note that this is only one way to work with LateX. If you are very uncomfortable with programming, you might want to work with LyX or maybe Scientific Workplace which are more WYSIWYG.
So, let's go:
- Download and install MicTex: http://miktex.org/
- Download and install Ghostscript and Ghostview: http://pages.cs.wisc.edu/~ghost/
- Download and install WinEdt or other Editor:
- TeXstudio: http://texstudio.sourceforge.net/
- Comparison_of_TeX_editors: http://en.wikipedia.org/wiki/Comparison_of_TeX_editors
- Download Jabref: http://jabref.sourceforge.net/download.php
Try and run your first document. Every \LateX document has a header (everything above \ begin{document}) and a main part (between \ begin{document} and \ end{document}).
Did it work?
Updated: 7/16/16
Subscribe to:
Comments (Atom)
