Help for html codes - deleting point

Dear zotero community,

I am not really common with html, therefore I would kindly ask you to help me with the following issue:

I would need to remove the ". " before the below listed example (". " before the Directorate-General for...).

"European Commission (2014), Population ageing in Europe. Facts, implications and policies, . Directorate-General for Research and Innovation, Luxembourg."

The style is based on Elsiever Harvard and the html code for the bibliography is:

<bibliography hanging-indent="true" entry-spacing="0" line-spacing="1">
<sort>
<key macro="author"/>
<key macro="issued" sort="descending"/>
</sort>
<layout>
<group suffix=".">
<text macro="author" suffix=""/>
<text macro="issued" prefix=" (" suffix=")"/>
<group prefix=", ">
<text macro="title" font-style="italic" suffix=", "/>
<text macro="container"/>
<text macro="locators"/>
</group>
</group>
<text macro="access" prefix=", "/>
</layout>
</bibliography>
</style>

Thank you very much in advance for your efforts,

Sebastian
  • This isn't HTML, but CSL. The period is likely coming from the line&lt;group suffix="."&gt;and you would removesuffix="."from that line. Note, though, that this will impact all citations (even those within a parent item (such as a journal article). It is also not completely unambiguous that this is the origin of your issues because you didn't include the macro definitions, the definition of the citation, or even the italics that would clearly separate the title from the container/locator info.

    Extraneous punctuation tends to be a hint that you could use fewer suffixes & more groups and/or delimiters (esp. in the case where it appears correctly for items with more info).

    So I'd suggest you should actually change, e.g.<text macro="title" font-style="italic" suffix=", "/>
    <text macro="container"/>
    <text macro="locators"/>
    to<group delimiter=", ">
    <text macro="title" font-style="italic">
    <group delimiter=" ">
    <text macro="container"/>
    <text macro="locators"/>
    </group>
    </group>
  • edited January 6, 2016
    That period is somewhere else in the style, likely in one of the macros. Post the whole style to gist.github.com (no registration needed), create a secret gist and provide the URL here & one of us will take a look.

    edit: btw. (and I'm only saying this since it might matter if you're searching for help somewhere else), the citation styles are XML, not HTML
  • (@noksagt -- while your advice is spot-on, I don't think the period is coming from that group suffix, since the only thing following that group is the access macro).
  • Dear noksagt and adamsmith,

    thank you in advance for your efforts, I really appreciate your help.

    Even though the solution proposed by noksagt seems logical (from my understanding of codes), the corrections did not work, unfortunately.

    Therefore I followed the advice by adamsmith and uploaded the XML codes so that you have access to the macros.

    Please find them under:

    https://gist.github.com/anonymous/8113d800375108845316

    Thank you very much in advance and have a nice evening,
    Sebastian
  • Yes, as I susptected, the period comes from the prefix here:
    https://gist.github.com/anonymous/8113d800375108845316#file-gistfile1-txt-L185

    You could try just deleting it. The exact way to fix it, of course, depends on what you want your references to look like.
  • edited January 6, 2016
    That helps. We still don't have the reference you're trying to cite, but my guess is that the period originates from the locators macro: <else-if type="bill book graphic legal_case legislation motion_picture report song thesis" match="any">
    <group delimiter=", " prefix=". ">
    <text macro="event"/>
    So your title gives a suffix of ", " and you have no container and then your issued macro provides the "."


    While I think that using delimiters rather than suffixes/prefixes more robust and more clear, the easiest way to remove the dot would be to remove the prefix=". " from the above code block (EDIT: just as adamsmith suggests).

    I actually think it may be preferable (more consistent) to leave it in and get rid of the comma, but I don't know your style. If that is an OK solution, then change: <text macro="title" font-style="italic" suffix=", "/>
    <text macro="container"/>
    to:<group delimiter=", ">
    <text macro="title" font-style="italic"/>
    <text macro="container"/>
    </group>
  • Dear adamsmith, dear noksagt,

    thank you very much for your help. Modifying the 'container' macro has helped to resolve the issue.

    I wish you a very pleasant day,
    Sebastian

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.