public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Disambiguation problems in styles with "ibid" set
@ 2022-08-05  6:08 žiga žunec
       [not found] ` <d32b2482-360e-46f0-a970-228ed30c2951n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: žiga žunec @ 2022-08-05  6:08 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1407 bytes --]

Hello,

I am encountering a very similar bug as was described here some years
ago: https://github.com/jgm/pandoc-citeproc/issues/53

When I try to use citeproc with a CSL file that uses inline citations with
"ibid", arbitrary disambiguation is added. For example, with the command
'pandoc --citeproc test.md -t markdown-citations' this markdown:

>---
>bibliography: ["references.bib"] 
>...
>
> @boudon1989
> 
> [@boudon1989, 11]
> 
> [@opp2014]
> 
> [@opp2014, 12]

Produces this result:

> Boudon (1989a)
> 
> (prav tam: 11)
> 
> (Opp, 2014b)
> 
> (prav tam: 12)

Where the expected result would be:

> Boudon (1989)
> 
> (prav tam: 11)
> 
> (Opp, 2014)
> 
> (prav tam: 12)

My CSL file is enclosed in the attachments.

The above mentioned issue on github mentioned that this should have been
fixed some time ago. Was it not or is this a new bug? Or am I simply doing
something wrong on my end? The pandoc version I'm using is 2.18.

Žiga

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d32b2482-360e-46f0-a970-228ed30c2951n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1855 bytes --]

[-- Attachment #2: default.csl --]
[-- Type: application/vnd.citationstyles.style+xml, Size: 10745 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Disambiguation problems in styles with "ibid" set
       [not found] ` <d32b2482-360e-46f0-a970-228ed30c2951n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-08-05 14:07   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2022-08-05 14:07 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]

Can you also attach the bibliography file so we can reproduce the issue?

> On Aug 4, 2022, at 23:08, žiga žunec <ziga.zunec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Hello,
> 
> I am encountering a very similar bug as was described here some years
> ago: https://github.com/jgm/pandoc-citeproc/issues/53
> 
> When I try to use citeproc with a CSL file that uses inline citations with
> "ibid", arbitrary disambiguation is added. For example, with the command
> 'pandoc --citeproc test.md -t markdown-citations' this markdown:
> 
> >---
> >bibliography: ["references.bib"] 
> >...
> >
> > @boudon1989
> > 
> > [@boudon1989, 11]
> > 
> > [@opp2014]
> > 
> > [@opp2014, 12]
> 
> Produces this result:
> 
> > Boudon (1989a)
> > 
> > (prav tam: 11)
> > 
> > (Opp, 2014b)
> > 
> > (prav tam: 12)
> 
> Where the expected result would be:
> 
> > Boudon (1989)
> > 
> > (prav tam: 11)
> > 
> > (Opp, 2014)
> > 
> > (prav tam: 12)
> 
> My CSL file is enclosed in the attachments.
> 
> The above mentioned issue on github mentioned that this should have been
> fixed some time ago. Was it not or is this a new bug? Or am I simply doing
> something wrong on my end? The pandoc version I'm using is 2.18.
> 
> Žiga
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d32b2482-360e-46f0-a970-228ed30c2951n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/70BF44BB-2C5B-46F2-AF24-3021402F129E%40gmail.com.

