Editing Style: Change "u.a." to "et al.", add URL for internet citations

edited February 13, 2021
Hello,
I edited the Style "Acta Polytechnica" mostly to my needs in the Visual CSL Editor, but there are 2 things that I could not figure out how to change:

1. How do I keep the "et al." abbreviation instead of "u. a.", while using "de-DE" as default-locale? I changed the locale to de-DE, so that it shows "S." instead of "p." (pages).

2. I want internet sources to be cited as follows:
[1] Author: URL. Accessed: Date of access
(I hope the word "Accessed" changes to the german equivalent, using de-DE)
(The Style "World Applied Sciences Journal" has an 80 % match)

Other problem:
1. I could not figure out, how to add the new style to my Zotero. I downloaded the original Acta Polytechnica style, clicked on "citation style editor", removed the original code and pasted the modified code from the Code Editor, after doing my adjustments in the visual editor. I clicked on "save as" so now I have the CSL-File on my desktop. What do I do from here?

2. I checked the style on https://validator.citationstyles.org/ and it finds 2 errors, that I don't understand, considering I just copy and pasted the Code Editor code in there. The orginal style has no errors.

If someone could help me with these issues, I would appreciate it a lot! Thank you for your time and effort!

Code from the CSL Code Editor (Added the word "modified" in Title, ID and the 1st ref link (Hope that's right)):


<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl"; class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="de-DE">
<info>
<title>Acta Polytechnica modified</title>
<id>http://www.zotero.org/styles/acta-polytechnica-modified</id>;
<link href="http://www.zotero.org/styles/acta-polytechnica-modified"; rel="self"/>
<link href="http://www.cvut.cz/en/facilities/ph/ap/resolveuid/a1a4420631dd2b61eff7a823f4b4f949"; rel="documentation"/>
<author>
<name>Libor Ansorge</name>
<email>libor.ansorge@gmail.com</email>
</author>
<category citation-format="numeric"/>
<category field="engineering"/>
<issn>1210-2709</issn>
<eissn>1805-2363</eissn>
<summary>Style for journal Acta Polytechnica</summary>
<updated>2021-02-13T09:48:33+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<macro name="author">
<names variable="author">
<name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
<label form="short" prefix=" "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
</substitute>
</names>
</macro>
<macro name="container-author"/>
<macro name="year-date">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year" form="long"/>
</date>
</if>
<else>
<text term="no date"/>
</else>
</choose>
</macro>
<macro name="page">
<group delimiter=" ">
<text term="page" form="short"/>
<text variable="page"/>
</group>
</macro>
<macro name="issue">
<group delimiter=" " prefix="(" suffix=")">
<text variable="issue"/>
</group>
</macro>
<citation collapse="citation-number" after-collapse-delimiter="; ">
<sort>
<key variable="citation-number"/>
</sort>
<layout prefix="[" suffix="]" delimiter=", ">
<text variable="citation-number"/>
<group delimiter=" ">
<label variable="locator" form="short" prefix=" "/>
<text variable="locator"/>
</group>
</layout>
</citation>
<bibliography entry-spacing="1" second-field-align="flush" et-al-min="3" et-al-use-first="1">
<sort>
<key variable="citation-number"/>
</sort>
<layout>
<text variable="citation-number" prefix="[" suffix="]"/>
<group delimiter=", " suffix=": ">
<text macro="author"/>
</group>
<choose>
<if type="book report" match="any">
<group delimiter=". " suffix=". ">
<text variable="title" font-style="italic"/>
<text variable="number"/>
<group delimiter=", ">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
<text macro="year-date"/>
</group>
</group>
</if>
<else-if type="paper-conference chapter" match="any">
<group delimiter=". " suffix=". ">
<text variable="title" font-style="italic"/>
<group delimiter=" ">
<group delimiter=": "/>
<text variable="event"/>
<text macro="container-author" prefix="(" suffix=")"/>
</group>
<group delimiter=", ">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
<text macro="year-date"/>
<text macro="page"/>
</group>
</group>
</else-if>
<else-if type="article-journal article-magazine article-newspaper" match="any">
<group delimiter=". " suffix=". ">
<text variable="title" font-style="italic"/>
<group delimiter=", ">
<text variable="container-title" form="short" font-style="normal"/>
<group delimiter=" ">
<text variable="volume" font-weight="bold"/>
<text macro="issue"/>
</group>
<text macro="year-date"/>
<text macro="page"/>
</group>
</group>
</else-if>
<else>
<group delimiter=". " suffix=". ">
<text variable="title" font-style="italic"/>
<group delimiter=", ">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
<text macro="year-date"/>
<text variable="volume"/>
<text macro="page"/>
</group>
</group>
</else>
</choose>
</layout>
</bibliography>
</style>
  • 1. et al. instead of u. a. -- you'd need to (re)define the term for et al. see e.g. how this is done in the DGP style: https://github.com/citation-style-language/styles/blob/master/deutsche-gesellschaft-fur-psychologie.csl#L29

    2. Insert something like this in the bibliography (e.g. after the last else-if before the else):
    <else-if type="webpage" match="any">
    <group delimiter=". ">
    <text variable="URL"/>
    <group delimiter=": ">
    <text term="accessed" text-case="capitalize=first"/>
    <date variable="accessed" form="numeric"/>
    </group>
    </group>
    </else-if>


    Might need some tweaking as needed.

    3. You can just double-click a downloaded CSL file to install into Zotero or you can install from Zotero's preferences under Cite --> Styles, clicking the + sign and then selecting the downloaded file. Note that you will want to have the style id modified for this.

    4. The style you posted has a bunch of semicolons where they don't belong (in lines 2, 5, 6, 7) -- not sure how they got there. I don't think the visual editor would do that? Beyond that, you have an empty macro in line 30 and an empty group in line 93, both of which you can simply delete.
  • edited February 13, 2021
    Thank you so much for your help and the effort you put in, I could not have done it without you! I appreciate it a lot. It seems to work perfectly now.
    Regarding the 4th point: Interestingly, I don't know where the semicolons came from. I copied the code from Notepad++ and these semicolons are not there either...

    This is what the code looks like now:

    <?xml version="1.0" encoding="utf-8"?>
    <style xmlns="http://purl.org/net/xbiblio/csl"; class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="de-DE">
    <info>
    <title>Acta Polytechnica modified</title>
    <id>http://www.zotero.org/styles/acta-polytechnica-modified</id>;
    <link href="http://www.zotero.org/styles/acta-polytechnica-modified"; rel="self"/>
    <link href="http://www.cvut.cz/en/facilities/ph/ap/resolveuid/a1a4420631dd2b61eff7a823f4b4f949"; rel="documentation"/>
    <author>
    <name>Libor Ansorge</name>
    <email>libor.ansorge@gmail.com</email>
    </author>
    <category citation-format="numeric"/>
    <category field="engineering"/>
    <issn>1210-2709</issn>
    <eissn>1805-2363</eissn>
    <summary>Style for journal Acta Polytechnica</summary>
    <updated>2021-02-13T09:48:33+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
    </info>
    <locale xml:lang="de">
    <terms>
    <term name="et-al">et al.</term>
    </terms>
    </locale>
    <macro name="author">
    <names variable="author">
    <name name-as-sort-order="all" sort-separator=", " initialize-with="." delimiter-precedes-last="never" delimiter=", "/>
    <label form="short" prefix=" "/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    </substitute>
    </names>
    </macro>
    <macro name="year-date">
    <choose>
    <if variable="issued">
    <date variable="issued">
    <date-part name="year" form="long"/>
    </date>
    </if>
    <else>
    <text term="no date"/>
    </else>
    </choose>
    </macro>
    <macro name="page">
    <group delimiter=" ">
    <text term="page" form="short"/>
    <text variable="page"/>
    </group>
    </macro>
    <macro name="issue">
    <group delimiter=" " prefix="(" suffix=")">
    <text variable="issue"/>
    </group>
    </macro>
    <citation collapse="citation-number" after-collapse-delimiter="; ">
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout prefix="[" suffix="]" delimiter=", ">
    <text variable="citation-number"/>
    <group delimiter=" ">
    <label variable="locator" form="short" prefix=" "/>
    <text variable="locator"/>
    </group>
    </layout>
    </citation>
    <bibliography entry-spacing="1" second-field-align="flush" et-al-min="3" et-al-use-first="1">
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout>
    <text variable="citation-number" prefix="[" suffix="]"/>
    <group delimiter=", " suffix=": ">
    <text macro="author"/>
    </group>
    <choose>
    <if type="book report" match="any">
    <group delimiter=". " suffix=". ">
    <text variable="title" font-style="italic"/>
    <text variable="number"/>
    <group delimiter=", ">
    <group delimiter=": ">
    <text variable="publisher-place"/>
    <text variable="publisher"/>
    </group>
    <text macro="year-date"/>
    </group>
    </group>
    </if>
    <else-if type="paper-conference chapter" match="any">
    <group delimiter=". " suffix=". ">
    <text variable="title" font-style="italic"/>
    <group delimiter=" ">
    <text variable="event"/>
    </group>
    <group delimiter=", ">
    <group delimiter=": ">
    <text variable="publisher-place"/>
    <text variable="publisher"/>
    </group>
    <text macro="year-date"/>
    <text macro="page"/>
    </group>
    </group>
    </else-if>
    <else-if type="article-journal article-magazine article-newspaper" match="any">
    <group delimiter=". " suffix=". ">
    <text variable="title" font-style="italic"/>
    <group delimiter=", ">
    <text variable="container-title" form="short" font-style="normal"/>
    <group delimiter=" ">
    <text variable="volume" font-weight="normal"/>
    <text macro="issue"/>
    </group>
    <text macro="year-date"/>
    <text macro="page"/>
    </group>
    </group>
    </else-if>
    <else-if type="webpage" match="any">
    <group delimiter=". ">
    <text variable="URL"/>
    <group delimiter=": ">
    <text term="accessed" text-case="capitalize-first"/>
    <date variable="accessed" form="numeric"/>
    </group>
    </group>
    </else-if>
    <else>
    <group delimiter=". " suffix=". ">
    <text variable="title" font-style="italic"/>
    <group delimiter=", ">
    <group delimiter=": ">
    <text variable="publisher-place"/>
    <text variable="publisher"/>
    </group>
    <text macro="year-date"/>
    <text variable="volume"/>
    <text macro="page"/>
    </group>
    </group>
    </else>
    </choose>
    </layout>
    </bibliography>
    </style>

  • (2nd time I've seen the semicolons now)
  • Funfact: If I click on "Edit", the semicolons are (rightfully so) not shown. They seem to only appear in the posted answer/comment
Sign In or Register to comment.