1

I am close to giving up now: I am desperately trying to accomplish a supposedly simple thing: I manage the references for my work with Mendeley. I want to format the bibliography so that I have:

[author]
      [title] etc.

means, after the element author I would like to have a simple line break. However, this seems to be a major problem. I came across these ways:

However none of the worked at all. I can't believe that it is that hard. I tried to surround the author by a <group> with delimiter="&#10;" as well, but this had not effect.

Can anyone help me or point me a direction or is this not possible at all? Can't believe that this is so hard...

Thanks a lot!

Peter

William
  • 942
  • 2
  • 12
  • 25
user3868893
  • 51
  • 2
  • 3
  • How are you generating your bibliographies? With a word processor plugin? If so, which word processor are you using, and which document format? Also consider sharing your CSL style at https://gist.github.com/ so we can recommend edits. – Rintze Zelle Jul 23 '14 at 15:09
  • Actually i am using the Mendeley word-Plugin. i think it is based on citeproc.js, but not sure about that. I do not have a CSL I have just been using a standard one trying forth and back to get the line break... – user3868893 Jul 24 '14 at 16:15
  • Which style are you using? – Rintze Zelle Jul 24 '14 at 17:02
  • I use American "Psychological Association 6th edition" as base – user3868893 Jul 24 '14 at 23:19

3 Answers3

4

Using the escaped HTML code for a line feed (&#10;), as described in your first link, works for me.

With the modified version of APA at https://gist.github.com/rmzelle/b9bc934521ff7c5b4fb7, which uses <text macro="author" suffix="&#10;"/> (and a little cleanup, like removing the hanging-indent and delimiter after the author macro), I get references like:

Alberty, R. A.
(2006). Thermodynamics and kinetics of the glyoxylate cycle. Biochemistry, 45(51), 15838–15843. doi:10.1021/bi061829e

(as tested with the Zotero reference test pane)

Rintze Zelle
  • 1,654
  • 1
  • 14
  • 30
2

I'm using pandoc-citeproc to generate HTML. The above trick doesn't work, because pandoc doesn't unescape correctly the characters: https://github.com/jgm/pandoc-citeproc/issues/120

Finally I resorted to CSS to accomplish the trick:

CSL:

<text macro="title" font-weight="bold"/>

CSS:

.citation strong {
   display: block;
}

This displays the title on its own line.

cdupont
  • 1,138
  • 10
  • 17
1

At least as of 2018 (version 0.14.18) there is a supported way to do this.

You can define writer-specific raw content in a prefix, suffix, delimiter, or term by wrapping it in

{{<writer-name>}}<raw-content>{{/writer-name}}

For example, if you have a text macro "author" for listing authors and you want a newline after this for the latex and HTML writers with a ". " in other cases you can write:

<text macro="author" suffix=".{{latex}}\\{{/latex}}{{html}}&#10;{{/html}} "

Reference: "Raw Content" section in https://github.com/jgm/pandoc-citeproc/blob/master/man/pandoc-citeproc.1.md