5

I would like to generate a bibliography for a grant application with a minimal structure. Ideally, something like science.bst i.e. omitting the article title.

A. N. Clarkson, B. S. Huang, S. E. Macisaac, I. Mody, S. T. Carmichael, Nature 468, 305 (2010).

However, I would prefer to have the authors and year structured like apalike.bst.

Clarkson, A. N., Huang, B. S., Macisaac, S. E., Mody, I., and Carmichael, S. T. (2010).Reducing excessive GABA-mediated tonic inhibition promotes functional recovery after stroke. Nature, 468:305–9.

Is there a way to easily force apalike.bst to drop article titles or have science.bst reverse the author/initials and move the year?

  • Do you want to find a method that suppresses the titles of all types of entries, or only for entries of type "article"? (See also the question below, from Audrey, in response to my proposed answer.) – Mico Sep 1 '11 at 3:51
  • Thanks, yes, I only have "articles" in this particular application, so suppressing all titles is perfectly fine. – scitexter Sep 1 '11 at 12:19
6

You could try makebst for example. That is, type latex makebst in the command line and follow the (somewhat lengthyI dialog to create your own bst-file.

| improve this answer | |
  • As indicated in my comment to @Mico, producing a new .bst file was relatively straightforward. Thanks. – scitexter Sep 1 '11 at 12:26
6

Question:

Is there a way to easily force apalike.bst to drop article titles...?

(Remark: I updated this answer in after EL_DON posted a comment to note that the original answer, posted way back in August 2011, no longer works, presumably because of some update that was applied to BibTeX in the meantime.)

Short answer: Yes.

Longer answer: I suggest you proceed as follows:

  • Find the file apalike.bst in your TeX distribution. Make a copy of this file and call the copy, say, apalike-notitlefield.bst. (Do not edit an original file of the TeX distribution directly.

  • Open apalike-notitlefield.bst in a text editor. The program you use to edit your tex files will do fine.

  • Find the function format.title. (In my copy of the file, this function starts on line 264.)

  • In this function, locate the line

         { title "t" change.case$ }
    

Change this line to

        { "" }

Essentially, you're now instructing BibTeX to do nothing with the title field even if it's non-empty.

  • Save the file apalike-notitlefield.bst either to the directory that contains the main tex file (that's the file that contains \bibliographystyle and \bibliography directives) or to a directory that's searched by BibTeX. If you choose the second option, be sure to update the filename database of your TeX distribution suitably.

  • In the main tex file, change

     \bibliographystyle{apalike} 
    

to

    \bibliographystyle{apalike-notitlefield}

and perform a full recompile cycle -- LaTeX, BibTeX, and LaTeX twice more -- to fully propagate all changes.

A final remark: This answer is known to work with the apalike bibliography style. It should with many other bibliography styles as well, as long as they provide a function called format.title.


For completeness' sake, here's the original answer from late August 2011:

Yes! It requires only some minimal surgery. First, find the file apalike.bst on your system and open it in your favorite text editor; on my system, its first two lines are:

% BibTeX `apalike' bibliography style (version 0.99a, 8-Dec-10), adapted from
% the `alpha' style, version 0.99a; for BibTeX version 0.99a.

Then locate the construct ENTRY{...} (begins on line 43 on my copy of apalike.bst) and, in that construct, the line containing the single word

    title

(line 62 in my copy). Comment out this line by placing a single % comment character at the start of the line. Save this file as, say, myapalike.bst somewhere where TeX/LaTeX can find it. If you use TeXLive, for instance, you'll additionally have to run (with sudo privileges) the command mktexlsr; if you use MikTeX, you'll have to call up the Settings program and click on "Refresh FNDB".

Incidentally, this technique -- of commenting out a line in the ENTRY construct of a bst file in order to avoid it showing up in the bibliography printout -- is perfectly general. For instance, if you want to have a style file that never prints out the name of the journal in which some article is published, you could comment out the line journal and obtain the desired result.

Finally, do note that if you run LaTeX on the file makebst.tex to create your own bst file from scratch, you will still have to hand-edit the resulting bst file, as the program does not give you a choice to omit the title of a journal article entirely. Instead, it asks if you want to place the title in quotation marks and how the quotation marks are supposed to look like, e.g., single or double quotes, or single or double guillemets.

| improve this answer | |
  • Would this suppress all titles, not just titles of article entries? – Audrey Sep 1 '11 at 3:01
  • It guess so! I guess I interpreted the original question as asking to suppress the titles of all types of entries, not just the titles of entries of type "article." I'm posting a query (comment) at the end of the original question to find out what exactly the author of the question had in mind. – Mico Sep 1 '11 at 3:50
  • @Mico Thanks for the helpful response. I will give this a try. The comment form @Dirk also led me to look at makebst, which proved to be less daunting than I had imagined, allowing me to generate a new .bst that produced the desired output. – scitexter Sep 1 '11 at 12:24
  • @Mico & @sciexter Thanks for clarifying. So I guess makebst does allow you to avoid printing titles after all? – Audrey Sep 1 '11 at 15:59
  • 1
    @EL_DON - tMany hanks for pointing out that the answer I posted almost 9 years ago no longer works. I'll post an update shortly; it'll work by modifying the contents of the format.title function in the bst file. – Mico Jul 29 at 15:18
1

The formatting of your @article-type entries is specified in a part following

FUNCTION {article}

which starts on line 482 for apalike.bst and line 1036 for (the current version of) science.bst.

In order to remove the title field from article entries in apalike.bst (or for that matter any other *.bst-file), comment out line 488 by adding a %:

%  format.title "title" output.check

Changing the position of the year field for science.bst requires to move line 1045

 format.date "year" output.check

to the desired position, which is right after line 1038

format.authors "author" output.check
format.date "year" output.check

Note that this only changes the position of year for article entries, as specified in the question. However, it is easily extended to other entry types.

Reversing author/initials requires changes in the format.names function (line 489 of science.bst). The order is specified in line 497

      "{f.~}{vv~}{ll}{, jj}" format.name$

and the initials are the first part, which needs to be moved at the end.

      "{vv~}{ll}{, jj}{, f.}" format.name$

Note that this change acts on all author fields for all entry types.

All this is, of course, perfectly valid for any other *.bst-file.

| improve this answer | |
  • 3
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – 1010011010 Apr 18 '15 at 22:27
  • A complete answer should show where precisely to act. – egreg Apr 18 '15 at 22:55
  • 1
    @1010011010 my answer addresses precisely what is asked in the title. It is easier and faster than creating an entire *.bst file, and it does only remove article titles, and not all entry titles. I added more details, so that this is clear even for people who only skim over this answer. – David Apr 19 '15 at 6:04
  • Welcome to TeX.SE! – Mico Apr 19 '15 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.