Giter Club home page Giter Club logo

Comments (6)

htdebeer avatar htdebeer commented on June 16, 2024

@jgm mentioned in jgm/pandoc#7060 :

I can reproduce the issue. Oddly, it seems specific to the CSL style you're using. (I also tried with chicago-note-bibliography and it hung, but it did not hang with chicago-author-date or another note style, modern-humanities-research-association.csl!)

and

Note that with the bibtex entry, pandoc hangs when using pandoc -f biblatex -t csljson but succeeds with pandoc -f bibtex -t csljson. Please include this information in the new issue.

from citeproc.

jgm avatar jgm commented on June 16, 2024

Note that with the bibtex entry, pandoc hangs when using pandoc -f biblatex -t csljson but succeeds with pandoc -f bibtex -t csljson. Please include this information in the new issue.

Funny, I'm no longer seeing this.

from citeproc.

jgm avatar jgm commented on June 16, 2024

Observations:

  1. I still get the hang if I convert the bibtex to a CSL JSON bibliography and use that (note that there's a space at the end of that title).
  2. But I can't reproduce this using the citeproc executable, which suggests that the problem lies in pandoc's processing, perhaps after citeproc has run.

from citeproc.

jgm avatar jgm commented on June 16, 2024

Hm. Trace indicates that it is hanging up running the citeproc function.
New conjecture: this is specific to the CiteprocOutput instance for pandoc types (this would not be used by the citeproc executable).

from citeproc.

jgm avatar jgm commented on June 16, 2024

I can reproduce this with just citeproc using this script:

{-# LANGUAGE OverloadedStrings #-}
module Refs (test) where
import Citeproc
import Citeproc.Pandoc
import Text.Pandoc.Definition
import Text.Pandoc.Builder
import Data.Map
import Data.Sequence
import qualified Data.Text
import qualified Data.Text.IO


test = do

  let refs = [Reference {referenceId = ItemId {unItemId = "Cole2014a"}, referenceType = "paper-conference", referenceDisambiguation = Nothing, referenceVariables = Data.Map.fromList [(toVariable "author",NamesVal [Name {nameFamily = Just "Cole", nameGiven = Just "Michael", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Engestr\246m", nameGiven = Just "Yrj\246", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Sannino", nameGiven = Just "Annalisa", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Guti\233rrez", nameGiven = Just "Kris", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Jurow", nameGiven = Just "Susan", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Packer", nameGiven = Just "Martin", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Penuel", nameGiven = Just "William R.", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Johnson", nameGiven = Just "Raymond", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Severance", nameGiven = Just "Samuel", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Leary", nameGiven = Just "Heather", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing},Name {nameFamily = Just "Miller", nameGiven = Just "Susan", nameDroppingParticle = Nothing, nameNonDroppingParticle = Nothing, nameSuffix = Nothing, nameCommaSuffix = False, nameStaticOrdering = False, nameLiteral = Nothing}]),(toVariable "container-title",FancyVal (Many {unMany = Data.Sequence.fromList [Str "ICLS",Space,Str "2014",Space,Str "Proceedings",Space]})),(toVariable "issued",DateVal (Date {dateParts = [DateParts [2014]], dateCirca = False, dateSeason = Nothing, dateLiteral = Nothing})),(toVariable "page",TextVal "1254-1263"),(toVariable "title",FancyVal (Many {unMany = Data.Sequence.fromList [Str "Toward",Space,Str "an",Space,Str "argumentative",Space,Str "grammar",Space,Str "for",Space,Str "socio-cultural/cultural-historical",Space,Str "activity",Space,Str "approaches",Space,Str "to",Space,Str "design",Space,Str "research"]}))]}]
  Right apaStyle <- Data.Text.IO.readFile "../styles/apa.csl" >>= parseStyle return
  let cits = [Citeproc.Citation Nothing Nothing [CitationItem (ItemId "Cole2014a") Nothing Nothing NormalCite Nothing Nothing]]
  print (citeproc defaultCiteprocOptions apaStyle Nothing refs cits)

from citeproc.

jgm avatar jgm commented on June 16, 2024

I think the problem lies with fixPunct in Citeproc.Types.
IT no longer hangs when I take that out of the pipeline.
It seems to be looping on the xend, ystart pair (' ',',')

Which probably points to an issue in dropTextWhileEnd for Inlines.

Ah, interesting:

λ> dropTextWhileEnd (==' ') $ Many $ Data.Sequence.fromList [Emph [Str "ICLS",Space,Str "2014",Space,Str "Proceedings",Space]]
Many {unMany = fromList [Emph [Str "ICLS",Space,Str "2014",Space,Str "Proceedings",Space]]}

So the space is not dropped, probably explaining the loop!

from citeproc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.