I made a custom .bst file using makebst and chose the option for producing a long dash for repeated author names in the bibliography (option nmdash,nmd-3). (I'm using bibtex with natbib and author-year citations.) This works as intended in the bibliography (produced with \bibliography{}). However, I need to include certain entries at various points in the text, and then primarily in isolation. When I use \bibentry{key} for a reference that appears in the bibliography with the authors replaced by a long dash, the long dash is used here too. When the reference is printed by itself like that, the dash is meaningless. Is this avoidable with my current setup or will I have to switch to biblatex or something else?

I'm not sure how to create an MWE for this without attaching the bst file (which I'd be happy to do if it'd be helpful, of course) --- sorry.


1 Answer 1


First we need to recreate the bst file you created with makebst. The file above is only a stripped version (I removed everything commented with latexpand) of the dbj file created running tex makebst.tex with all the default options except for the ay (for author-year), nmdash and nmd-3:

%% Stripped version of driver file produced from merlin.mbs
\input docstrip
***  ***
End of customized bst file
% You can change the name of the bst file below:

Save it as .dbj and run tex on it. You will get a tanh.bst or whatever name you write in the \generate line.

Then, accoding to Guido's answer to Prevent ibid tracking in natbib, we must edit the name.or.dash macro on the newly created bst file. Here's a patch:

--- tanh.bst    2015-12-18 13:11:40.004012993 -0200
+++ tanh_new.bst    2015-12-18 11:19:30.636130895 -0200
@@ -890,7 +890,7 @@
    oldname empty$
      { s 'oldname := s }
      { s oldname =
-         { "---{}---{}---" }
+         { "\andash{" oldname * "}" * }
          { s 'oldname := s }

Apply it with patch < <patch-filename>. It only works if your bst file is named tanh.bst. But it's a single line diff, so you can just edit the line accordingly (in line 890, replace { "---{}---{}---" } for { "\andash{" oldname * "}" * }).

The MWE from Guido's answer must be enough. Just comment out \bibliography on your first run before running bibtex as suggested there.

  author = "Last, First",
  title = "First Title",
  journal = "Journal Name",
  year = 2012
  author = "Last, First",
  title = "Second Title",
  journal = "Journal Name",
  year = 2011
  author = "More, First",
  title = "Third Title",
  journal = "Journal Name",
  year = 2011


Testing normal citations


Testing \verb|\bibentry|




\section*{More Testing}
Testing \verb|\bibentry| again after the bibliography





Or move to biblatex. It's worth the effort. For guidance:

  • Wow, thank you so much for the comprehensive answer. Works great, although commenting out \bibliography prior to every run of bibtex makes it a bit of a hassle (especially when using latexmk or something similar). I'll take your advice on moving to biblatex.
    – Tor
    Dec 18, 2015 at 21:44

You must log in to answer this question.

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