Annotated bibliography using edited code -- placing annotation on new line

edited September 28, 2020
Hello,

I am not an HTML-literate person, but I've managed to edit my base citation style (Nature) to include an annotation, as required for publication (in another journal w/out its own style). However, I'd really like for the indentation to show up on a new line and indented.

Currently, the annotation shows up in the citation itself, as follows:

1. Cohen, D. A. New York City as ‘fortress of solitude’ after Hurricane Sandy: a relational sociology of extreme weather’s relationship to climate politics. Environmental Politics 0, 1–21 (2020) Annotation Here.

All I did was to add <text variable="note" /> -- see below. How do I edit further to insert a paragraph break and indent, but keeping it within the same citation?


<bibliography et-al-min="6" et-al-use-first="1" second-field-align="flush" entry-spacing="0" line-spacing="2">
<layout suffix=".">
<text variable="citation-number" suffix="."/>
<group delimiter=" ">
<text macro="author" suffix="."/>
<text macro="title" suffix="."/>
<choose>
<if type="chapter paper-conference" match="any">
<text term="in"/>
</if>
</choose>
<text macro="container-title"/>
<text macro="editor"/>
<text macro="volume"/>
<text variable="page"/>
<text macro="issuance"/>
<text macro="access"/>
<text variable="note" />
</group>
</layout>
</bibliography>
</style>


thanks very much!
Leanne








  • <text variable="note" display="block"/>
    should work
  • Thanks adamsmith. This should work, based on what little I know, but it's not (annotation not set on new line -- it's acting like an inline block). Other ideas? Thanks!
  • How are you generating the bibliography?
  • I'm actually not even generating it yet -- I'm just editing the code within the Zotero style editor and looking at the output there. I would show you an image if I knew how to do that within a discussion post...
  • Try moving it out of the group. Also, display and second-field-align don't always work well simultaneously, so you might need to remove that.
  • Nope, those changes don't work either. I've explored a little further, and it looks like the code (used by Nature) is actually XML, not HTML. So perhaps that's the issue?
  • It's supposed to be XML -- could you take a screenshot of what you're currently seeing and post it somwhere (imgur.com, dropox, google drive) and link to it from here?
  • Sure, good idea. Here's a link to a Google drive file, with more info about 1) what I want; 2) what I get (image); and 3) full code.

    https://docs.google.com/document/d/1M_43NUxDOUWXeHrNY8MRCsWbWJC5LKonvqbJcr_3DnU/edit?usp=sharing
  • Try https://gist.github.com/adam3smith/b3cdb14da4263a954d072bca1e77b5eb/raw/7f7db6becf7b547790f64b2d947cfa3d598f01dc/nature-annotated.csl

    (this just does the two things I mentioned: move the variable out of the group and delete the second-field-align attribute)
  • edited November 10, 2020
    Thanks. I delete the second-field-align attribute and used <text variable="title-short" display="block" suffix=". "/> title-short (Al-Haq M I, Sugiyama J, Isobe S. Applications of Electrolyzed Water in Agriculture & Food Industries[J]. Food Science and Technology Research, 2005, 11(2): 135–150.) is my field I want to insert. However, a blank line appears between two references, how to avoid?

    [1] 黄智, 程伟伟, 张大磊, 等. 肉制品中亚硝胺形成影响因素和控制措施研究进展[J]. 食品工业科技, 2016(21): 372–376.
    Al-Haq M I, Sugiyama J, Isobe S. Applications of Electrolyzed Water in Agriculture & Food Industries[J]. Food Science and Technology Research, 2005, 11(2): 135–150.

    [2] Carvalho R H, Soares A L, Honorato D C B, 等. The incidence of pale, soft, and exudative (PSE) turkey meat at a Brazilian commercial plant and the functional properties in its meat product[J]. LWT - Food Science and Technology, 2014, 59(2): 883–888.
  • I don't think you can get rid of the line in between items when using display="block"
  • Thanks.
    Is there another solution?
    I would like to make them in a new line without a line break at the end
Sign In or Register to comment.