Could someone explain meaning of parameters is 3rd argument of the ENTRY declaration that appear in some BST files? Here is small extract from unsrtnat.bst:

  { address
    . . .
  { label extra.label sort.label short.list }

I guess that label, extra.label, sort.label, short.list are computed by bibtex.exe but how? The label parameter seems to be ordinal number of current reference. Where one could find complete description of the ENTRY command?

1 Answer 1


The ENTRY function takes three arguments

  1. External string variables - usually the fields
  2. Internal integer variables - usually empty
  3. Internal string variables - usually the label and so forth

These are all variables associated with each entry separately, rather than variables used in the process of calculations. So you need to declare a variable here for each field you want to work with.

In the case of external variables, the list given for ENTRY defines which fields are read from the .bib file. On the other hand, the internal variables have to be calculated somewhere in the .bst file. For example, in unsrtnat.bst you will find

FUNCTION {calc.label}
{ calc.short.authors
  year duplicate$ empty$
  short.list key field.or.null = or
     { pop$ "" }
  'label :=

which is itself called by

FUNCTION {presort}
{ calc.label
  label sortify
  "    "
  seq.num #1 + 'seq.num :=
  seq.num  int.to.fix
  'sort.label :=
  sort.label *
  #1 entry.max$ substring$
  'sort.key$ :=

ITERATE {presort}

Notice that just defining the function does not do anything: it is only because ITERATE is used that label is calculated.

There is more on BibTeX in the document Tame the BeaST

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .