# Problem with “and” keyword translation

I'm trying to generate bibliography using bibtex. My problem is that keyword and is not generated to comma. I also want to put First name after Last name. (I'm using Gummi as LaTeX editor).

Document:

\documentclass[12pt]{report}

\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage[polish]{babel}
\usepackage[T1]{fontenc}
\usepackage{tgtermes}
\usepackage{sectsty}
\usepackage{datetime}
\usepackage[a4paper, left=25mm, right=25mm, top=25mm, bottom=25mm]{geometry}
\usepackage{lipsum}

\selectlanguage{polish}
\title{\textbf{Title}}
\author{Author}
\date{\today}

\begin{document}
\bibliographystyle{plain}
\maketitle

\begin{abstract}

\lipsum[1-3]

\end{abstract}

\tableofcontents

\lipsum
\cite{programowanie}

\bibliography{praca-dyplomowa.bib}

\end{document}


BibTeX:

@Book{programowanie,
author =        "Van Roy, P. and Haridi, S.",
title =         "Programowanie. Koncepcje, techniki i modele",
publisher =     "Wydawnictwo Helion",
year =          "2005",
}


-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. This just helps the community to get started on your problem, rather than recreating it from scratch. Also, it should show the \documentclass you're using, and related packages. –  Werner Oct 10 '12 at 17:05
How would you like the reference to look like? –  krlmlr Oct 18 '12 at 22:00

Customizing a standard bibliography style isn't easy. Normally you have to modify the code of the bst-file. This special language has a small introduction in the online documentation Tame the BeaST which is also via texdoc available. Next to the solution below I recommend the package biblatex which is more flexible. There is also a contribution of the standard styles How to emulate the traditional BibTeX styles (plain, abbrv, unsrt, alpha) as closely as possible with biblatex?

I will improve the styles soon

You are using the style plain which is defined in the file plain.bst. The location of the file can be found via the terminal command kpsewhich plain.bst. In my case it's:

/usr/local/texlive/2012/texmf-dist/bibtex/bst/base/plain.bst


Never touch the original file. So we need a copy of plain.bst in our working directory. I will call it myplain.bst. Now we can edit the file. Find the function FUNCTION {format.names} and replace the code by the following one:

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


Inside your document you have to use \bibliographystyle{myplain} and you will get the output:

-