Reputation: 61
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=" "
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
Upvotes: 2
Views: 5741
Reputation: 365
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}} {{/html}} "
Reference: "Raw Content" section in https://github.com/jgm/pandoc-citeproc/blob/master/man/pandoc-citeproc.1.md
Upvotes: 1
Reputation: 1188
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.
Upvotes: 2
Reputation: 1744
Using the escaped HTML code for a line feed (
), 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=" "/>
(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)
Upvotes: 5