I'm using natbib like so:


and using the plainnat bibliography:


I have the following citation in my bibliography: Citation

But I would like to format it like so:

M. Abadi, L. Cardelli, B. Pierce, and G. Plotkin.
Dynamic Typing in a Statically-typed Language.
In Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 213-227.
Cited on page 77.

(i.e., newlines after the author list and after the title)

I tried modifying my bst file like so:

FUNCTION {author.full}
{ author empty$
    { "" }
    { author format.full.names write$ newline$ }

FUNCTION {format.title}
{ title empty$
    { "" }
    { title write$ newline$ }

But this doesn't produce the expected output. Specifically, I get the following:

Citation not fixed

What am I doing wrong?


newline$ just writes an end of line to the generated latex that typesets as a space, you want

"\\ " write$

to write a \\

| improve this answer | |
  • Thanks! I had to do "\leavevmode\\ " write$ to avoid a bunch of "There is no line to end here" errors, but otherwise it works! – Mathias Vorreiter Pedersen Jul 15 '19 at 18:55
  • @MathiasVorreiterPedersen hmm I assumed (from your example) that you were forcing a line break after some text but... – David Carlisle Jul 15 '19 at 19:23
  • I ... I thought I was as well... But oh well – Mathias Vorreiter Pedersen Jul 16 '19 at 12:29

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.