Need help on CSL syntax
Hello!
I am learning how to create Citation Styles. I encountered a few issues that I cannot solve. Here is an example of bibliography section what I am dissecting:
-------------------------------------------------------------------
<bibliography>
<option name="second-field-align" value="true"/>
<option name="entry-spacing" value="0"/>
<layout>
<text variable="citation-number" suffix="."/>
<text variable="title" prefix=" " suffix=". "/>
<text variable="container-title" form="short"/>
</layout>
</bibliography>
-------------------------------------------------------------------
It generates Bibliography in my case as follows:
-------------------------------------------------------------------
1. Protein-DNA recognition patterns and predictions. Annu Rev Biophys Biomol Struct
2. Computational redesign of endonuclease DNA binding and cleavage specificity. Nature
-------------------------------------------------------------------
1) The first question is what should be done so the abbreviated journal title will look like:
Annu. Rev. Biophys. Biomol. Struct.
(note periods at the end of each word)
I found an attribute: include-periods="true" but it did not help. Perhaps I used it wrongly.
2) There is a strange dependency between two above options in <bibliography> section. Somehow if I use only one option:
<option name="entry-spacing" value="0"/>
I get a spacing between lines in generated bibliography. Adding the second option:
<option name="second-field-align" value="true"/>
solves the problem but I do not not understand how these two are connected.
I would be grateful if someone could help me with these two issues.
I am learning how to create Citation Styles. I encountered a few issues that I cannot solve. Here is an example of bibliography section what I am dissecting:
-------------------------------------------------------------------
<bibliography>
<option name="second-field-align" value="true"/>
<option name="entry-spacing" value="0"/>
<layout>
<text variable="citation-number" suffix="."/>
<text variable="title" prefix=" " suffix=". "/>
<text variable="container-title" form="short"/>
</layout>
</bibliography>
-------------------------------------------------------------------
It generates Bibliography in my case as follows:
-------------------------------------------------------------------
1. Protein-DNA recognition patterns and predictions. Annu Rev Biophys Biomol Struct
2. Computational redesign of endonuclease DNA binding and cleavage specificity. Nature
-------------------------------------------------------------------
1) The first question is what should be done so the abbreviated journal title will look like:
Annu. Rev. Biophys. Biomol. Struct.
(note periods at the end of each word)
I found an attribute: include-periods="true" but it did not help. Perhaps I used it wrongly.
2) There is a strange dependency between two above options in <bibliography> section. Somehow if I use only one option:
<option name="entry-spacing" value="0"/>
I get a spacing between lines in generated bibliography. Adding the second option:
<option name="second-field-align" value="true"/>
solves the problem but I do not not understand how these two are connected.
I would be grateful if someone could help me with these two issues.
no idea on 2)
<option name="line-spacing" value="0"/>
<bibliography>
<option name="line-spacing" value="0"/>
<layout>
<text variable="citation-number" suffix="."/>
<text variable="title" prefix=" " suffix=". "/>
<text variable="container-title" form="short"/>
</layout>
</bibliography>
-------------------------------------------------------------------
The code above generates the bibliography as shown below. There is an empty line between 1 and 2!
-------------------------------------------------------------------
1. Protein-DNA recognition patterns and predictions. Annu Rev Biophys Biomol Struct
2. Computational redesign of endonuclease DNA binding and cleavage specificity. Nature
-------------------------------------------------------------------
Only combination of two options produces bibliography without empty lines.
<option name="second-field-align" value="true"/>
<option name="entry-spacing" value="0"/>
This is something that I do not understand. I would never figure it out on my own. I found this combination of options in "Nature journal" style. Once you remove one of the options, strangely, you get empty lines in bibliography.
But the entry-spacing is just like space for starting a new line as in some paragraphs spacing. so Value="0" is the least.
Actual single spaced bibliographies should happen when you have both line-spacing=1 and entry-spacing=0 -but they don't - you also need second field align=true and that only works for numerical styles (everything else looks ridiculous). No idea why, but it's clearly a bug.
Does it really abbreviate? I was also in your line that it should. but I tried but has not. Or did not do it well
If you search for Journal Abbreviations on the forum you'll find very, very extensive discussions on this in the future and at least the seeds for this (maybe more) are going to be in csl 1.0.
Because of the way this works in practice, having a syntax/algorythm that creates acronyms is neither feasible nor desirable. We should probably continue that part of the discussion in one of the relevant threads.