1

I'm using natbib like so:

\usepackage[numbers,square,sort&compress]{natbib}

and using the plainnat bibliography:

\bibliographystyle{plainnat} 

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$ }
  if$
}

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

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

Citation not fixed

What am I doing wrong?

0

1 Answer 1

4

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

"\\ " write$

to write a \\

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

You must log in to answer this question.

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