You should have makebst.dvi on your local installation. If you run latex
makebst, you will have the option to order by year. The downside,
though, is that then you have to make all the other choices yourself,
too. So if you've got a .bst file that's otherwise acceptable, try
opening it (or better, a copy) up and replacing the function presort
with what follows:

FUNCTION {presort}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.organization.sort
        { type$ "manual" =
            'author.organization.sort
            'author.sort
          if$
        }
      if$
    }
  if$
  "    "
  *
  year field.or.null sortify
  "    "
  *
  swap$ *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

I've just taken that out of a test .bst file I generated choosing to
sort by year and author, so I've not tested it, but it should work: The
sort happens on the variable sort.key$, and presort is what assigns a
value to this variable. By redefining presort, then, you can sort
however you wish.

Regarding hacking on bst files, this is not the easiest thing to do, as
the language in which bst files are written is very unintuitive. The
file btxhak.dvi, which you should also have, is the standard reference.
I understand pretty well how this files work, so I'd be happy to answer
specific questions.

Richard


Michael Chen wrote:
> YES, I want the bibliography to list the entries chronologically. And
> thanks for your ideas. I tried Richard's both suggestions
> (1) natbib does have option "sort".  however its function is to
> "orders multiple citations into the sequence in which they appear in
> the list of references". I definitely can not cite references
> chrononically.
> (2) I can not find a good document about how to modify a .bst file so
> as to list reference chrononically. Any links?
>
> Thanks in advance.
>
> Michael
>
>
> On 11/2/06, Richard Heck <[EMAIL PROTECTED]> wrote:
>> Michael Chen wrote:
>> > hi, I inserted a bibtex file into my lyx file, and I hope the final
>> > output shows them chronically. However there seems no option at all.
>> > Any idea?
>> Sorry, I'm not sure what's being asked here. Do you mean you want the
>> bibliography to list the entries chronologically? If so, then the order
>> in which items are listed is determined by the bst file (apalike, or
>> whatever) or, in some cases, by options passed to a package such as
>> natbib. There isn't a specific option in LyX for this.
>>
>> Richard
>>
>>

Reply via email to