5

I've finally manged to produce my custom \bibliographystyle (.bst) file. Below is the output (sample) of listed references. Is it possible to remove the comma after the last author (just before the year)? I would also like to get rid of "Literatura" title that is assigned as well. Any help appreciated.

Literatura
Abbiati, M., Bianchi, C. N., Castelli, A., 1987. Polychaete vertical zonation along a
 littoral cliff in the western Mediterranean. Marine ecology, 8(1): 33–48.
Antoniadou, C., Nicolaidou, A., Chintiroglou, C., 2004. Polychaetes associated with
 the sciaphilic alga community in the northern Aegena Sea: spatial and temporal
 variability. Helgoland Marine Research, 58: 168–182.
0

5 Answers 5

5

Regarding the "Literatura" title: I suppose you're using babel like

\usepackage[slovene]{babel}

In that case use \addto like:

\addto{\captionsslovene}{%
  \renewcommand*{\refname}{Bibliography title}%
  \renewcommand*{\bibname}{\refname}%
}

Depending on your document class either \refname (article) or \bibname (book, report) would be used. This definition applies to both of them.

2
  • Bingo! One tiny thing though. I've entered an empty argument {}, but the space is still there. Is there a soft method of how to shift the references up so that there isn't so much empty space? Commented Aug 15, 2010 at 20:40
  • 1
    You could get rid of the heading by \def\section*#1{} right before the bibliography or the same but for \chapter*. If needed, take it back like here: texblog.net/latex-archive/plaintex/…
    – Stefan Kottwitz
    Commented Aug 15, 2010 at 20:54
3

I've found the little bugger. To remove the comma after the last author, I edited these lines in the .bst file (took out 4th line and replaced with with the 5th):

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    %{ ", " * write$ }
    { " " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
            'write$
            { add.period$ " " * write$ }
          if$
        }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}
2

The heading for the bibliography is stored in \bibname in the standard classes. Try:

\renewcommand\bibname{Your title}

As for the comma after the author list you will have to check your custom bst file to see where it is coming from.

1
  • Unfortunately I have to use localized settings and your answer doesn't work -- see Stefan's answer. Commented Aug 15, 2010 at 20:41
1

The other answer didn't help me. I deleted the comma in line 12 in my bst file. I'm not sure what I've actually done there, but it works.

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
                { "," * }
                'skip$
              if$
              t "others" =
                { " et~al." * }
                { " and " * t * }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}
1
1

After spending half day digging into Tame the BeaST, finally found the solution for my case.

The comma after last author is added into reference either through the author field by the function of format.names or the function of output.nonnull or through the date (which is right after the author field in reference) field by the function of format.date. I which way the comma is added in depends on the .bst file. In my case, it is the latter. So, I go to the FUNCTION {format.date}, at the very end,

before.all 'output.state :=
  ", " swap$ *

Remove the comma,

before.all 'output.state :=
  " " swap$ *

If it is added through the author field. You can try to modify format.names or output.nonnull as suggested by the previous posts. But it looks like their answers both have flaws and may affect the render of other fields.

You must log in to answer this question.

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