[Tex/LaTex] Edit bibliography style of bibtex

bibtex

I am trying to edit the bibliography style in the references when using bibtex. I would like to edit so that articles in the references appears as:

Tenn Raa, T., Chakraborty, D. and Small, J. 1984. “An Alternative Treatment of
Secondary Products in Input-Output Analysis”. Review of Economics and Estatics. 66
(1): 88-97.

I don't know how to modified so that year appears without parenthesis, title with quotation marks, and volume, issue and pages as it appear in the example.

Best Answer

Here's a patch that you can apply to your apalike.bst style:

--- apalike.bst 2013-09-05 02:38:53.000000000 +0300
+++ napalike.bst        2013-09-05 02:59:51.000000000 +0300
@@ -121,7 +121,7 @@
 { year empty$
     { "empty year in " cite$ * warning$ }
     { write$
-      " (" year * extra.label * ")" *
+      " " year * extra.label *
       mid.sentence 'output.state :=
     }
   if$
@@ -264,7 +264,7 @@
 FUNCTION {format.title}
 { title empty$
     { "" }
-    { title "t" change.case$ }
+    { "``" title * "''" * }
   if$
 }

@@ -294,7 +294,7 @@
 }

 FUNCTION {format.btitle}
-{ title emphasize
+{ title
 }

 FUNCTION {tie.or.space.connect}
@@ -318,7 +318,7 @@
     { "volume" volume tie.or.space.connect
       series empty$
         'skip$
-        { " of " * series emphasize * }
+        { " of " * series * }
       if$
       "volume and number" number either.or.check
     }
@@ -430,8 +430,8 @@
 { booktitle empty$
     { "" }
     { editor empty$
-        { "In " booktitle emphasize * }
-        { "In " format.editors * ", " * booktitle emphasize * }
+        { "In " booktitle * }
+        { "In " format.editors * ", " * booktitle * }
       if$
     }
   if$
@@ -488,7 +488,7 @@
   format.title "title" output.check
   new.block
   crossref missing$
-    { journal emphasize "journal" output.check
+    { journal "journal" output.check
       format.vol.num.pages output
     }
     { format.article.crossref output.nonnull }

I doubt that this is all you need, but the differences in the two files will give you the idea how to fix the rest.


The rest is information about how to apply this patch. I'll make it brief.

A patch is a text file that shows what changes you need to make to one version of a file (the original) in order to produce a second version (the patched one). What you see above was generated by the diff utility, which compares two files and reports the differences.

If you are using a Linux machine, or have a decent set of utilities on your Windows machine, you can directly apply the patch by:

  1. Copying the original apalike.bst (you have to find it first) to the directory where your LaTeX source files are:

    cp /usr/share/texlive/texmf-dist/bibtex/bst/base/apalike.bst apalike.bst
    
  2. Creating a file apalike.patch and adding the patch above.

  3. Applying the patch:

    patch < apalike.patch
    
  4. This is all, but I'd suggest to rename the result, e.g. to napalike.bst, and use that in your LaTeX source; in this way, you'll remember that you have changed it.

If on the other hand you have no access to a working patch utility, all you need to do is to apply these changes by hand (they are not too many). Look for - and + at the beginning of lines in the patch. This is what you need to change. The numbers after the @@ denote the lines where this change has to be applied.

For example, the first change in the patch above says that, somewhere around line 121, there is a line saying " (" year * extra.label * ")" * (this was the minus sign), which you need to replace by " " year * extra.label * (this was the plus sign).