Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.
share|improve this question

4 Answers 4

up vote 5 down vote accepted

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.

share|improve this answer
    
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? –  Roman Luštrik Aug 15 '10 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 Aug 15 '10 at 20:54

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 =
    <strike>{ ", " * write$ }</strike>
    { " " * 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
}
share|improve this answer

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.

share|improve this answer
    
Unfortunately I have to use localized settings and your answer doesn't work -- see Stefan's answer. –  Roman Luštrik Aug 15 '10 at 20:41

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$
}
share|improve this answer
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Torbjørn T. Mar 29 '13 at 17:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.