[-- Attachment #2.1: Type: text/html, Size: 2988 bytes --]

[-- Attachment #2.2: default.csl --]
[-- Type: application/octet-stream, Size: 11051 bytes --]

<?xml version="1.0" encoding="utf-8"?>
<style class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="sl-SI" xmlns="http://purl.org/net/xbiblio/csl">
  <!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/) -->
  <info>
    <title>Sociologija FF UL</title>
    <title-short>Sociologija</title-short>
    <id>http://www.zotero.org/styles/sociologija-ff-ul</id>
    <link href="http://www.zotero.org/styles/sociologija-ff-ul" rel="self"/>
    <link href="http://www.zotero.org/styles/harvard-university-of-cape-town" rel="template"/>
    <link href="https://libguides.sun.ac.za/c.php?g=742962&amp;p=5316902" rel="documentation"/>
    <author>
      <name>Kirchner van Deventer</name>
    </author>
    <category citation-format="author-date"/>
    <category field="generic-base"/>
    <updated>2022-01-12T17:46:53+00:00</updated>
  </info>
  <locale xmlns="http://purl.org/net/xbiblio/csl" xml:lang="en-GB">
    <terms>
      <term name="volume" form="short">v.</term>
      <term name="available at">available</term>
      <term name="open-quote">“</term>
      <term name="close-quote">”</term>
      <term name="open-inner-quote">‘</term>
      <term name="close-inner-quote">’</term>
    </terms>
  </locale>
  <macro name="editor-translator">
    <choose>
      <if variable="editor">
        <names variable="editor">
          <name and="text" initialize="false" initialize-with="."/>
          <label form="short" text-case="lowercase" prefix=", "/>
        </names>
      </if>
    </choose>
    <choose>
      <if variable="translator">
        <names variable="translator">
          <label form="verb" text-case="capitalize-first" suffix=" "/>
          <name and="symbol" delimiter=", "/>
        </names>
      </if>
    </choose>
  </macro>
  <macro name="author">
    <names variable="author">
      <name and="text" delimiter-precedes-last="never" et-al-min="9" et-al-use-first="8" initialize="false" initialize-with="." name-as-sort-order="all"/>
      <label form="short" text-case="capitalize-first" prefix=" "/>
      <substitute>
        <names variable="editor"/>
        <names variable="translator"/>
        <choose>
          <if type="bill book graphic legal_case legislation motion_picture report song webpage" match="any">
            <text variable="title" font-style="italic"/>
          </if>
          <else>
            <text variable="title" quotes="true" text-case="capitalize-first"/>
          </else>
        </choose>
      </substitute>
    </names>
  </macro>
  <macro name="author-short">
    <names variable="author">
      <name form="short" and="text" delimiter-precedes-last="never" et-al-min="4" et-al-use-first="1" initialize-with="."/>
      <substitute>
        <names variable="editor"/>
        <names variable="translator"/>
        <choose>
          <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
            <text variable="title" form="short" font-style="italic"/>
          </if>
          <else>
            <text variable="title" form="short" quotes="true" text-case="capitalize-first"/>
          </else>
        </choose>
      </substitute>
    </names>
  </macro>
  <macro name="author-count">
    <names variable="author">
      <name form="count"/>
    </names>
  </macro>
  <macro name="date-issued">
    <choose>
      <if type="article-journal" match="none">
        <text macro="date-issued-year"/>
      </if>
      <else-if variable="page" match="none">
        <text macro="date-issued-year"/>
      </else-if>
      <else-if is-numeric="page">
        <text macro="date-issued-year"/>
      </else-if>
      <else>
        <text term="in press" prefix="(" suffix=")"/>
      </else>
    </choose>
  </macro>
  <macro name="date-issued-no-parentheses">
    <choose>
      <if type="article-journal" match="none">
        <text macro="date-issued-year"/>
      </if>
      <else-if variable="page" match="none">
        <text macro="date-issued-year"/>
      </else-if>
      <else-if is-numeric="page">
        <text macro="date-issued-year"/>
      </else-if>
      <else>
        <text term="in press"/>
      </else>
    </choose>
  </macro>
  <macro name="date-issued-year">
    <choose>
      <if variable="issued">
        <date variable="issued">
          <date-part name="year"/>
        </date>
      </if>
      <else>
        <text term="no date" form="short"/>
      </else>
    </choose>
  </macro>
  <macro name="access">
    <choose>
      <if variable="DOI">
        <text variable="DOI" prefix="DOI: "/>
      </if>
      <else-if variable="URL">
        <group delimiter=" ">
          <group>
            <text term="available at" suffix=": " text-case="capitalize-first"/>
            <text variable="URL"/>
          </group>
          <text macro="date-access"/>
        </group>
      </else-if>
      <else-if variable="source accessed" match="all">
        <group delimiter=" ">
          <text variable="source"/>
          <text macro="date-access"/>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="date-access">
    <date variable="accessed" prefix="[" suffix="]">
      <date-part name="year"/>
      <date-part name="month" form="long" prefix=", "/>
      <date-part name="day" form="numeric-leading-zeros" prefix=" "/>
    </date>
  </macro>
  <macro name="title">
    <choose>
      <if type="bill book graphic legal_case legislation motion_picture report song webpage" match="any">
        <text variable="title" font-style="italic"/>
      </if>
      <else>
        <text variable="title"/>
      </else>
    </choose>
  </macro>
  <macro name="book-details">
    <group delimiter=". ">
      <text macro="publisher"/>
    </group>
  </macro>
  <macro name="publisher">
    <group>
      <text variable="publisher-place" suffix=": "/>
      <text variable="publisher"/>
      <text variable="page" prefix=", str. "/>
    </group>
  </macro>
  <citation disambiguate-add-year-suffix="true" year-suffix-delimiter="," disambiguate-add-names="true" disambiguate-add-givenname="false" collapse="year-suffix">
    <sort>
      <key macro="date-issued-no-parentheses"/>
      <key macro="author"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
      <choose>
        <if match="any" position="ibid">
          <group delimiter=", ">
            <text value="prav tam"/>
          </group>
          <group>
            <choose>
              <if match="any" locator="page">
                <text variable="locator" prefix=": "/>
              </if>
            </choose>
          </group>
        </if>
        <else>
          <group delimiter=", ">
            <text macro="author-short"/>
            <text macro="date-issued-no-parentheses"/>
          </group>
          <group>
            <choose>
              <if locator="page" match="any">
                <text variable="locator" prefix=": "/>
              </if>
              <else>
                <label variable="locator" form="short" prefix=", "/>
                <text variable="locator" prefix=" "/>
              </else>
            </choose>
          </group>
        </else>
      </choose>
    </layout>
  </citation>
  <bibliography entry-spacing="0" hanging-indent="true">
    <sort>
      <key macro="author-short" names-min="1" names-use-first="1"/>
      <key macro="author-count" names-min="3" names-use-first="3"/>
      <key macro="author" names-min="3" names-use-first="1"/>
      <key macro="date-issued-no-parentheses"/>
    </sort>
    <layout suffix=".">
      <group delimiter=". ">
        <text macro="author"/>
        <text macro="date-issued"/>
        <choose>
          <if type="bill book graphic legal_case legislation motion_picture post-weblog song webpage" match="any">
            <text macro="title"/>
            <text macro="book-details"/>
          </if>
          <else-if type="article-journal article-magazine" match="any">
            <text macro="title"/>
            <group>
              <text variable="container-title" strip-periods="false" font-style="italic" vertical-align="baseline"/>
              <choose>
                <if variable="volume issue" match="any">
                  <group prefix=", " suffix=": ">
                    <text variable="volume"/>
                    <text variable="issue" prefix="(" suffix=")"/>
                  </group>
                </if>
                <else>
                  <date variable="issued" prefix="(" suffix=")">
                    <date-part name="month" form="long"/>
                    <date-part name="day" prefix=", "/>
                  </date>
                </else>
              </choose>
              <text variable="page"/>
            </group>
          </else-if>
          <else-if type="article-newspaper" match="any">
            <text macro="title"/>
            <group delimiter=" ">
              <text variable="container-title" font-style="italic"/>
              <text variable="publisher-place" prefix="(" suffix=")"/>
            </group>
            <group delimiter=": ">
              <date variable="issued">
                <date-part name="day" suffix=" "/>
                <date-part name="month" form="long"/>
              </date>
              <text variable="page"/>
            </group>
          </else-if>
          <else-if type="thesis" match="any">
            <text macro="title"/>
            <text variable="genre"/>
            <text variable="publisher"/>
          </else-if>
          <else-if type="chapter paper-conference entry-encyclopedia entry-dictionary" match="any">
            <text macro="title"/>
            <group>
              <text term="in" text-case="capitalize-first" suffix=": "/>
              <text variable="container-title" font-style="italic"/>
              <text macro="editor-translator" prefix=", "/>
            </group>
            <text macro="book-details"/>
          </else-if>
          <else-if type="patent" match="any">
            <group font-style="italic">
              <text variable="number" prefix="Patent No. "/>
            </group>
            <group delimiter=": ">
              <text macro="publisher"/>
              <text variable="authority"/>
            </group>
          </else-if>
          <else-if type="report" match="any">
            <text macro="title"/>
            <group delimiter=" " prefix="(" suffix=")">
              <text variable="genre" text-case="capitalize-first"/>
              <text variable="number"/>
            </group>
            <text macro="publisher"/>
          </else-if>
        </choose>
      </group>
    </layout>
  </bibliography>
</style>

[-- Attachment #2.3: Type: text/html, Size: 859 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-05 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05  6:08 Disambiguation problems in styles with "ibid" set žiga žunec
     [not found] ` <d32b2482-360e-46f0-a970-228ed30c2951n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-08-05 14:07   ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).