# How to handle .CSL's format and abbreviations (like \*ibidem\*, \*op.cit.\*, etc.) for .pdf output in pandoc (in RStudio Quarto)?

**URL:** <https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782>\
**Category:** CSL Usage\
**Created:** [November 1, 2022, 3:29pm UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782 "2022-11-01T15:29:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas-R-Sheriff](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@Nicholas-R-Sheriff](https://discourse.citationstyles.org/u/Nicholas-R-Sheriff)\
**Post date:** [November 1, 2022, 3:29pm UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/1 "2022-11-01T15:29:01Z")

</div>

Thank you all in advance, for being here, for this amazing tool that CSL is, and for taking the time for reading this.  
I am using a _.csl_ file in a Quarto project, as it is implemented as a feature, specifying an entry in the YML header which tells **citeproc** to reshape citations and bibliography as per the style imposed by the _.csl_ file.  
I am have already asked this in the Quarto GitHub project page opening an [issue](https://github.com/quarto-dev/quarto-cli/issues/3131). There you can find info about the version of the software I am using for writing my .pdf, which I do not know them to have any relevance here in this forum.

# Issue illustration

I am currently having to use a custom _.csl_ file to style my citations in order to comply with my istitution’s annoying rules, but it does not seem to work as expected.

For instance, take into account that I have to cite **inside two different _footnotes_** (yes, I have to cite sources in footnotes) _pages 1 to 10_ and then _pages 11 to 17_ of the following article

```auto
@article{commenges_statistical_2009,
	title = {Statistical models: {Conventional}, penalized and hierarchical likelihood},
	volume = {3},
	issn = {1935-7516},
	shorttitle = {Statistical models},
	url = {https://projecteuclid.org/journals/statistics-surveys/volume-3/issue-none/Statistical-models-Conventional-penalized-and-hierarchical-likelihood/10.1214/08-SS039.full},
	doi = {10.1214/08-SS039},
	number = {none},
	urldate = {2022-11-01},
	journal = {Statistics Surveys},
	author = {Commenges, Daniel},
	year = {2009},
}

```

and that, concerning citation abbreviations, in the `locale` block of my _.csl_ file I have (_please, notice the **short** and **long** abbreviations forms_)

```auto
<locale xml:lang="it-IT">
    <terms>
      <term name="page" form="short">
        <single>p.</single>
        <multiple>pp.</multiple>
      </term>
      <term name="translator" form="verb-short">tr. it. di</term>
      <term name="no date">s.d.</term>
      <term name="ibid" form="short">ivi</term>
      <term name="ibid" form="long">ibidem</term>
      <term name="cited" form="short">cit.</term>
      <term name="cited" form="long">op.cit.</term>
      <term name="issue" form="short">fasc.</term>
      <term name="season-01">primavera</term>
      <term name="season-02">estate</term>
      <term name="season-03">autunno</term>
      <term name="season-04">inverno</term>
    </terms>
  </locale>

```

Hence, I create a footnote and then type

```auto
@commenges_statistical_2009, pp. 1-10.

```

So, I make another footnote and type

```auto
@commenges_statistical_2009, pp. 11-17.

```

## Actual behaviour

I get (please, notice the _ **short shaped** _ abbreviation **cit.** in the **second citation** , and that there is no space between the abbreviation and the quotation glyph ``\>\>‘’ ) the following

```auto
> D. COMMENGES, Statistical models: Conventional, penalized and hierarchical likeli-
hood, «Statistics Surveys», vol. 3, fasc. none, 2009, https://projecteuclid.org/journals
/statistics-surveys/volume-3/issue-none/Statistical-models-Conventional-penalized-
and-hierarchical-likelihood/10.1214/08-SS039.full, pp. 1-1

> D. Commenges, «Statistical models»cit., pp. 1-17.

```

## Expected behaviour

I get (please, notice the _ **long shaped** _ abbreviation **op. cit.** in the **second citation** , and that there is a blank space between the abbreviation itself and the quotation glyph ``\>\>‘’) the following

```auto
> D. COMMENGES, Statistical models: Conventional, penalized and hierarchical likeli-
hood, «Statistics Surveys», vol. 3, fasc. none, 2009, https://projecteuclid.org/journals
/statistics-surveys/volume-3/issue-none/Statistical-models-Conventional-penalized-
and-hierarchical-likelihood/10.1214/08-SS039.full, pp. 1-1

> D. Commenges, «Statistical models» op.cit., pp. 1-17.

```

# Question

How to deal with such an issue?  
Do I have to modify something in _.csl_ file or do I have, perhaps, to specify something to get the _ **long form** _ of the abbreviation (_op.cit_ instead of _cit._).  
Moreover, is there a way for one to make use of the handy abbreviation _ **ibidem** _ (or _ **ivi** _, as per the short form in this _.csl_)?  
I am asking this additional question too because it is not clear how one could specify same resource with same pages in two different citations and get the supposed abbreviation _ibidem_ as a replacement for a matching citation following the first.

## The .csl file itself

Hereby follows the _.csl_ I am using in Quarto specifying it in the proper `YML` field, which I got modifying the one named [_Quaderni Materialisti (Italiano)_](https://editor.citationstyles.org/styleInfo/?styleId=http%3A%2F%2Fwww.zotero.org%2Fstyles%2Fquaderni-materialisti).

```auto
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" default-locale="it-IT" demote-non-dropping-particle="sort-only">
  <!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/) -->
  <info>
    <title>Quaderni Materialisti (Italiano)</title>
    <id>http://www.zotero.org/styles/quaderni-materialisti</id>
    <link href="http://www.zotero.org/styles/quaderni-materialisti" rel="self"/>
    <link href="http://www.zotero.org/styles/universita-di-bologna-lettere" rel="template"/>
    <link href="http://www.quadernimaterialisti.unimib.it/?p=107" rel="documentation"/>
    <author>
      <name>Patrick O'Brien</name>
    </author>
    <category citation-format="note"/>
    <category field="humanities"/>
    <category field="linguistics"/>
    <category field="philosophy"/>
    <issn>1972-3792</issn>
    <updated>2022-09-14T21:23:48+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="it-IT">
    <terms>
      <term name="page" form="short">
        <single>p.</single>
        <multiple>pp.</multiple>
      </term>
      <term name="translator" form="verb-short">tr. it. di</term>
      <term name="no date">s.d.</term>
      <term name="ibid" form="short">ivi</term>
      <term name="ibid" form="long">ibidem</term>
      <term name="cited" form="short">cit.</term>
      <term name="cited" form="long">op.cit.</term>
      <term name="issue" form="short">fasc.</term>
      <term name="season-01">primavera</term>
      <term name="season-02">estate</term>
      <term name="season-03">autunno</term>
      <term name="season-04">inverno</term>
    </terms>
  </locale>
  <macro name="editor-translator">
    <group delimiter=", ">
      <choose>
        <if variable="author">
          <names variable="editor" delimiter=", ">
            <name initialize-with=". "/>
            <label form="verb" text-case="lowercase" prefix=" (" suffix=") " strip-periods="true"/>
          </names>
          <choose>
            <if variable="container-author">
              <group>
                <text term="in" text-case="lowercase" suffix=" "/>
                <names variable="container-author">
                  <name initialize-with=". "/>
                </names>
              </group>
            </if>
          </choose>
        </if>
      </choose>
      <choose>
        <if variable="author editor" match="any">
          <choose>
            <if match="none" variable="original-title">
              <names variable="translator" delimiter=", ">
                <label form="verb-short" text-case="lowercase" strip-periods="true" prefix=" "/>
                <name prefix=" "/>
              </names>
            </if>
          </choose>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="secondary-contributors">
    <choose>
      <if type="chapter paper-conference" match="none">
        <text macro="editor-translator"/>
      </if>
    </choose>
  </macro>
  <macro name="container-contributors">
    <choose>
      <if type="chapter paper-conference" match="any">
        <text macro="editor-translator"/>
      </if>
    </choose>
  </macro>
  <macro name="editor-note">
    <names variable="editor">
      <name initialize-with=". "/>
      <label form="verb" prefix=" (" suffix=")" strip-periods="true"/>
    </names>
  </macro>
  <macro name="translator-note">
    <names variable="translator">
      <name sort-separator=", " delimiter=", "/>
      <label form="verb-short" prefix=", "/>
    </names>
  </macro>
  <macro name="recipient-note">
    <names variable="recipient" delimiter=", ">
      <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
      <name and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="contributors-note">
    <names variable="author" font-variant="small-caps">
      <name initialize-with=". "/>
      <substitute>
        <text macro="editor-note"/>
        <text macro="translator-note"/>
      </substitute>
    </names>
    <text macro="recipient-note"/>
  </macro>
  <macro name="editor">
    <names variable="editor">
      <name delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="first"/>
      <label form="verb" strip-periods="false" prefix=" (" suffix=")"/>
    </names>
  </macro>
  <macro name="translator">
    <names variable="translator">
      <name name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
      <label form="verb-short" prefix=" (" suffix=")"/>
    </names>
  </macro>
  <macro name="recipient">
    <choose>
      <if type="personal_communication">
        <choose>
          <if variable="genre">
            <text variable="genre" text-case="capitalize-first"/>
          </if>
          <else>
            <text term="letter" text-case="capitalize-first"/>
          </else>
        </choose>
      </if>
    </choose>
    <text macro="recipient-note" prefix=" "/>
  </macro>
  <macro name="contributors">
    <names variable="author" font-variant="small-caps">
      <name delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="first"/>
      <substitute>
        <text macro="editor"/>
        <text macro="translator"/>
      </substitute>
    </names>
    <text macro="recipient" prefix=". "/>
  </macro>
  <macro name="recipient-short">
    <names variable="recipient">
      <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
      <name form="short" and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="contributors-short">
    <names variable="author">
      <name form="long" initialize-with="." delimiter=", "/>
      <substitute>
        <names variable="editor"/>
        <names variable="translator"/>
      </substitute>
    </names>
    <text macro="recipient-short"/>
  </macro>
  <macro name="contributors-sort">
    <names variable="author">
      <name name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
      <substitute>
        <names variable="editor"/>
        <names variable="translator"/>
      </substitute>
    </names>
  </macro>
  <macro name="interviewer-note">
    <names variable="interviewer" delimiter=", ">
      <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
      <name and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="interviewer">
    <names variable="interviewer" delimiter=", ">
      <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
      <name and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="title-note">
    <choose>
      <if variable="title" match="none">
        <text variable="genre"/>
      </if>
      <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
        <group delimiter=", ">
          <text macro="original-note"/>
          <text variable="title" font-style="italic"/>
        </group>
      </else-if>
      <else>
        <text variable="title" quotes="false" font-style="italic"/>
      </else>
    </choose>
  </macro>
  <macro name="title">
    <choose>
      <if variable="title" match="none">
        <choose>
          <if type="personal_communication" match="none">
            <text variable="genre" text-case="capitalize-first"/>
          </if>
        </choose>
      </if>
      <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
        <group delimiter=", ">
          <text macro="original"/>
          <text variable="title" font-style="italic"/>
        </group>
      </else-if>
      <else>
        <text variable="title" quotes="false" font-style="italic"/>
      </else>
    </choose>
  </macro>
  <macro name="title-short">
    <choose>
      <if disambiguate="true">
        <choose>
          <if variable="title" match="none">
            <choose>
              <if type="interview">
                <text term="interview" text-case="lowercase"/>
              </if>
              <else-if type="manuscript speech" match="any">
                <text variable="genre" form="short"/>
              </else-if>
              <else-if type="personal_communication">
                <text macro="issued"/>
              </else-if>
            </choose>
          </if>
          <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
            <text variable="title" form="short"/>
          </else-if>
          <else>
            <text variable="title" form="short" quotes="true"/>
          </else>
        </choose>
        <text term="cited" form="short"/>
      </if>
      <else>
        <text term="cited" form="long" font-style="italic"/>
      </else>
    </choose>
  </macro>
  <macro name="description-note">
    <group delimiter=", ">
      <text macro="interviewer-note"/>
      <text variable="medium"/>
      <choose>
        <if variable="title" match="none"/>
        <else-if type="thesis speech" match="any"/>
        <else>
          <text variable="genre"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="description">
    <group delimiter=", ">
      <group delimiter=". ">
        <text macro="interviewer"/>
        <text variable="medium" text-case="capitalize-first"/>
      </group>
      <choose>
        <if variable="title" match="none"/>
        <else-if type="thesis speech" match="any"/>
        <else>
          <text variable="genre" text-case="capitalize-first"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="container-title">
    <choose>
      <if type="legal_case" match="none">
        <text variable="container-title" quotes="true" font-style="italic"/>
      </if>
    </choose>
  </macro>
  <macro name="collection-title">
    <text variable="collection-title"/>
    <text variable="collection-number" prefix=" "/>
  </macro>
  <macro name="locators">
    <choose>
      <if type="article-journal">
        <group delimiter=" " prefix=", ">
          <text term="volume" form="short"/>
          <text variable="volume"/>
        </group>
        <group prefix=", ">
          <text term="issue" form="short" suffix=" "/>
          <number variable="issue"/>
        </group>
      </if>
      <else-if type="legal_case">
        <text variable="volume" prefix=", "/>
        <text variable="container-title" prefix=" "/>
        <text variable="page" prefix=" "/>
        <text variable="locator" prefix=", "/>
      </else-if>
      <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
        <group prefix=", " delimiter=", ">
          <group>
            <text term="volume" form="short" suffix=" "/>
            <number variable="volume" form="roman"/>
          </group>
          <choose>
            <if variable="locator" match="none">
              <group>
                <number variable="number-of-volumes" form="numeric"/>
                <text term="volume" form="short" prefix=" " plural="true"/>
              </group>
            </if>
          </choose>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-newspaper">
    <choose>
      <if type="article-newspaper">
        <group delimiter=", ">
          <group delimiter=" ">
            <text variable="edition"/>
            <text term="edition"/>
          </group>
          <group>
            <text term="section" form="short" suffix=" "/>
            <text variable="section"/>
          </group>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="event">
    <group>
      <text term="presented at" suffix=" "/>
      <text variable="event"/>
    </group>
  </macro>
  <macro name="publisher">
    <group delimiter=", ">
      <text variable="publisher-place"/>
      <text variable="publisher"/>
    </group>
  </macro>
  <macro name="issued">
    <choose>
      <if variable="issued">
        <choose>
          <if type="graphic report" match="any">
            <date variable="issued">
              <date-part name="month" suffix=" "/>
              <date-part name="day" suffix=", "/>
              <date-part name="year"/>
            </date>
          </if>
          <else-if type="legal_case">
            <text variable="authority" suffix=" "/>
            <date variable="issued">
              <date-part name="year"/>
            </date>
          </else-if>
          <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
            <date variable="issued">
              <date-part name="year"/>
            </date>
          </else-if>
          <else-if type="article-journal">
            <date variable="issued">
              <date-part name="month" text-case="lowercase" suffix=" "/>
              <date-part name="year"/>
            </date>
          </else-if>
          <else>
            <date variable="issued">
              <date-part name="month" text-case="lowercase" suffix=" "/>
              <date-part name="day" suffix=", "/>
              <date-part name="year"/>
            </date>
          </else>
        </choose>
      </if>
      <else>
        <text term="no date" form="short"/>
      </else>
    </choose>
  </macro>
  <macro name="point-locators-subsequent">
    <group>
      <choose>
        <if locator="page" match="none">
          <choose>
            <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
              <choose>
                <if variable="volume">
                  <group>
                    <text term="volume" form="short" text-case="lowercase" suffix=" "/>
                    <number variable="volume" form="numeric"/>
                    <label variable="locator" form="short" prefix=", " suffix=" "/>
                  </group>
                </if>
                <else>
                  <label variable="locator" form="short" suffix=" "/>
                </else>
              </choose>
            </if>
          </choose>
        </if>
        <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
          <number variable="volume" form="numeric" suffix=":"/>
        </else-if>
      </choose>
      <text variable="locator"/>
    </group>
  </macro>
  <macro name="point-locators">
    <choose>
      <if variable="locator" match="none">
        <text macro="pages"/>
      </if>
      <else-if type="article-journal">
        <text variable="locator" prefix=": "/>
      </else-if>
      <else-if type="legal_case"/>
      <else>
        <group prefix=", ">
          <choose>
            <if locator="page" match="none">
              <label variable="locator" form="short" suffix=" "/>
            </if>
          </choose>
          <label variable="locator" form="short" suffix=" "/>
          <text variable="locator"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="pages">
    <label variable="page" form="short" prefix=", " suffix=" "/>
    <text variable="page"/>
  </macro>
  <macro name="locators-chapter">
    <choose>
      <if type="chapter paper-conference" match="any">
        <choose>
          <if variable="page">
            <text variable="volume" suffix=":"/>
            <text variable="page"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-journal">
    <choose>
      <if type="article-journal">
        <label variable="page" form="short" prefix=", " suffix=" "/>
        <text variable="page"/>
      </if>
    </choose>
  </macro>
  <macro name="archive-note">
    <group delimiter=", ">
      <text variable="archive_location"/>
      <text variable="archive"/>
      <text variable="archive-place"/>
    </group>
  </macro>
  <macro name="archive">
    <group delimiter=". ">
      <text variable="archive_location" text-case="capitalize-first"/>
      <text variable="archive"/>
      <text variable="archive-place"/>
    </group>
  </macro>
  <macro name="issue">
    <choose>
      <if type="article-journal legal_case" match="any">
        <text macro="issued" prefix=", "/>
      </if>
      <else-if variable="publisher-place publisher" match="any">
        <group prefix=", " delimiter=", ">
          <group delimiter=", ">
            <choose>
              <if variable="title" match="none"/>
              <else-if type="thesis speech" match="any">
                <text variable="genre"/>
              </else-if>
            </choose>
            <text macro="event"/>
          </group>
          <text macro="publisher"/>
          <text macro="issued"/>
        </group>
      </else-if>
      <else>
        <text macro="issued" prefix=", "/>
      </else>
    </choose>
  </macro>
  <macro name="access-note">
    <group delimiter=", ">
      <choose>
        <if type="graphic report" match="any">
          <text macro="archive-note"/>
        </if>
        <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="none">
          <text macro="archive-note"/>
        </else-if>
      </choose>
      <choose>
        <if type="legal_case" match="none">
          <text variable="URL"/>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="access">
    <group delimiter=". ">
      <choose>
        <if type="graphic report" match="any">
          <text macro="archive"/>
        </if>
        <else-if type="article-journal article-magazine article-newspaper bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="none">
          <text macro="archive"/>
        </else-if>
      </choose>
      <choose>
        <if type="legal_case" match="none">
          <text variable="URL"/>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="original-note">
    <group delimiter=", ">
      <text variable="original-title" font-style="italic"/>
      <text variable="original-publisher-place"/>
      <text variable="original-publisher"/>
      <date form="text" variable="original-date"/>
      <names variable="translator">
        <label form="verb-short" suffix=" "/>
        <name/>
      </names>
    </group>
  </macro>
  <macro name="original">
    <group delimiter=", ">
      <text variable="original-title"/>
      <text variable="original-publisher-place"/>
      <text variable="original-publisher"/>
      <date form="text" variable="original-date"/>
      <names variable="translator">
        <label form="verb-short" suffix=" "/>
        <name initialize-with=". "/>
      </names>
    </group>
  </macro>
  <citation et-al-min="4" et-al-use-first="1">
    <layout delimiter="; " suffix=".">
      <choose>
        <if position="ibid-with-locator">
          <group delimiter=", ">
            <text term="ibid" form="long" text-case="capitalize-first" font-style="italic"/>
            <text macro="point-locators-subsequent"/>
          </group>
        </if>
        <else-if position="ibid">
          <text term="ibid" form="short" text-case="capitalize-first" font-style="italic"/>
        </else-if>
        <else-if position="subsequent">
          <group delimiter=", ">
            <text macro="contributors-short"/>
            <text macro="title-short"/>
            <text macro="point-locators-subsequent"/>
          </group>
        </else-if>
        <else>
          <group delimiter=", ">
            <text macro="contributors-note"/>
            <text macro="title-note"/>
            <text macro="description-note"/>
            <text macro="secondary-contributors"/>
            <text macro="container-contributors"/>
            <text macro="container-title"/>
          </group>
          <text macro="locators"/>
          <text macro="collection-title" prefix=", "/>
          <text macro="issue"/>
          <text macro="locators-newspaper" prefix=", "/>
          <text macro="access-note" prefix=", "/>
          <text macro="point-locators"/>
        </else>
      </choose>
    </layout>
  </citation>
  <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="———" entry-spacing="0">
    <sort>
      <key macro="contributors-sort"/>
      <key variable="title"/>
      <key variable="genre"/>
      <key variable="issued"/>
    </sort>
    <layout suffix=".">
      <group delimiter=", ">
        <text macro="contributors"/>
        <text macro="title"/>
        <text macro="description"/>
        <text macro="secondary-contributors"/>
        <group delimiter=", ">
          <text macro="container-contributors"/>
          <text macro="container-title"/>
          <text macro="locators-chapter"/>
        </group>
      </group>
      <text macro="locators"/>
      <text macro="collection-title" prefix=". "/>
      <text macro="issue"/>
      <text macro="locators-newspaper" prefix=", "/>
      <text macro="locators-journal"/>
      <text macro="access" prefix=". "/>
    </layout>
  </bibliography>
</style>

```

Thank you all once more!

_Nicholas_

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [November 2, 2022, 9:31pm UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/2 "2022-11-02T21:31:10Z")

</div>

Hopefully someone else will drop by and address the details, but worth pointing out (after I looked at the site) that Quarto is using pandoc for the processing, including for the CSL support.

---

<div class="post-metadata">

**Author:** ![zepinglee](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/zepinglee/32/278_2.png) [@zepinglee](https://discourse.citationstyles.org/u/zepinglee)\
**Post date:** [November 3, 2022, 3:48am UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/3 "2022-11-03T03:48:42Z")

</div>

> [@Nicholas-R-Sheriff](#):
>
> Do I have to modify something in _.csl_ file or do I have, perhaps, to specify something to get the _ **long form** _ of the abbreviation (_op.cit_ instead of _cit._).

The short form of this term (`<text term="cited" form="short"/>`) is in the `disambiguate="true"` branch in the `title-short` macro. It means if another work of D. Commenges is cited which causes ambiguity, the short title along with short form of “cited” is outputted. It’s true that the space between them is missing and you may add `prefix=" "` to the term. If there is no such ambiguity, only the long form of “cited” is outputted. Is this the expected behavior?

> [@Nicholas-R-Sheriff](#):
>
> Moreover, is there a way for one to make use of the handy abbreviation _ **ibidem** _ (or _ **ivi** _, as per the short form in this _.csl_)?

The “ibid” term is used in the `position="ibid-with-locator"` and `position="ibid"` conditions in the `citation` element. See the [“position” condition](https://docs.citationstyles.org/en/stable/specification.html#choose) in the spec for details.

---

<div class="post-metadata">

**Author:** ![Nicholas-R-Sheriff](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@Nicholas-R-Sheriff](https://discourse.citationstyles.org/u/Nicholas-R-Sheriff)\
**Post date:** [November 4, 2022, 4:27pm UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/4 "2022-11-04T16:27:48Z")

</div>

Thank you @Bruce_D_Arcus1 for pointing it out, yet indeed I specified the use of **Pandoc** in this thread’s title 😄 .

---

<div class="post-metadata">

**Author:** ![Nicholas-R-Sheriff](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@Nicholas-R-Sheriff](https://discourse.citationstyles.org/u/Nicholas-R-Sheriff)\
**Post date:** [November 4, 2022, 5:03pm UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/5 "2022-11-04T17:03:39Z")

</div>

Really thank you @zepinglee for your neat explanation. I added `prefix=" "` to term as you suggested but in the `locale info block` to make it like a more “always valid” configuration, and **it worked** well.

```auto
  </info>
  <locale xml:lang="it-IT">
    <terms>
      <term name="page" form="short">
        <single>p.</single>
        <multiple>pp.</multiple>
      </term>
      <term name="translator" form="verb-short">tr. it. di</term>
      <term name="no date">s.d.</term>
      <term name="ibid" prefix=" " form="short">ivi</term>
      <term name="ibid" prefix=" " form="long">ibidem</term>
      <term name="cited" prefix=" " form="short">cit.</term>
      <term name="cited" prefix=" " form="long">op.cit.</term>
      <term name="issue" prefix=" " form="short">fasc.</term>
      <term name="season-01">primavera</term>
      <term name="season-02">estate</term>
      <term name="season-03">autunno</term>
      <term name="season-04">inverno</term>
    </terms>
  </locale>

```

> [@zepinglee](#):
>
> If there is no such ambiguity, only the long form of “cited” is outputted. Is this the expected behavior?

I realised this is actually how it should work. Is there any specific approach to avoid ambiguity? I am asking this since it happened that the short form was being outputted even though I was citing the same book.

> [@zepinglee](#):
>
> The “ibid” term is used in the `position="ibid-with-locator"` and `position="ibid"` conditions in the `citation` element.

I know that this could be truly straightforward to be overcome by just typing ‘_ibidem_’ manually. Nevertheless, I’ll try to figure it out by myself if you can’t add specific details, but, if I may take a bit more advantage of your kindly given help, I still don’t understand how to make use of the `page` **locator** in order that, for instance, two successive footnotes like the following

```auto
1: @commenges_statistical_2009, pp. 1-17.

```

```auto
2: @commenges_statistical_2009, pp. 1-17

```

would be printed out as

```auto
1: @commenges_statistical_2009, pp. 1-17.

```

```auto
2: *Ibid*.

```

Thank you once more for the assistance.

---

<div class="post-metadata">

**Author:** ![bwiernik](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/bwiernik/32/438_2.png) [@bwiernik](https://discourse.citationstyles.org/u/bwiernik)\
**Post date:** [November 9, 2022, 10:12am UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/6 "2022-11-09T10:12:13Z")

</div>

Also note that you should not use .bib as a data format when working with CSL in Quarto. This will tend to produce a variety of incorrect citations. Instead, use CSL YAML or CSL JSON data format.

pandoc needs to convert .bib to CSL YAML anyway, and this is a lossy process that tends to produce problems for non-journal/non-book citations.

---

<div class="post-metadata">

**Author:** ![Nicholas-R-Sheriff](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@Nicholas-R-Sheriff](https://discourse.citationstyles.org/u/Nicholas-R-Sheriff)\
**Post date:** [November 10, 2022, 4:54pm UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/7 "2022-11-10T16:54:59Z")

</div>

> [@bwiernik](#):
>
> CSL YAML

HI @bwiernik. I really appreciate your tip, which I have indeed applied, reading [Pandoc’s citation related documentation](https://pandoc.org/MANUAL.html#citations), but I’d rather disagree since I struggled to see any improvement both in output correctness or compilation time, moreover, it would mean that whenever I have to change or add something in my `.bib` file, I would’ve to transofrm it to `.yml` or `.json` using a script or a tool, since I am making use of Zotero which does not export libraries in those formats: an additional step to consider only in case of extremely bad output I think, which is by no means the one I was and am facing.

Originally, I was not aware of this internal conversion since I was only taking on Quarto’s [documentation](https://quarto.org/docs/authoring/footnotes-and-citations.html), which is very specific about what kind of bibliography source files are accepted. Moreover, it does suggest to go and read “Pandoc Citations documentation for _ **additional information on citation syntax** _”, yet it seems to me (else I am \*\*\*\*ing blind) that it does not mention to use any other format than `bibtex`, `bilatex` or `natbib` for specifying a bibliography database in the YAML header, having to use something else than those ones being just an overcomplication I fear, given that what one more than often cites or quotes are indeed books and journals.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [March 17, 2023, 11:51am UTC](https://discourse.citationstyles.org/t/how-to-handle-csls-format-and-abbreviations-like-ibidem-op-cit-etc-for-pdf-output-in-pandoc-in-rstudio-quarto/1782/8 "2023-03-17T11:51:25Z")

</div>

Note that with Better BibTeX installed Zotero can automatically maintain a separate YAML or JSON file for you.

`BiblaTeX` is also a good format, though the CSL ones will always best align what you have in Zotero, and what citeproc expects.

Maybe just try `BibLaTeX` if that’s more comfortable to you?
