inserting line breaks in a bibliography

Hello,

I'm using a customized style to generate a bibliography with numbered abstracts as below.

Abstract 1.

Salazar AM, Warden DL, Schwab K, et al.

Cognitive Rehabilitation for Traumatic Brain Injury.

JAMA: The Journal of the American Medical Association. 2000;283(23):3075-3081.
Context Traumatic brain injury (TBI) is a principal cause of death and disability in young adults. Rehabilitation for TBI has not received the same level of scientific scrutiny for efficacy and cost-efficiency that is expected in other medical fields.

I recently updated the custom style to CSL 1.0 when I upgraded to Zotero 2.1. Now the output looks like this (for a different abstract):

Abstract 1. Cattelani R, Zettin M, Zoccolotti P. Rehabilitation treatments for adults with behavioral and psychosocial disorders following acquired brain injury: a systematic review. Neuropsychol Rev. 2010;20(1):52-85. This review was aimed at systematically investigating the treatment efficacy and clinical effectiveness of neurobehavioral rehabilitation programs for adults with...

Any suggestions on how to modify the CSL coding to achieve the desired spacing as shown above?

Here is the current coding, generated during the conversion using the tool at http://www.shell-tools.net/index.php?op=xslt

<layout>
<text value="Abstract" suffix=" "/>
<text variable="citation-number" suffix=". "/>
<text macro="author" suffix=". "/>
<text variable="title" suffix=". "/>
<text variable="container-title" font-style="italic" suffix="." form="short"/>
<text macro="year-date" suffix=";"/>
<text variable="volume"/>
<text variable="issue" prefix="(" suffix=")"/>
<text variable="page" prefix=":" suffix=". "/>
<text variable="abstract"/>
</layout>

I played with the coding a little, by inserting a line break as below, but that didn't work.

<layout>
<text value="Abstract" suffix=" " />
<text variable="citation-number" suffix=".

" />

Many thanks for the cool new enhancements in Zotero 2.1.

Sorry for the very long post.
  • Forget about newlines; take a look at the 'block' support (see docs).
  • Thanks for the link to the documentation. I've read it over and revised the style as below:

    <layout>
    <group display="block">
    <text value="Abstract" suffix=" "/>
    <text variable="citation-number" suffix=". "/>
    </group>
    <group display="left-margin">
    <text macro="author" suffix=". "/>
    </group>
    <group display="left-margin">
    <text variable="title" suffix=". "/>
    </group>
    <group display="left-margin">
    <text variable="container-title" font-style="italic" suffix=". " form="short"/>
    <text macro="year-date" suffix=";"/>
    <text variable="volume"/>
    <text variable="issue" prefix="(" suffix=")"/>
    <text variable="page" prefix=":" suffix=". "/>
    </group>
    <group display="left-margin">
    <text variable="abstract"/>
    </group>
    </layout>

    But my output still looks like this:

    Abstract 1. Cattelani R, Zettin M, Zoccolotti P. Rehabilitation treatments for adults with behavioral and psychosocial disorders following acquired brain injury: a systematic review. Neuropsychol Rev. 2010;20(1):52-85. This review was aimed at systematically investigating the treatment efficacy and clinical effectiveness of neurobehavioral rehabilitation programs for adults with acquired brain injury and making evidence-based recommendations for the adoption of these rehabilitation trainings.

    Any thoughts or suggestions on what I'm doing wrong and where I might look to fix the issue?

    Thanks in advance for any insight.
  • How are you generating your output? csledit.xul, the word processor plugins, or some other way?
  • Here's the process that I've been following:

    1. I modify the code in Notepad.
    2. Validate using Validator.nu
    3. Install the updated style
    4. Change to a completely different style
    5. Refresh to the new style that I modified

    I'm using the Word Office plug-in (WinWord 3.1). I also just tried to use the new style using the drag-and-drop, but had the same result.

    Using Windows 7, Office 2007, Firefox 3.6.16, Zotero 2.1.5.
  • As far as I can see that should work, so you may have encountered a bug (one with which I cannot help you).
  • Rintze,

    I'm glad to know my logic is on the right track at least. I fiddled with it for at least an hour and was getting so frustrated that it wouldn't work.

    Thanks for responding to my post.
  • edited April 8, 2011
    This is a bit simpler, and seems to work here:
    <layout>
    <group display="block">
    <text value="Abstract" suffix=" "/>
    <text variable="citation-number" suffix=". "/>
    </group>
    <group display="block">
    <text macro="author" suffix=". "/>
    </group>
    <group display="block">
    <text variable="title" suffix=". "/>
    </group>
    <group display="block">
    <text variable="container-title"
    font-style="italic"
    suffix=". "
    form="short"/>
    <text macro="year-date" suffix=";"/>
    <text variable="volume"/>
    <text variable="issue" prefix="(" suffix=")"/>
    <text variable="page" prefix=":" suffix=". "/>
    </group>
    <group display="block">
    <text variable="abstract"/>
    </group>
    </layout>
    The block element gives you a definite "hard return" for each block. If you want the text indented under the heading, you can set hanging-indent="true" on the bibliography element.

    (Edit: Tested with Open Office under Linux. If you don't get line breaks on each block with Word, it may be a plugin issue; both systems receive the same code from the processor.)
  • @fbennett

    I went ahead and used the coding you provided (I think I tried a similar variant earlier this afternoon).

    And, no luck. Here was the output:

    Abstract 2. Cernich AN, Kurtz SM, Mordecai KL, Ryan PB. Cognitive rehabilitation in traumatic brain injury. Curr Treat Options Neurol. 2010;12(5):412-423. OPINION STATEMENT: Traumatic brain injury (TBI) is a major public health problem with neurobehavioral sequelae contributing to the long-term ...

    Would it make a difference at all if I upgraded to Firefox 4.0? I suspect not, else you already would have said.

    Really appreciate all of the advice and suggestions!
    Thanks
  • There shouldn't be a difference with Firefox 3.6, but I have it installed here, and will give it a try. Just a sec.
  • It works fine here with Firefox 3.6 as well, so you can leave Firefox alone. The difference between us seems to be in the plugin (Word versus Open Office). Just to be sure, can you post a copy of your full style on http://gist.github.com/ as a public gist, and post the URL from the address bar back here? If it's confirmed that the same style produces different results on the two systems, the devs may want to take a look.
  • Is it possible to insert a carriage return but not a blank line using the group display="block" command?
  • I'm pretty sure that the spacing in bibliographies is controlled by the word processor "Bibliography" style parameters. You should be able to change the spacing by making adjustments there. In HTML, I'm pretty sure that it's controlled by CSS (same thing, different language).
  • Right you are. I was using the Zotero reference test pane and assumed the problem was with the block command not CSS.
  • yes - as soon as you use the "display" functions in csl, what you see in the test pane has very little to do with what you get as actual output in the word processor or a pdf.
Sign In or Register to comment.