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 have created a custom bautzen.bst file for a paper which has to be written in German with kind-of Harvard style but some changes. To create the bst I have used the custom-bib script and added a function (to format urldate).

The bst file contains this function:

FUNCTION {bbl.and}
{ "und"}

Other functions like

FUNCTION {bbl.volume}
{ "Band" }

are correctly applied to the reference list. However, when using \cite in the text I'm getting e.g. 'Pott and Pott' instead of 'Pott und Pott' if there are only two authors.
I have also loaded babel

\usepackage[ngerman]{babel}

Bibliography is defined as follows in the document:

\bibliographystyle{bautzen}

As the header and the bst file are quite large I don't paste them here, please refer to header and the bst.
I really need this fixed but have no idea what's wrong, so any help is much appreciated!


The following can be used as mwe, but you need the custom bst file from the link above of course.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{lmodern}
\usepackage{natbib}
\begin{document}
Test with \cite{Pott2012} and an end.
\bibliography{bib}
\bibliographystyle{bautzen}
\end{document}

@book{Pott2012,
address = {Berlin, Heidelberg},
author = {Pott, Oliver and Pott, Andre},
doi = {10.1007/978-3-642-29685-7},
isbn = {978-3-642-29684-0},
publisher = {Springer Berlin Heidelberg},
series = {Springer-Lehrbuch},
title = {{Entrepreneurship}},
url = {http://www.springerlink.com/index/10.1007/978-3-642-29685-7},
year = {2012}
}
share|improve this question
    
Welcome to TeX.SE! Your bst file also contains two \harvardand{} directives: How is this macro defined? (I suspect it's defined to generate "and"...) What happens if you replace " \harvardand{} " with " und ", and "\harvardand{}" with "und"? (After changing something in a bst file, remember to run latex, bibtex, and latex twice more to propagate the changes fully.) –  Mico Jan 4 at 21:58
    
@Mico thanks ;) I replaced the \harvardand{} parts with a call to bbl.add to avoid at least some hardcoding. It is working now :) –  marce Jan 4 at 22:20

2 Answers 2

up vote 3 down vote accepted

It would appear that when you ran the custombib utility, you indicated that you would use the harvard citation management package rather than the natbib package. At least this would explain the presence of the macros \harvarditem, \harvardyearleft, \harvardyearright, and -- most importantly -- \harvardand in the bst file. Given all these harvard-based macros, I'm surprised you can even get your mwe to compile. At the very least, you should be loading both the natbib and the har2nat packages in the preamble, rather than just the natbib package. (As you can probably guess, the package har2nat translates harvard-type instructions into equivalent natbib-type instructions.)

Equally tellingly, the function bbl.and is not used anywhere in the bst file. You should either replace "\harvardand{}" and " \harvardand{} " (note the extra spaces in the second case) with bbl.and or, if you prefer, with "und" and " und ", respectively.

share|improve this answer
    
When I read your hint about using harvard instead of natbib during bst creation I remembered doing exactly that. Don't ask me why, though ;) Currently the hack is working, but I'll recreate the bst with the correct natbib option anyway. I'll mark this as answer as it perfectly fits the problem - thanks! EDIT: Hell, I can't vote up with my newbie rep, sorry. –  marce Jan 4 at 22:28
    
@marce - I'm glad my guess was on target. Hopefully, your query will get a third up-vote soon so that you can start upvote postings and answers as well. –  Mico Jan 4 at 22:39

use

\providecommand\harvardand{}
\renewcommand\harvardand{ und }

after loading natbib

You didn't use the function bbl.and but the \harvardand macro.

share|improve this answer
    
I did what you suggested and added \usepackage{natbib} \renewcommand\harvardand{ und }, however I'm getting !LaTeX Error: \harvardand undefined. So instead of fiddling with it I replaced the macro parts in the bst file with calls of bbl.add which is working for me. Thanks anyway! –  marce Jan 4 at 22:23
1  
you need a \providecommand\harvardand{} before –  Herbert Jan 5 at 13:39

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.