1

I'm using \bibliographystyle{ecca} along with a .bib for citing and to generate my bibliography. The style works perfectly other than it replacing repeated authors with "---" in the bibliography list, which I do not want. I tried editing the ecca.bst (calling it myecca.bst then loading \bibliographystyle{myecca.bst}), but I think I have been unable to identify the command that is doing the replacing. the ecca.bst is available here if anyone is able to help: http://tug.ctan.org/tex-archive/biblio/bibtex/contrib/economic/ecca.bst. Would be super grateful for any help! Thanks!

2
  • I haven't tested this, but you are probably looking for this function FUNCTION {compare.name} that will replace the names with --- if they are identical to the ones in the previous entries (as defined by the functions before that one). Removing this one function should do what you want, but, as I said, I didn't test it myself.
    – Markus G.
    Sep 9, 2021 at 15:47
  • egreg's solution below worked perfectly!
    – hannahelw
    Sep 10, 2021 at 23:46

1 Answer 1

0

Add a % in front of compare.name in the function format.names

FUNCTION {format.names}
{ 'bibinfo :=
  duplicate$ empty$ 'skip$ {
  namestring 'oldnames := % Copy the stored names to the oldnames list
  "" 'namestring :=       % and blank the current name string
  's :=
  "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{vv~}{ll}{, f.}{, jj}"
      format.name$
      store.name
      %compare.name % Save the current name to our storage list
      bib.name.font

The line number is 509.

Save the file as ecca-mod.bst (or whatever name you prefer).

Test:

\begin{filecontents*}{\jobname.bib}
@article{a,
  author={A. Uthor},
  title={Title one},
  journal={Journal},
  year=2020,
}
@article{b,
  author={A. Uthor},
  title={Title two},
  journal={Journal},
  year=2019,
}
@article{c,
  author={W. Riter},
  title={Title three},
  journal={Journal},
  year=2021,
}
\end{filecontents*}

\documentclass{article}
\usepackage{natbib}

\begin{document}

\cite{a,b,c}

\bibliographystyle{ecca-mod}
\bibliography{\jobname}

\end{document}

Output:

enter image description here

1
  • Thank you so much, egreg! Your solution was exactly what I was after. I had failed to spot the compare.name in the function format.names. I had commented out the whole function compare.name instead which didn't quite work.
    – hannahelw
    Sep 10, 2021 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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