Giter Site home page Giter Site logo

Comments (4)

zepinglee avatar zepinglee commented on August 19, 2024

I suggest exporting from Zotero directly to CSL-JSON format and \addbibresource{foo.json}. This format is preferred because the data in other formats are converted to CSL-JSON for internal processing.

In this case, the \noopsort command is not handled correctly. The current version of citeproc-lua converts the .bib data to the following CSL-JSON data.

[
    {
        "author": [
            {
                "family": "Steenis</span>",
                "given": "J.",
                "non-dropping-particle": "<span class=\"nocase\">\\noopsort</span><span class=\"nocase\">steenis</span><span class=\"nocase\">van"
            },
            {
                "family": "Tiefenau</span>",
                "given": "P.",
                "non-dropping-particle": "<span class=\"nocase\">Goeldlin de"
            }
        ],
        "container-title": "Bulletin de la Soci\u00e9t\u00e9 Entomologique Suisse",
        "id": "vansteenis1998c",
        "issued": {
            "date-parts": [
                [
                    1998
                ]
            ]
        },
        "page": "187-199",
        "title": "Description of and key to the <span class=\"nocase\"><span class=\"nocase\">European</span></span> females of the <span class=\"nocase\"><span class=\"nocase\"><i>Platycheirus</i></span></span> <i><span class=\"nocase\">peltatus</span></i> sub-group (<span class=\"nocase\"><span class=\"nocase\">Diptera</span></span>, <span class=\"nocase\"><span class=\"nocase\">Syrphidae</span></span>), with a description of the male and female of <span class=\"nocase\"><span class=\"nocase\">P</span></span>. <i><span class=\"nocase\">islandicus</span></i> <span class=\"nocase\"><span class=\"nocase\">Ringdahl</span></span>, 1930, stat. n",
        "type": "article-journal",
        "volume": "71"
    }
]

The <span class="nocase"> and </span> tags are add for case protection like the {foo} in BibTeX fields. However the tags in von part and family part are incorrectly separated and unpaired.

BTW, does the BBT exporter add \noopsort command?

from citeproc-lua.

bwakkie avatar bwakkie commented on August 19, 2024

With the CSL JSON export it seems to work in the citing part, but the reference part gives the below error:


...scripts/citation-style-language/citeproc-node-locale.lua:129: attempt to comp
are nil with number
stack traceback:
	...scripts/citation-style-language/citeproc-node-locale.lua:129: in method 'get
_ordinal_term'
	...xmf/scripts/citation-style-language/citeproc-element.lua:466: in method 'for
mat_ordinal_number_parts'
	...xmf/scripts/citation-style-language/citeproc-element.lua:380: in method 'for
mat_number'
	...scripts/citation-style-language/citeproc-node-number.lua:54: in method 'buil
d_ir'
	...xmf/scripts/citation-style-language/citeproc-element.lua:171: in method 'bui
ld_group_ir'
	.../scripts/citation-style-language/citeproc-node-group.lua:29: in method 'buil
d_ir'
	...scripts/citation-style-language/citeproc-node-choose.lua:137: in method 'bui
ld_children_ir'
	...scripts/citation-style-language/citeproc-node-choose.lua:181: in method 'bui
ld_ir'
	...scripts/citation-style-language/citeproc-node-choose.lua:32: in method 'buil
d_ir'
	...xmf/scripts/citation-style-language/citeproc-element.lua:171: in method 'bui
ld_group_ir'
	...
	...scripts/citation-style-language/citeproc-node-choose.lua:137: in method 'bui
ld_children_ir'
	...scripts/citation-style-language/citeproc-node-choose.lua:181: in method 'bui
ld_ir'
	...scripts/citation-style-language/citeproc-node-choose.lua:32: in method 'buil
d_ir'
	...xmf/scripts/citation-style-language/citeproc-element.lua:136: in method 'bui
ld_children_ir'
	...scripts/citation-style-language/citeproc-node-layout.lua:28: in method 'buil
d_ir'
	...s/citation-style-language/citeproc-node-bibliography.lua:106: in method 'bui
ld_ir'
	...s/citation-style-language/citeproc-node-bibliography.lua:85: in method 'buil
d_bibliography_str'
	...exmf/scripts/citation-style-language/citeproc-engine.lua:560: in method 'mak
eBibliography'
	.../scripts/citation-style-language/citeproc-latex-core.lua:265: in function 'c
iteproc-latex-core.make_bibliography'
	...texmf/scripts/citation-style-language/citeproc-latex.lua:146: in function 'c
iteproc-latex.bibliography'
	[\directlua]:1: in main chunk.
\lua_now:e #1->\__lua_now:n {#1}
                                
l.13 \end
       {document}
The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.

[1


I uploaded my Zotero CSL JSON export which gives the above error.

BTW, does the BBT exporter add \noopsort command?

Only when I select "Disregard name prefixes when sorting" option n the automatic export preferences setting
taxofly-zotero-csl.json.txt

from citeproc-lua.

zepinglee avatar zepinglee commented on August 19, 2024

I've created a patch to make the current data run successfully without errors but there are some problems.

  1. In bruns1984a, the value of number-of-pages is 91–129. This number-of-pages variable (or # of Pages in Zotero) is expected to be the total number of pages of the book rather than a specific range of pages.
  2. The page range delimiter in Zotero raw data is hyphen rather than en dash. It is converted to en dash or other symbols by the citeproc engine according to the given CSL style.
  3. The edition in stubbs2002a is 2nd. I suggest using arabic form because it can be converted to roman numeral or locale-specific ordinal according to the CSL style. Directly using 2nd may limit this conversion.

from citeproc-lua.

bwakkie avatar bwakkie commented on August 19, 2024

Super thangs for the quick fix. I also fixed the problems in the json file in the mean time.

from citeproc-lua.

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.