Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Labels do not fall back from verb-short to verb #72

Closed
adunning opened this issue Aug 18, 2014 · 8 comments
Closed

Labels do not fall back from verb-short to verb #72

adunning opened this issue Aug 18, 2014 · 8 comments

Comments

@adunning
Copy link
Contributor

One can normally cite a book review using chicago-author-date.csl (and other styles that support it) by adding a reviewed author. This is mostly fine with pandoc-citeproc, but the word 'by' following the title is omitted, unlike citeproc-js:

pandoc -F pandoc-citeproc -t plain << EOT

---
references:
- ISSN: '0038-7134'
  DOI: 10.1017/S0038713400016407
  note: "ArticleType: book-review / Full publication date: Jul., 2006 / Copyright
    © 2006 Medieval Academy of America"
  volume: '81'
  URL: http://www.jstor.org/stable/20463899
  reviewed-author:
  - family: Boutry
    given: Monique
  page: '905-906'
  first-reference-note-number: 1
  container-title: Speculum
  language: Latin
  author:
  - family: Colish
    given: Marcia L.
  source: JSTOR
  id: colish:2006petri
  accessed:
    date-parts:
    - - 2013
      - 10
      - 18
  container-title-short: Speculum
  issued:
    date-parts:
    - - 2006
      - 7
  title: 'Petri Cantoris Parisiensis Verbum adbreviatum: Textus conflatus'
  type: article-journal
  issue: '3'

---

@colish:2006petri

EOT

Expected Output

Colish (2006)

Colish, Marcia L. 2006. Review of Petri Cantoris Parisiensis Verbum
adbreviatum: Textus conflatus
, by Monique Boutry. Speculum 81 (3):
905–6. doi:10.1017/S0038713400016407.

Actual Output

Colish (2006)

Colish, Marcia L. 2006. Review of Petri Cantoris Parisiensis Verbum
adbreviatum: Textus conflatus
, Monique Boutry. Speculum 81 (3):
905–6. doi:10.1017/S0038713400016407.

@jgm
Copy link
Owner

jgm commented Aug 27, 2014

I don't see any instructions in chicago-author-date.csl that tell it to insert the word "by":

      <else-if variable="reviewed-author">
        <group delimiter=", ">
          <text variable="title" font-style="italic" prefix="Review of "/>
          <names variable="reviewed-author">
            <label form="verb-short" text-case="lowercase" suffix=" "/>
            <name and="text" delimiter=", "/>
          </names>
        </group>
      </else-if>

If you want the "by" you can change this to

      <else-if variable="reviewed-author">
        <text variable="title" font-style="italic" prefix="Review of "/>
        <text term="by" prefix=", " suffix=" " />
        <group delimiter=", ">
          <names variable="reviewed-author" >
            <label form="verb-short" text-case="lowercase" suffix=" " />
            <name and="text" delimiter=", " />
          </names>
        </group>
      </else-if>

So I don't see a bug here in CSL processing.

@adunning
Copy link
Contributor Author

I did notice that, and assumed it was something specified in the specification, but I'm not currently finding it. Is it merely an idiosyncrasy of citeproc-js?

@jgm
Copy link
Owner

jgm commented Aug 27, 2014

I don't know -- you might ask citeproc-js people what causes the
"by" to be inserted.

+++ Andrew Dunning [Aug 26 14 22:50 ]:

I did notice that, and assumed it was something specified in the
specification, but I'm not currently finding it. Is it merely an
idiosyncrasy of citeproc-js?


Reply to this email directly or [1]view it on GitHub.

References

  1. Labels do not fall back from verb-short to verb #72 (comment)

@njbart
Copy link
Contributor

njbart commented Aug 28, 2014

I reported a number of issues regarding reviews when using chicago-fullnote-bibliography.csl with pandoc, including the missing "by" in https://forums.zotero.org/discussion/97/2/book-reviews-another-item-type/ a while ago. No reply so far.

@njbart
Copy link
Contributor

njbart commented Nov 24, 2014

New guess regarding the missing "by": The lines

          <names variable="reviewed-author" >
            <label form="verb-short" text-case="lowercase" suffix=" " />
            <name and="text" delimiter=", " />
          </names>

should render "by" (as the term for reviewed-author, form verb-short) plus the content of the "reviewed-author" variable.

"by" is rendered when the line <term name="reviewed-author" form="verb-short">by</term> is added to chicago-fullnote-bibliography.csl.

"by" is not rendered when the line <term name="reviewed-author" form="verb">by</term> is added to chicago-fullnote-bibliography.csl, or the line <term name="reviewed-author" form="verb-short">by</term> to ~/.cabal/share/x86_64-osx-ghc-7.6.3/pandoc-citeproc-0.6/locales/locales-en-US.xml (this file contains <term name="reviewed-author" form="verb">by</term> already).

(By the way, modifying ~/.csl/locales-en-US.xml does not seem to have any effect either – but where exactly does pandoc-citeproc look for locale files anyway?)

My guess is there are two issues involved:

  1. Unlike citeproc-js, pandoc-citeproc does not seem to take notice of <term name="reviewed-author" form="verb">by</term> or <term name="reviewed-author" form="verb-short">by</term> in locales-en-US.xml.
  2. Unlike citeproc-js, pandoc-citeproc does not seem to fall back from verb-short to verb, though it should: 'If a style uses a term in a form that is undefined (even after Locale Fallback), there is fallback to other forms: "verb-short" first falls back to "verb", […]' (http://citationstyles.org/downloads/specification.html#terms).

@njbart
Copy link
Contributor

njbart commented Apr 20, 2015

Update: I checked again, and adding <term name="reviewed-author" form="verb-short">by</term> to either a locales-en-US.xml in pandoc-citeproc’s search path (currently ~/Library/Haskell/share/ghc-7.8.3-x86_64/pandoc-citeproc-0.7/locales/locales-en-US.xml) or the CSL style file being used is indeed a workaround that renders the example from the original post as expected.
So it’s just the missing fallback from verb-short to verb that needs to be fixed in pandoc-citeproc.

@adunning adunning changed the title 'By' omitted from an article with a reviewed author Labels do not fall back from verb-short to verb Oct 12, 2015
@adunning
Copy link
Contributor Author

The CSL people confirm @nickbart1980's assessment (and point to the same section of the spec): if verb-short does not exist in the locale file, citeproc should use the term marked as verb instead.

@jgm jgm closed this as completed in 4d90f00 Oct 12, 2015
@adunning
Copy link
Contributor Author

Brilliant; thank you!

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants