2007.4.4

(Last revision: 2017.10.13)

Towa Tachibana

 

Letfs Use LaTeX to Write a Paper

 


LaTeX is a version of TeX developed by Dr. Donald E. Knuth. In plain English, LaTeX is free software for writing academic papers. It is available from several websites. An example is:

 

http://www.tug.org/

 

Please find here a ghow toh document for installing LaTeX for Windows systems.   

 

For Japanese students, I believe that the website of TeXWiki is most friendly: https://texwiki.texjp.org/

 

  How to use LaTeX? In short, we write a source file in text format in any word processing software. Then compile the source file in LaTeX software. A very simple example of the source file is as follows.  

 

Example 1: Very simple one

Source 1 (a text file with tex extension.  Any text editor can open it.) 

              Output 1 (in PDF)

 

The output is so beautiful that it is almost publishable.  We can easily convert the output into PDF file.

 

For economic majors, there are three major advantages to utilize LaTeX: 1) it is free!, 2) it is good at writing complicated mathematical equations, and 3) with BibTex, it automatically makes references of our articles in any styles (for making your own file reference-style, please check here). Here you can download my BibTex source file (revised on 2017/10/13). You can add your references to this.  

 

For details, please refer to the textbooks and websites for LaTeX.  There are many good textbooks.  Here I show two more examples of the source files and their outputs.  I hope that the last example can be utilized for a basic format for your own paper.  

          

Example 2: one of my handouts

              Source 2 (a text file with tex extension.  Any text editor can open it.  In this example, the BibTex source file is in the folder D:/pap)

              Output 2 (in PDF)

 

Example 3: My recent paper on the forests in Nepal (Revised on July 11, 2012)

               Source 3 (summarized in a zip folder including the files for tables, figure, and bibliography.  The main source file is example3_080212.tex)

 

              Output 3 (in PDF)

 

To compile this file, depending on where you put your bib file, you need to make a change in g\bibliography{d:/pap/mbib}h.  Inside the { } should be altered to the directory where you put your bib file. 

 

 

 

Cautions and Some Tips (Last Revision: 2011/01/13):

The following troubles may be due to the specific settings in my LaTeX. 

 

1) BibTex does not run after some mistakes!

When you made some mistakes in BibTex and the file compiling was stuck, it is better to delete all the sub-files related to BibTex with the following extensions: .bbl, .aux, bgl, etc.  It seems that LaTeX re-uses the ready-made files with these extensions to compile the source file (with tex extension).  Unless you delete these sub-files, whatever corrections you made, it may not be compiled again.

 

2) How to obtain your own style files for BibTex (listed on February 15, 2010: last revision on January 13, 2011)

Many journals require us different bibliographic styles.  In most cases, the differences are really minor such as:

 

a) c Journal of Environmental Economics and Management, 38(1): 309-27

b) c Journal of Environmental Economics and Management 38(1): 309-27. 

 

Can you see the differences?  Actually there are two: comma after journal title (!) and period at the end.  It drives us crazy if we try to make a bst file suitable for each journal to which we try to submit our draft.

 

Many LaTeX installers provide us representative bibliographic styles as built-in. For example, MiKTeX 2.8 contains the bst files for Journal of Political Economy, Econometrica, World Development, etc. Usually they will do. Furthermore, many journals kindly provide us their LaTeX templates that include bst files. For example, we can obtain bst file for American Economic Review (AER), aea.bst, from: http://www.aeaweb.org/aer/submissions.php

 

But it may happen that we need to have an original bst. To write onefs own bst files requires us deep knowledge of Tex programming language. Fortunately, CUSTOM-BIB package by Dr. Patrick W. Daly provides us an easy way to make suitable bst files: (http://www.ctan.org/tex-archive/macros/LaTeX/contrib/custom-bib/)

 

  The following is my own experience with CUSTOM-BIB.

 

The manual of CUSTOM-BIB is user-friendly, so I had little trouble to make a bst file by CUSTOM-BIB.  What I made was aer_rev.bst that contained minor differences from the bibliographic style of AER. Then a trouble happens. I copied the aer_rev.bst to the MiKTex folder which contains bst files for economics journals (c:\Program Files\MiKTex 2.8\bibtex\bst\economic). When I run BibTex, I got the following error message.

 

This is BibTeX, Version 0.99c (MiKTeX 2.8)

The top-level auxiliary file: lao-entrepreneurs-090712.aux

I couldn't open style file aer_rev.bst

---line 50 of file lao-entrepreneurs-090712.aux

 : \bibstyle{aer_rev

 :                  }

I'm skipping whatever remains of this command

I found no style file---while reading file lao-entrepreneurs-090712.aux

(There were 2 error messages)

  

BibTex cannot locate aer_rev.bst.  This may be because of hidden-folder system of Windows Vista, or the setting of environmental variables in System.  I added a new environmental variable for bst files in gSystemh setting in Widows Vista.  Unfortunately, it did not work. A simple solution I finally got is to put your own aer_rev.bst in the folder you store your tex documents (not in the folder of LaTeX programs). Then indicate the location of bst file in your LaTeX document. For instance, my tex file with aer_rev.bst include the following commands:

 

\bibliographystyle{d:/pap/Mybst/aer_rev}

%\bibliographystyle{jpe}

\bibliography{d:/pap/mbib}

 

This worked.  One final note is that we cannot put bst files in the folders with the title with space, e.g., \bibliographystyle{C:\ Program Files\MiKTex 2.8\aer_rev}.  BibTex does not work with this command.  This is because LaTeX cannot understand the space in folder names.  Here a space between gProgramh and gFilesh causes troubles.       

 

3) How to install foiltex into your LaTeX system.