Generalbibtex and author's first name starting with McC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

bibtex and author's first name starting with McC

Post by christina_t »

Hi

I need some help to fix something in my bibliography. I am using \bibliographystyle{humannat}
and I want the following bibtex item (author's name) to appear in my bibliography as Adams, J. McC.:


@BOOK{adams1997,
AUTHOR = {Adams, J. McC.},
TITLE = "{Title of the Book}",
PUBLISHER = {Oxford University Press},
YEAR = {1997},
}

I tried putting the whole name in {} as in {{Adams, J. McC.}}, but this made the entry within the text appear as Adams, J McC. 1997, which I do not want. Then I also tried with {Adams, J. "McC."}, which again did not work as it just put only the M. What else could I do?

Many thanks in advance!

Christina

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

bibtex and author's first name starting with McC

Post by Stefan Kottwitz »

Hi Christina,

you could try

Code: Select all

AUTHOR = {Adams, J. {McC.}},
Stefan
LaTeX.org admin
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: bibtex and author's first name starting with McC

Post by christina_t »

Hi Stefan and thanks for your reply

It still does not work. The author in the bibliography comes up as Adams, J. M.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

bibtex and author's first name starting with McC

Post by gmedina »

Hi Christina,

the problem comes from the way that some styles (humannat,apalike,etc.) use to format the names. In your case, a possible solution is the following:

With a text editor open the file humannat.bst and make a copy of this file in your working directory (i.e., the directory that contains your .tex file); save this copy as, for example, myhumannat.bst

Now open myhumannat.bst and search for this line:

Code: Select all

 s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=   % last name first
replace it with

Code: Select all

 s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=   % last name first
and save this modified version of myhumannat.bst

In your .tex file change

Code: Select all

\bibliographystyle{humannat}
to

Code: Select all

\bibliographystyle{myhumannat}
and process your .tex file in the usual way to obtain the bibliography.

In the bibliographical database, your problematic reference can now be written in the following way:

Code: Select all

@BOOK{adams1997,
author = "Adams, J. McC.",
title = "{Title of the Book}",
publisher = "Oxford University Press",
year = "1997",
}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: bibtex and author's first name starting with McC

Post by christina_t »

thanks a lot gmedina for the reply

it seems to work for this particular entry; however, all the other entries now that were like that:

@ARTICLE{Jones2002,
AUTHOR = {Jones, Steven J.},
TITLE = "{Article title}",
JOURNAL = {Journal},
YEAR = {2002},
volume = {89},
pages = {30-48},
}

have kept the first name in full and appear in the bibliography as : Jones, Steven J.

Is there any other way to just keep the McC. while also keeping the other entries as ie "Jones, S. J." ?

many thanks again
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

bibtex and author's first name starting with McC

Post by gmedina »

Hi Christina,

I can only think of manually editing the others entries, using, for example,

Code: Select all

@ARTICLE{Jones2002,
AUTHOR = {Jones, S. J.},
TITLE = "{Article title}",
JOURNAL = {Journal},
YEAR = {2002},
volume = {89},
pages = {30-48},
} 
Edit: if you have problems with only one reference (the McC in your example) then an easier solution (that doesn't imply changing your .bib database) would be the following: use the standard humannat.bst style file. At the end of the typesetting process do the required change in the .bbl file. I mean the following: once your document (I'll call it mydoc.tex) is ready to be printed (or in its final version) then process it with (PDF)LaTeX and BiBTeX. Now, open the file mydoc.bbl and edit there manually the problematic entry writing McC. instead of M. Save mydoc.bbl and finish the compilation process with (PDF)LaTeX + (PDF)LaTeX, without using BiBTeX.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: bibtex and author's first name starting with McC

Post by christina_t »

thanks a lot gmedina! i ended up changing the other entries...
Post Reply