Generalhow to modify the order of entries in a bibtex string

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

how to modify the order of entries in a bibtex string

Post by iperten »

Good morning.

I use JabRef to keep track of my bibliography and through it I can already create Bibtex-keys for successive Latex documents.

Currently I am writing an article and using Bibtex to add references ad the end, but I have a problem. The organizers gave us some rules to follow: for example, the year of publication should be into brackets and follow the list of authors.

Anyway, by using those Bibtex-keys with the \usepackage{natbib} and the \bibliographystyle{abbrvnat}, I cannot modify the order of the entries: in particular, the year is at the end of everything, but I would like to move it between authors list and title.

Is there anyone who knows how to do such modifications?

thank you.
KInd regards,
Mattia.

Recommended reading 2024:

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

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

Ted
Posts: 94
Joined: Sat Jun 23, 2007 4:11 pm

how to modify the order of entries in a bibtex string

Post by Ted »

iperten wrote:Anyway, by using those Bibtex-keys with the \usepackage{natbib} and the \bibliographystyle{abbrvnat}, I cannot modify the order of the entries: in particular, the year is at the end of everything, but I would like to move it between authors list and title.
The problem is in your choice of bibliography style.

To generate a custom bibliography style that's compatible with natbib, execute

Code: Select all

latex makebst
and follow the on-screen instructions. That will generate a docstrip script that you can run through latex to generate a BST file. Dump that BST file into the same directory as your LaTeX source and change your \bibliographystyle line to use it instead.

Does that help?
-- Ted [home/blog]
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: how to modify the order of entries in a bibtex string

Post by iperten »

Dear Ted,

well, I made the BST file (i.e. name.bst) by executing makebst and copied it in the foulder of my latex file. Then, in the \bibliographystyle I wrote it down like that: \bibliographystyle{name}.

I think I should use the cite package at the beginning, shouldn't I?

anyway, thank you.
MAttia.
Ted
Posts: 94
Joined: Sat Jun 23, 2007 4:11 pm

how to modify the order of entries in a bibtex string

Post by Ted »

iperten wrote:well, I made the BST file (i.e. name.bst) by executing makebst and copied it in the foulder of my latex file. Then, in the \bibliographystyle I wrote it down like that: \bibliographystyle{name}.

I think I should use the cite package at the beginning, shouldn't I?
There is no need for any additional packages. Your makebst settings alone will determine the format of your bibliography and citations.

That being said, I recommend that you:
  1. Generate your BST file (with makebst) for author-year mode even if you want numbered citations.
  2. Use the natbib package (see http://ctan.org/pkg/natbib) with options like numbers (and sort&compress possibly) turned on.
  3. Consider using \citet and \citep from natbib instead of \cite (however, using \cite is just fine).
However, again, I see no reason why you NEED to use natbib (and certainly not cite). The new BST file that you generated should probably be fine.
-- Ted [home/blog]
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: how to modify the order of entries in a bibtex string

Post by iperten »

Well, yes I understand what you said, but it's not working yet.

Anyway, now I know more or less where I must look, so I can sort the problem out.

Thank you.
Mattia.
Ted
Posts: 94
Joined: Sat Jun 23, 2007 4:11 pm

how to modify the order of entries in a bibtex string

Post by Ted »

iperten wrote:Anyway, now I know more or less where I must look, so I can sort the problem out.
If you're not successful generating your own BST (makebst doesn't give you infinite freedom over format; it just includes many common formatting choices), you can always modify your final BBL. It's easy to decipher its contents.

In fact, you can even include the BBL's contents directly in your TeX if you don't want to risk bibtex regenerating it after you're done.

[ Alternatively, you can modify your custom BST directly. bibtex uses a postfix language (similar to PostScript). With a little time and patience, it's not too difficult to get used to and modify as needed. The LaTeX Companion (by Mittelbach/Goossens) lists the bibtex primitives from the language. ]
Last edited by Ted on Thu Jul 31, 2008 2:37 pm, edited 1 time in total.
-- Ted [home/blog]
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: how to modify the order of entries in a bibtex string

Post by iperten »

Yes ,thank you!!
Post Reply