How to insert new line breaks in your citation style file.
Note: remove blanks between & and ; in the comment below:
You can use the entity & # 1 0 ; to represent a newline in an XML attribute. & # 1 3 ; can be used to represent a carriage return. A windows style CRLF could be represented as & # 13 ; & # 1 0 ; .
This is legal XML syntax (csl file is a kind of xml file). See XML spec for more details.
Example code:
<group prefix="{" suffix="}" delimiter=", & # 1 0 ;">
<text macro="citeKey"/>
...
</group>
Here it inserts a line break after , - they together act as the delimiter to separate group items.
You can use the entity & # 1 0 ; to represent a newline in an XML attribute. & # 1 3 ; can be used to represent a carriage return. A windows style CRLF could be represented as & # 13 ; & # 1 0 ; .
This is legal XML syntax (csl file is a kind of xml file). See XML spec for more details.
Example code:
<group prefix="{" suffix="}" delimiter=", & # 1 0 ;">
<text macro="citeKey"/>
...
</group>
Here it inserts a line break after , - they together act as the delimiter to separate group items.
I have tried your proposed solution but I did not get good results.
May you send an example type of this?
Thanks in advance
-
Adrian
https://stackoverflow.com/questions/24911522/csl-how-to-insert-a-line-break-in-bibliography
I downloaded the apa-line-break.csl file and installed it. In the Zotero style preview, it indeed breaks as indicated, but when exporting to either RTF or HTML, the line breaks are not preserved. Is there a way to insert line breaks such that they carry over to external documents (particularly HTML)?
Thank you for any help!
http://www.wag.caltech.edu/publications/papers/
If Zotero can't do it, that's fine, I'm sure I can find some other style that will work. I was just surprised that the modified APA style linked above does show correctly in preview, but does not export to RTF or HTML.
http://docs.citationstyles.org/en/stable/specification.html#display
<macro name="title">
<text variable="title" />
</macro>
and
<bibliography et-al-min="20" et-al-use-first="21">
<sort>
<key variable="issued" sort="ascending"/>
<key macro="citation-number" sort="descending"/>
</sort>
<layout suffix=" ">
<text variable="citation-number" suffix=". "/>
<group delimiter=" ">
<choose>
<if type="article article-magazine article-newspaper article-journal review" match="any">
<group display="block">
<text macro="title" />
</group>
<group display="left-margin">
<text variable="container-title" form="short" text-case="title"/>
</group>
etc.
And my result is still:
4. Improved Quantum Theory of Many-Electron Systems. III. The GF Method J. Chem. Phys. 48:450–461 (1968) W.A. Goddard III. http://resolver.caltech.edu/CaltechAUTHORS:20120905-102022532
3. Magnetic hyperfine structure of lithium Phys. Rev. 157:93–96 (1967) W.A. Goddard III. http://resolver.caltech.edu/CaltechAUTHORS:GODpr67c
2. Improved quantum theory of many-electron systems. II. The basic method Phys. Rev. 157:81–93 (1967) W.A. Goddard III. http://resolver.caltech.edu/CaltechAUTHORS:GODDpr67b
1. Improved quantum theory of many-electron systems. I. Construction of eigenfunctions of Ŝ2 which satisfy Pauli’s principle Phys. Rev. 157:73–80 (1967) W.A. Goddard III. http://resolver.caltech.edu/CaltechAUTHORS:GODDpr67a
I.e. no break after the title. I'm pretty sure i need to re-read the CSL spec as I don't think I have this in the right place. I can post the entire style to a gist if that would help.
Thanks!
Here it is: https://hastebin.com/emakezakaq.xml
Again, I am 99.95% sure I am doing something wrong.
Thanks!
(not polished, but gets you the idea for journal articles)
You can't "bury" the display elements in other groups.