diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 616ea6fa..99a02b82 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -26,7 +26,7 @@ }, { "step": "runPHP", - "code": "Welcome to Borges Bibliography Builder. This Playground runs the latest release. It is a sandbox: nothing here is kept after you close the tab.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref.\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

' . $html . '

' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
'\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n\\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" + "code": "Welcome to Borges Bibliography Builder. This Playground runs the latest release. It is a sandbox: nothing here is kept after you close the tab.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref, and from DataCite for the DOIs Crossref does not hold: datasets, software, and repository deposits, such as the Dryad dataset and the Zenodo software release here (DataCite DOIs need Borges 1.23.0 or later).\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"},{\"format\":\"doi\",\"input\":\"10.5061/dryad.8515\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.5281/zenodo.3509134\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

' . $html . '

' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
'\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n\\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" } ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 373b407e..61469f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **ABNT and OSCOLA citations paste as text.** Borges already formatted both styles but could not read them back, so a pasted ABNT or OSCOLA citation with no DOI got the "Paste a DOI, PMID…" notice, or worse, came back as a book with "17. ed. Rio de Janeiro: Paz e Terra" as its publisher. ABNT citations (`FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.`) now read as books, chapters, articles (`v. 27, n. 2, p. 97-111, abr. 2020`), theses, preprints, magazine articles, software, and web pages (`Disponível em:`, `Acesso em:`), with surnames in capitals written back as names (Paulo Freire) and Portuguese month abbreviations read as dates. OSCOLA secondary sources (`Hart HLA, Punishment and Responsibility (OUP 1968)`, `Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 OJLS 1`) read as books, articles, chapters, newspaper articles, encyclopedia entries, theses, preprints, and web pages, in the bibliography's name form or the footnote's (`HLA Hart`). In an OSCOLA bibliography, pasted lines that end in a page number or an access date now become one entry each instead of being joined into one. Each style's reader runs first in its own bibliography, and an ABNT surname in capitals sends a citation to the ABNT reader in any bibliography. Cases, legislation, treaties, and reviews are still declined. Like the other formatted-citation readers, these mark each entry for review. On the plugin's test lists they recover every detail the styles print in the 12-work list and all but one in the 36-work list, and on 7,846 labelled references from AnyStyle they read 30 more with no new wrong titles. The Playground demo's formatted-citation samples add one of each. ([#231](https://github.com/dknauss/Borges/issues/231)) +- **DOIs for datasets and software resolve.** Borges asked only Crossref for a DOI's metadata, so a DOI registered with DataCite, which covers most datasets, software releases, and repository deposits (every Zenodo record, figshare, Dryad, many university repositories), failed with "Couldn't parse the DOI." When Crossref has no record for a DOI, the editor now asks DataCite through a new editor-only REST route, `GET /bibliography/v1/datacite?doi=…` (`edit_posts`), which calls DataCite's fixed content negotiation host and caches the answer like the other resolvers. Crossref stays first, and only its "not found" falls through, so DOIs it holds resolve exactly as before. The route keeps DataCite's CSL as sent, except that organizations sent as a bare family name (“The pandas development team”) become one name, the DOI is stored in lowercase, and the subject keywords, license, and abstract are dropped. The Playground demo's DOI samples add a Dryad dataset and a Zenodo software release. The readme's External Services section lists DataCite. + ### Fixed - **Confirmations no longer make the list jump.** After an action, its confirmation (“Moved … to position 2 of 5.”, “Copied citation.”, “Fields saved.”, “Added 3 citations.”, “Style changed to APA 7.”) was a black box at the top of the citation list, out of view when you were working further down, and when it went five seconds later the list moved up by its height and the scroll jumped back. Confirmations now appear in the editor’s own snackbar area at the bottom of the screen, as WordPress’s do (“Post updated.”), where they are always in view, take no room in the block, and are announced to screen readers. Warnings and errors that need reading, such as an import with skipped duplicates or a field that needs fixing, stay next to the add form and never disappear on a timer. The hints shown when an edit starts are now help text in the edit form (“Press Enter to save or Escape to cancel.”, and a one-line description on the field-by-field form) instead of a notice above the list, so starting an edit no longer pushes the list down. diff --git a/CLAUDE.md b/CLAUDE.md index 475199fb..0552662a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -79,10 +79,11 @@ A Gutenberg block plugin that accepts DOI identifiers, PubMed/PMID records, BibT - `GET /pmid/{pmid}` — resolves PubMed/PMID records through a fixed NCBI/PMC CSL endpoint; requires `edit_posts` - `GET /pmcid/{pmcid}` — resolves PubMed Central/PMCID records through NCBI's fixed PMC CSL endpoint via the same shared resolver; requires `edit_posts` - Both NCBI routes return the record after `bibliography_builder_normalize_ncbi_csl()` dots bare initials, drops a "Pt" issue label, and drops an NLM journal subtitle that matches `container-title-short` (#270, #271); the editor applies the same rules in `src/lib/ncbi-normalize.js` to every NCBI path. Keep the two in step. + - `GET /datacite?doi={doi}` — resolves DOIs registered with DataCite (datasets, software, Zenodo/figshare/Dryad deposits) through DataCite's fixed content negotiation host (`BIBLIOGRAPHY_BUILDER_DATACITE_CSL_API`); the editor calls it only after Crossref answers 404 for a DOI (`resolveDoiViaRegistries()` in `parser-resolvers.js`), so DOIs Crossref holds never reach it; requires `edit_posts`. Registered after `/archive`, so earlier route indices are unchanged - `GET /arxiv?id={id}` — resolves arXiv IDs through the fixed arXiv API, mapping Atom to a CSL preprint in PHP; requires `edit_posts` - `GET /isbn/{isbn}` — resolves checksum-valid ISBNs through Open Library's fixed ISBN edition endpoint (author names from its search endpoint), falling back to Google Books, mapping to a CSL book in PHP; requires `edit_posts` - `GET /catalog?id={OCLC:|LCCN:|OLID:key}` — resolves OCLC numbers, LCCNs, and Open Library edition IDs through Open Library's fixed Books API (`jscmd=data`), mapping to a CSL book in PHP; requires `edit_posts` - - `GET /archive?id={identifier|ark:/13960/…}` — resolves Internet Archive items (an ARK through IA's advanced search first) from the fixed `archive.org/metadata/` host, preferring the item's Open Library edition, ISBN, then LCCN, else mapping the scan metadata; URL is always the archive.org item page; requires `edit_posts`. Both routes are registered last so earlier route indices (pinned by tests) stay stable. + - `GET /archive?id={identifier|ark:/13960/…}` — resolves Internet Archive items (an ARK through IA's advanced search first) from the fixed `archive.org/metadata/` host, preferring the item's Open Library edition, ISBN, then LCCN, else mapping the scan metadata; URL is always the archive.org item page; requires `edit_posts`. Both routes are registered after the others (only `/datacite` follows them) so earlier route indices (pinned by tests) stay stable. - `GET /posts/{post_id}/bibliographies` — list all bibliography blocks in post - `GET /posts/{post_id}/bibliographies/{index}` — single bibliography; supports `?format=json|text|csl-json` - Write routes (Phase 05 M2 and M3, `includes/write-routes.php`): POST/PATCH/DELETE/PUT under `/posts/{post_id}/bibliographies/{ref}/citations`, plus PATCH `/posts/{post_id}/bibliographies/{ref}` (block settings) and POST `…/{ref}/reformat` (style switch, mirroring the editor's `handleCitationStyleChange`). They are **off unless** the `bibliography_builder_enable_write_routes` filter returns true. They need `edit_post`, are dry runs unless `dry_run=false`, and need `If-Match` (the post's ETag, a hash of its content). A write rebuilds markup with the `save()` port and splices only that block via `includes/block-locator.php`. See `docs/rest-write-routes.md`. @@ -96,7 +97,7 @@ A Gutenberg block plugin that accepts DOI identifiers, PubMed/PMID records, BibT - Render-time COinS enrichment (`includes/coins-enrichment.php`): a `render_block` filter (priority 11) appends to each saved `Z3988` span an `rft.au` for every author after the first, organizations and one-part names written as `Name,` (all of them, replacing `rft.aulast`/`rft.aufirst`, when a later author shares the first one's last name), so Zotero's OpenURL reader neither repeats, drops, nor moves a name (it puts every `rft.aucorp` first). `CoinsEnrichmentTest` models that reader in CI; `tools/markup-value/zotero-coins.mjs` runs Zotero's own reader, downloaded at a pinned commit since it is AGPL, and an `info:pmid/` `rft_id`, plus (via `bibliography_builder_coins_enrich_fields()`) an `rft.genre` for the item type, the book format for conference papers and reports, a chapter's pages, publisher and place, a book's edition, a journal's ISSN, and the URL as an `rft_id`, matching spans to citations by the `
  • ` order and leaving misaligned markup alone. Like the JSON-LD enrichment, `save()` is unchanged. Filter: `bibliography_builder_enrich_coins`. - Render-time microformats (`includes/microformats.php`): a `render_block` filter (priority 11) adds the class `h-cite` to each entry `
  • ` and, right after its start tag, an empty `
  • ` start tag is read with a quote-aware pattern (WP_HTML_Tag_Processor cannot insert markup, and the PHPUnit bootstrap has no copy of it). Feeds skip it and `bibliography_builder_portable_markup()` strips the span for email. `save()` is unchanged. Filter: `bibliography_builder_enrich_microformats`. - Site-wide output defaults (`includes/output-defaults.php`, `src/lib/output-defaults.js`): the `bibliography_builder_output_defaults` filter reaches the editor as the `bibliographyBuilderOutputDefaults` block editor setting, and `useOutputDefaults()` writes it into newly inserted blocks as explicit attributes. The same setting carries `headingLevel` for new blocks (2, an `

    `, unless `bibliography_builder_new_block_heading_level` returns 0 or 3–6), while `block.json` keeps 0 (a paragraph). Never change the `block.json` defaults for this: omitted attributes take the default, so it would invalidate saved blocks. -- The PMID, PMCID, arXiv, ISBN, catalog, and Internet Archive route callbacks, their provider constants (fixed upstream URLs, timeout, cache TTLs), and the NCBI cache helpers live in `includes/resolvers.php`, loaded by `require_once` from the main file. Route registration and the `edit_posts` permission callbacks stay in `bibliography-builder.php`. +- The PMID, PMCID, arXiv, ISBN, catalog, Internet Archive, and DataCite route callbacks, their provider constants (fixed upstream URLs, timeout, cache TTLs), and the NCBI cache helpers live in `includes/resolvers.php`, loaded by `require_once` from the main file. Route registration and the `edit_posts` permission callbacks stay in `bibliography-builder.php`. - `includes/google-books-key.php` reads an optional Google Books API key from the `BIBLIOGRAPHY_BUILDER_GOOGLE_BOOKS_API_KEY` constant, then the `bibliography_builder_google_books_api_key` filter. It is added only to the ISBN resolver's Google Books fallback request. There is deliberately no option or settings screen: `verify-metrics.sh` enforces that the plugin persists no settings. - WP-CLI commands (`includes/cli.php`, `includes/class-bibliography-builder-cli-command.php`, loaded only when `WP_CLI` is defined): the read-only `wp borges list`, `export`, `validate`, and `duplicates` (a site-wide report of what `deduplicate` would remove, plus cross-block repeats, from `bibliography_builder_bulk_split_duplicates()`) call the same read model and validation report as the REST routes and abilities. `wp borges reformat` and `deduplicate` write through `bibliography_builder_bulk_reformat_post()` and `…_bulk_deduplicate_post()`; they always need `--user`, the write-routes filter, `edit_others_posts`, and `edit_post` per post, and skips the rate limit (batches via `--batch-size`/`--sleep`). With no current user (no `--user`) they check no capabilities, like core's commands; with `--user` they apply the REST/abilities checks (`bibliography_builder_can_read_post()` for list and export, `bibliography_builder_can_review_post()` for validate). `validate` exits 1 on any error. Tests use the recording stub `tests/phpunit/stubs/wp-cli.php`, which Psalm also loads, and `scripts/runtime-matrix/smoke.sh` runs the real commands. See `docs/wp-cli.md`. - Read-only Abilities API integration (WordPress 6.9+) lives in `includes/abilities.php`: `borges/get-bibliographies`, `borges/export-bibliography`, `borges/validate-citations` in a `bibliography` category. They reuse the REST read/permission helpers; on older WordPress the `wp_abilities_api_*` hooks never fire. diff --git a/README.md b/README.md index 91cc0d2c..777f1c9c 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,12 @@ DOI input connects to the [CrossRef REST API](https://api.crossref.org/) to reso - [CrossRef privacy policy](https://www.crossref.org/privacy/) - [CrossRef terms of service](https://www.crossref.org/terms/) +When Crossref has no record for a DOI, as for most datasets, software releases, and repository deposits (Zenodo, figshare, Dryad), the DOI is looked up through the plugin's authenticated WordPress REST proxy in [DataCite's content negotiation service](https://support.datacite.org/docs/datacite-content-resolver) (`api.datacite.org/dois/`). The proxy uses a fixed upstream host and validates the DOI before making the outbound request. Only the DOI is sent. + +- [DataCite content negotiation](https://support.datacite.org/docs/datacite-content-resolver) +- [DataCite privacy policy](https://datacite.org/privacy-policy/) +- [DataCite terms and conditions](https://datacite.org/terms-and-conditions/) + ### PubMed/PMID and PubMed Central/PMCID metadata PubMed/PMID and PubMed Central/PMCID input connects through the plugin's authenticated WordPress REST proxy to the [NCBI/PMC Literature Citation Exporter](https://pmc.ncbi.nlm.nih.gov/api/ctxp/) CSL endpoints. The proxy uses a fixed upstream host and validates the identifier as numeric before making the outbound request. Only the identifier is sent. diff --git a/SPEC.md b/SPEC.md index e47532d6..118ac9a4 100644 --- a/SPEC.md +++ b/SPEC.md @@ -42,6 +42,7 @@ A standalone WordPress block plugin that transforms pasted scholarly citations ( | ------------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | | `citation-js` (npm) | BibTeX parsing and fallback DOI support | Free, no API key. Pinned package versions keep parser behavior stable. | | CrossRef API | Primary DOI metadata provider through the CORS-friendly CSL transform endpoint; `citation-js` remains available as a fallback where direct browser fetch is unavailable | Free, public, no key required | +| DataCite content negotiation | DOI fallback when CrossRef answers 404 (datasets, software, Zenodo/figshare/Dryad deposits), through the editor-only `GET /bibliography/v1/datacite?doi=` proxy to `api.datacite.org` | Free, public, no key required | | `citeproc-php` (Composer) | Local CSL-JSON → plain-text bibliography formatting using plugin-owned GPL-compatible styles/locales | Runs locally in WordPress; no external service | | AnyStyle (Ruby gem) | ML-based free-text citation parsing | Free to self-host; no public API. **Not needed for MVP.** | @@ -53,7 +54,7 @@ A standalone WordPress block plugin that transforms pasted scholarly citations ( ### Supported Input Formats -1. **DOI** — one or more per paste, one per line. Detected by `10.\d{4,}/` pattern. Resolved to CSL-JSON through CrossRef's CORS-friendly CSL transform endpoint, with sequential browser fetches and a `citation-js` fallback when direct fetch is unavailable. +1. **DOI** — one or more per paste, one per line. Detected by `10.\d{4,}/` pattern. Resolved to CSL-JSON through CrossRef's CORS-friendly CSL transform endpoint, with sequential browser fetches and a `citation-js` fallback when direct fetch is unavailable. When CrossRef answers 404, the DOI is tried once more through the plugin's DataCite route (`GET /bibliography/v1/datacite?doi=`), which covers the DOIs of datasets, software, and repository deposits; any other CrossRef failure is reported as it is. 2. **PubMed/PMID** — one or more `PMID:` entries per paste. Resolved through the authenticated WordPress REST proxy to a fixed NCBI/PMC CSL endpoint; PMID input is validated as numeric before any outbound request. 3. **PubMed Central/PMCID** — one or more `PMC` entries per paste, with or without a `PMCID:` label. Resolved through the same authenticated proxy pattern to NCBI's fixed PMC citation-exporter endpoint; the ID is reduced to its digits before any outbound request and sent upstream as bare digits (the exporter answers `id=PMC` with HTTP 400). Free-text citations carrying `PMC<4+ digits>` are routed here when they have no DOI or labeled PMID. 4. **arXiv** — `arXiv:`, arxiv.org `/abs/` or `/pdf/` URLs, or arXiv DataCite DOIs (`10.48550/arXiv.`), in modern (`2301.00001`) or legacy (`hep-th/9901001`) form with an optional version. Resolved through `GET /bibliography/v1/arxiv?id=`, which queries the fixed `export.arxiv.org` API and maps the Atom response to a CSL `article` preprint (publisher `arXiv`, number `arXiv:`, the arXiv DOI, and the abstract URL). A bare number is not treated as an arXiv ID. arXiv lookups run one at a time in the editor to respect arXiv's request-rate guidance. @@ -604,7 +605,7 @@ Formatted bibliography strings are generated locally through `citeproc-php` usin ### Parse Failures -- **Unresolvable DOI** (CrossRef returns 404): skip the entry, include it in the failure count, surface the raw input in the error message so the user can correct and retry. +- **Unresolvable DOI** (CrossRef returns 404 and DataCite has no record either): skip the entry, include it in the failure count, surface the raw input in the error message so the user can correct and retry. - **Malformed BibTeX**: `citation-js` throws on invalid syntax. Catch, skip, and report. - **Network failure** (DOI resolution requires fetch): surface a "Could not connect to CrossRef. Check your internet connection." notice. Allow retry. diff --git a/bibliography-builder.php b/bibliography-builder.php index b19f835f..0df1f972 100644 --- a/bibliography-builder.php +++ b/bibliography-builder.php @@ -231,6 +231,23 @@ function bibliography_builder_rest_archive_permissions_check() { ); } +/** + * Permission callback for editor-only DataCite DOI resolver requests. + * + * @return true|WP_Error + */ +function bibliography_builder_rest_datacite_permissions_check() { + if ( current_user_can( 'edit_posts' ) ) { + return true; + } + + return new WP_Error( + 'bibliography_builder_datacite_forbidden', + __( 'Sorry, you are not allowed to resolve DataCite DOIs.', 'borges-bibliography-builder' ), + array( 'status' => 403 ) + ); +} + /** * Register REST routes. * @@ -596,6 +613,38 @@ static function ( $value ) { ), ) ); + + // DataCite DOI resolver: the editor's fallback when Crossref has no record + // for a DOI. Registered after the others so their route indices stay stable. + register_rest_route( + 'bibliography/v1', + '/datacite', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => 'bibliography_builder_rest_resolve_datacite', + 'permission_callback' => 'bibliography_builder_rest_datacite_permissions_check', + 'args' => array( + 'doi' => array( + 'description' => __( + 'DOI registered with DataCite to resolve to CSL-JSON.', + 'borges-bibliography-builder' + ), + 'type' => 'string', + 'required' => true, + 'validate_callback' => + /** + * Validates the DOI parameter. + * + * @param mixed $value Value to check. + * @return bool + */ + static function ( $value ) { + return '' !== bibliography_builder_normalize_doi( $value ); + }, + ), + ), + ) + ); } diff --git a/docs/current-metrics.md b/docs/current-metrics.md index b9ea32fc..96121ebd 100644 --- a/docs/current-metrics.md +++ b/docs/current-metrics.md @@ -11,9 +11,9 @@ Source and LOC figures last verified: **2026-10-06** against the heading-level b | Metric | Value | Re-derivation command | |---|---|---| -| Main plugin file (`bibliography-builder.php`) | **848** | `wc -l bibliography-builder.php` | -| All first-party PHP (excl. vendor, tests, scripts, playground, packages, output, node_modules, generated `build/`) | **19156** | `find . -name '*.php' -not -path './vendor/*' -not -path './node_modules/*' -not -path './tests/*' -not -path './packages/*' -not -path './scripts/*' -not -path './playground/*' -not -path './output/*' -not -path './build/*' -print0 \| xargs -0 wc -l \| tail -1` | -| JS source (`src/`, excl. `*.test.js` and `*.stories.js`) | **21273** | `find ./src -name '*.js' -not -name '*.test.js' -not -name '*.stories.js' -print0 \| xargs -0 wc -l \| tail -1` | +| Main plugin file (`bibliography-builder.php`) | **897** | `wc -l bibliography-builder.php` | +| All first-party PHP (excl. vendor, tests, scripts, playground, packages, output, node_modules, generated `build/`) | **19396** | `find . -name '*.php' -not -path './vendor/*' -not -path './node_modules/*' -not -path './tests/*' -not -path './packages/*' -not -path './scripts/*' -not -path './playground/*' -not -path './output/*' -not -path './build/*' -print0 \| xargs -0 wc -l \| tail -1` | +| JS source (`src/`, excl. `*.test.js` and `*.stories.js`) | **21342** | `find ./src -name '*.js' -not -name '*.test.js' -not -name '*.stories.js' -print0 \| xargs -0 wc -l \| tail -1` | | Shipped frontend runtime (`build/view.js`, minified) | **3,183 bytes** | `npm run build` then `wc -c < build/view.js` | The only PHP that executes at runtime on a visitor request path is `bibliography-builder.php` diff --git a/includes/resolvers.php b/includes/resolvers.php index 2eea7982..514a8421 100644 --- a/includes/resolvers.php +++ b/includes/resolvers.php @@ -2,10 +2,10 @@ /** * Remote metadata resolvers behind the editor-only REST routes. * - * Resolves PubMed (PMID), PubMed Central (PMCID), arXiv, and ISBN - * identifiers to CSL-JSON through fixed upstream endpoints: NCBI's - * Literature Citation Exporter, the arXiv API, Open Library, and Google - * Books. Every request goes through `wp_safe_remote_get()` to a constant + * Resolves PubMed (PMID), PubMed Central (PMCID), arXiv, ISBN, and DataCite + * DOI identifiers to CSL-JSON through fixed upstream endpoints: NCBI's + * Literature Citation Exporter, the arXiv API, Open Library, Google Books, + * and DataCite's content negotiation service. Every request goes through `wp_safe_remote_get()` to a constant * host with an identifier already validated against a strict pattern, and * results are cached by outcome (success, not found, failure). * @@ -56,6 +56,22 @@ */ const BIBLIOGRAPHY_BUILDER_GOOGLE_BOOKS_API = 'https://www.googleapis.com/books/v1/volumes'; +/** + * DataCite's link-based content negotiation for CSL-JSON: the DOI is appended + * to this path, so no `Accept` header is needed. It answers only for DOIs + * registered with DataCite (Zenodo, figshare, Dryad, many repositories), and + * 404 for the rest. The editor asks it only after Crossref has no record. + * + * @link https://support.datacite.org/docs/datacite-content-resolver + */ +const BIBLIOGRAPHY_BUILDER_DATACITE_CSL_API = 'https://api.datacite.org/dois/application/vnd.citationstyles.csl+json/'; + +/** + * Longest DOI the DataCite route accepts. Real DOIs are far shorter; the cap + * keeps a pasted paragraph from becoming a request path. + */ +const BIBLIOGRAPHY_BUILDER_DOI_MAX_LENGTH = 300; + /** * Modern (2301.00001) and legacy (hep-th/9901001, math.GT/0309136) arXiv IDs, * with an optional version suffix. @@ -1764,3 +1780,178 @@ static function ( string $body ) use ( $identifier ) { return rest_ensure_response( $csl ); } + +/** + * Reduce pasted DOI input to a bare, lowercase DOI. + * + * Accepts a `doi:` label or a doi.org link. DOIs are case-insensitive, so the + * lowercase form is both the cache key and the stored value. The suffix may + * hold any printable character except whitespace and the HTML-significant + * `"`, `<`, and `>`, which no registered DOI uses in practice. + * + * @param mixed $value Raw DOI input. + * @return string The DOI, or an empty string when the input is not one. + */ +function bibliography_builder_normalize_doi( $value ) { + if ( ! is_string( $value ) ) { + return ''; + } + + $doi = trim( $value ); + $doi = (string) preg_replace( '#^(?:https?://(?:dx\.)?doi\.org/|doi:\s*)#i', '', $doi ); + $doi = strtolower( $doi ); + + if ( strlen( $doi ) > BIBLIOGRAPHY_BUILDER_DOI_MAX_LENGTH ) { + return ''; + } + + if ( ! preg_match( '#^10\.\d{4,9}/[^\s"<>]+$#u', $doi ) ) { + return ''; + } + + return $doi; +} + +/** + * Build the cache key for one DataCite DOI resolution. + * + * Hashed, since a DOI can be longer than a transient name allows. + * + * @param string $doi Normalized DOI. + * @return string + */ +function bibliography_builder_get_datacite_cache_key( $doi ) { + return 'datacite_' . md5( $doi ); +} + +/** + * Map DataCite's CSL-JSON for one DOI to the record Borges stores. + * + * DataCite already answers in CSL, so this only tidies it: + * + * - drops `id` (a doi.org URL that would collide with Borges's own entry ID), + * `categories` (subject keywords), `copyright` (the license name), and + * `abstract` (never displayed, and long enough to bloat the block); + * - stores the requested DOI, lowercase, instead of DataCite's uppercase form; + * - turns a name with only a `family` part into a `literal` one, because + * DataCite sends organizations ("The pandas development team") that way, + * and citeproc would otherwise sort and abbreviate them as surnames; + * - falls back to `document` for a type CSL does not define, as the Crossref + * path does, so an unusual type never blocks the import. + * + * `publisher` is kept as DataCite sends it: for datasets and software that is + * the repository (Zenodo, Dryad), which is where APA 7 and Chicago put it. + * + * @param string $body Response body. + * @param string $doi Normalized DOI that was requested. + * @return array|string|null CSL-JSON item, `not_found` for an empty answer + * (DataCite's 204), or null for an unusable one. + */ +function bibliography_builder_datacite_csl_to_record( $body, $doi ) { + if ( '' === trim( $body ) ) { + return 'not_found'; + } + + $data = json_decode( $body, true ); + + if ( ! is_array( $data ) || empty( $data['title'] ) || ! is_string( $data['title'] ) ) { + return null; + } + + unset( $data['id'], $data['categories'], $data['copyright'], $data['abstract'] ); + + $data['DOI'] = $doi; + + if ( ! isset( $data['type'] ) || ! in_array( $data['type'], bibliography_builder_get_known_csl_types(), true ) ) { + $data['type'] = 'document'; + } + + foreach ( array( 'author', 'editor' ) as $role ) { + if ( ! isset( $data[ $role ] ) ) { + continue; + } + + if ( ! is_array( $data[ $role ] ) ) { + unset( $data[ $role ] ); + continue; + } + + $names = array(); + + foreach ( $data[ $role ] as $name ) { + if ( ! is_array( $name ) ) { + continue; + } + + $has_given = isset( $name['given'] ) && is_string( $name['given'] ) && '' !== trim( $name['given'] ); + $has_family = isset( $name['family'] ) && is_string( $name['family'] ) && '' !== trim( $name['family'] ); + + if ( ! $has_given && $has_family ) { + $name = array( 'literal' => trim( $name['family'] ) ); + } + + $names[] = $name; + } + + if ( empty( $names ) ) { + unset( $data[ $role ] ); + } else { + $data[ $role ] = $names; + } + } + + return $data; +} + +/** + * REST callback that resolves a DataCite DOI to CSL-JSON. + * + * The editor calls it only after Crossref reports no record for a DOI, so + * DOIs for datasets, software, and repository deposits resolve too. The DOI + * travels as a query argument because it contains a slash. + * + * @param WP_REST_Request $request REST request. + * @return WP_REST_Response|WP_Error + */ +function bibliography_builder_rest_resolve_datacite( WP_REST_Request $request ) { + $doi = bibliography_builder_normalize_doi( isset( $request['doi'] ) ? $request['doi'] : '' ); + + if ( '' === $doi ) { + return new WP_Error( + 'bibliography_builder_datacite_invalid', + __( 'Invalid DOI.', 'borges-bibliography-builder' ), + array( 'status' => 400 ) + ); + } + + // Encode each part of the suffix but keep its slashes: DataCite reads the + // DOI from the path, and an encoded slash is not the same DOI there. + $path = str_replace( '%2F', '/', rawurlencode( $doi ) ); + + return bibliography_builder_resolve_remote_csl( + BIBLIOGRAPHY_BUILDER_DATACITE_CSL_API . $path, + bibliography_builder_get_datacite_cache_key( $doi ), + 'bibliography_builder_datacite', + array( + 'unreachable' => __( + 'The DataCite metadata service could not be reached.', + 'borges-bibliography-builder' + ), + 'not_found' => __( + 'The DOI is not registered with DataCite.', + 'borges-bibliography-builder' + ), + 'upstream' => __( + 'The DataCite metadata service returned an error.', + 'borges-bibliography-builder' + ), + 'invalid_response' => __( + 'The DataCite metadata service returned an invalid response.', + 'borges-bibliography-builder' + ), + ), + static function ( string $body ) use ( $doi ) { + return bibliography_builder_datacite_csl_to_record( $body, $doi ); + } + ); +} diff --git a/playground/blueprint-main.json b/playground/blueprint-main.json index 4530e65c..8ad3fcc6 100644 --- a/playground/blueprint-main.json +++ b/playground/blueprint-main.json @@ -48,7 +48,7 @@ }, { "step": "runPHP", - "code": "Welcome to the Borges Bibliography Builder development build. This Playground runs the current main branch, not a stable release. It is a sandbox: nothing here is kept after you close the tab.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref.\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

    ' . $html . '

    ' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
    ' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
    '\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n
      \";\n\n\tforeach ( $items as $item ) {\n\t\t$html .= \"\\n
    • \" . $item . \"
    • \\n\";\n\t}\n\n\treturn $html . \"
    \\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" + "code": "Welcome to the Borges Bibliography Builder development build. This Playground runs the current main branch, not a stable release. It is a sandbox: nothing here is kept after you close the tab.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref, and from DataCite for the DOIs Crossref does not hold: datasets, software, and repository deposits, such as the Dryad dataset and the Zenodo software release here (DataCite DOIs need Borges 1.23.0 or later).\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"},{\"format\":\"doi\",\"input\":\"10.5061/dryad.8515\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.5281/zenodo.3509134\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

    ' . $html . '

    ' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
    ' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
    '\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n
      \";\n\n\tforeach ( $items as $item ) {\n\t\t$html .= \"\\n
    • \" . $item . \"
    • \\n\";\n\t}\n\n\treturn $html . \"
    \\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" } ] } diff --git a/playground/blueprint-write-api.json b/playground/blueprint-write-api.json index 9b510f10..51460f63 100644 --- a/playground/blueprint-write-api.json +++ b/playground/blueprint-write-api.json @@ -68,7 +68,7 @@ }, { "step": "runPHP", - "code": "Borges write API (development). This Playground runs the current main build with the opt-in bibliography write routes enabled. Open your browser console here and try await borgesWrite.list(); every call dry-runs first, and { commit: true } writes (see docs/rest-write-routes.md). Not for real sites.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref.\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

    ' . $html . '

    ' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
    ' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
    '\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n
      \";\n\n\tforeach ( $items as $item ) {\n\t\t$html .= \"\\n
    • \" . $item . \"
    • \\n\";\n\t}\n\n\treturn $html . \"
    \\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" + "code": "Borges write API (development). This Playground runs the current main build with the opt-in bibliography write routes enabled. Open your browser console here and try await borgesWrite.list(); every call dry-runs first, and { commit: true } writes (see docs/rest-write-routes.md). Not for real sites.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref, and from DataCite for the DOIs Crossref does not hold: datasets, software, and repository deposits, such as the Dryad dataset and the Zenodo software release here (DataCite DOIs need Borges 1.23.0 or later).\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"},{\"format\":\"doi\",\"input\":\"10.5061/dryad.8515\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.5281/zenodo.3509134\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

    ' . $html . '

    ' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
    ' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
    '\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n
      \";\n\n\tforeach ( $items as $item ) {\n\t\t$html .= \"\\n
    • \" . $item . \"
    • \\n\";\n\t}\n\n\treturn $html . \"
    \\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" } ] } diff --git a/playground/blueprint.json b/playground/blueprint.json index fcff1778..ca2408b7 100644 --- a/playground/blueprint.json +++ b/playground/blueprint.json @@ -48,7 +48,7 @@ }, { "step": "runPHP", - "code": "Welcome to Borges Bibliography Builder. This Playground runs the latest release. It is a sandbox: nothing here is kept after you close the tab.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref.\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

    ' . $html . '

    ' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
    ' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
    '\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n
      \";\n\n\tforeach ( $items as $item ) {\n\t\t$html .= \"\\n
    • \" . $item . \"
    • \\n\";\n\t}\n\n\treturn $html . \"
    \\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" + "code": "Welcome to Borges Bibliography Builder. This Playground runs the latest release. It is a sandbox: nothing here is kept after you close the tab.';\n$borges_demo_json = <<<'JSON'\n{\"title\":\"Borges Bibliography Builder demo\",\"sampleGroups\":[{\"title\":\"DOIs\",\"description\":\"A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref, and from DataCite for the DOIs Crossref does not hold: datasets, software, and repository deposits, such as the Dryad dataset and the Zenodo software release here (DataCite DOIs need Borges 1.23.0 or later).\",\"samples\":[{\"format\":\"doi\",\"input\":\"10.1038/s41586-020-2649-2\"},{\"format\":\"doi\",\"input\":\"doi:10.1038/nature14539\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.1145/3368089.3409742\"},{\"format\":\"doi\",\"input\":\"10.5061/dryad.8515\"},{\"format\":\"doi\",\"input\":\"https://doi.org/10.5281/zenodo.3509134\"}]},{\"title\":\"PubMed and PubMed Central\",\"description\":\"A PMID needs its PMID: label. A PMCID starts with PMC, with or without a PMCID: label. Borges tidies NCBI's MEDLINE habits as the record arrives: bare initials get their periods (Zhao et al. 2001 lists “Zhao, C.”, not “Zhao, C”), an issue sent as “Pt 8” becomes “8”, and “Brain : a journal of neurology” prints as “Brain” (Verhoeven et al. 2006). Needs Borges 1.20.0 or later.\",\"samples\":[{\"format\":\"pmid\",\"input\":\"PMID:26673779\"},{\"format\":\"pmid\",\"input\":\"PMID:11389829\"},{\"format\":\"pmid\",\"input\":\"PMID:16714318\"},{\"format\":\"pmcid\",\"input\":\"PMC3531190\"}]},{\"title\":\"arXiv\",\"description\":\"An arXiv: ID (modern or legacy), an arxiv.org link, or an arXiv DOI.\",\"samples\":[{\"format\":\"arxiv\",\"input\":\"arXiv:1706.03762\"},{\"format\":\"arxiv\",\"input\":\"https://arxiv.org/abs/1810.04805\"},{\"format\":\"arxiv\",\"input\":\"arXiv:hep-th/9711200\"},{\"format\":\"arxiv\",\"input\":\"10.48550/arXiv.2005.14165\"}]},{\"title\":\"ISBNs\",\"description\":\"A labeled ISBN-13 or ISBN-10, or a bare ISBN-13 starting with 978 or 979. Books come from Open Library, with Google Books as a fallback.\",\"samples\":[{\"format\":\"isbn\",\"input\":\"ISBN 978-0-14-032872-1\"},{\"format\":\"isbn\",\"input\":\"9780262033848\"},{\"format\":\"isbn\",\"input\":\"ISBN-10: 0-8112-0012-4\"}]},{\"title\":\"Library catalogs and the Internet Archive\",\"description\":\"An OCLC number or LCCN needs its label (or its WorldCat or lccn.loc.gov link); an Open Library edition ID (OL…M) works on its own. An archive.org item link, ia: identifier, or ARK cites the edition the item names and keeps the archive.org page as the link. Records come from Open Library and the Internet Archive.\",\"samples\":[{\"format\":\"catalog\",\"input\":\"OCLC 297222669\"},{\"format\":\"catalog\",\"input\":\"LCCN 76-28766\"},{\"format\":\"archive\",\"input\":\"https://archive.org/details/limitstomedicine00illi\"}]},{\"title\":\"BibTeX and BibLaTeX\",\"description\":\"Whole entries, one or many. BibLaTeX fields such as date and location are understood.\",\"samples\":[{\"format\":\"bibtex\",\"input\":\"@article{knuth1984literate,\\n author = {Knuth, Donald E.},\\n title = {Literate Programming},\\n journal = {The Computer Journal},\\n year = {1984},\\n volume = {27},\\n number = {2},\\n pages = {97--111},\\n doi = {10.1093/comjnl/27.2.97}\\n}\"},{\"format\":\"bibtex\",\"input\":\"@book{borges1962labyrinths,\\n author = {Borges, Jorge Luis},\\n title = {Labyrinths: Selected Stories and Other Writings},\\n editor = {Yates, Donald A. and Irby, James E.},\\n date = {1962},\\n publisher = {New Directions},\\n location = {New York}\\n}\"}]},{\"title\":\"RIS\",\"description\":\"Records exported from Zotero, Mendeley, EndNote, or another reference manager, one or many. Each record runs from TY - to ER -.\",\"samples\":[{\"format\":\"ris\",\"input\":\"TY - BOOK\\nAU - Kuhn, Thomas S.\\nTI - The Structure of Scientific Revolutions\\nPY - 1962\\nPB - University of Chicago Press\\nCY - Chicago\\nER - \"},{\"format\":\"ris\",\"input\":\"TY - CHAP\\nAU - Geertz, Clifford\\nTI - Thick Description: Toward an Interpretive Theory of Culture\\nT2 - The Interpretation of Cultures\\nPY - 1973\\nSP - 3\\nEP - 30\\nPB - Basic Books\\nCY - New York\\nER - \"}]},{\"title\":\"CSL-JSON\",\"description\":\"A reference manager’s CSL JSON export, or a CSL-JSON file downloaded from Borges: an array of items, or a single item. Paste it on its own, or beside other samples with a blank line between them; mixing needs Borges 1.22.0 or later.\",\"samples\":[{\"format\":\"csl-json\",\"input\":\"[{\\\"type\\\": \\\"book\\\", \\\"title\\\": \\\"Orientalism\\\", \\\"author\\\": [{\\\"family\\\": \\\"Said\\\", \\\"given\\\": \\\"Edward W.\\\"}], \\\"publisher\\\": \\\"Pantheon Books\\\", \\\"publisher-place\\\": \\\"New York\\\", \\\"issued\\\": {\\\"date-parts\\\": [[1978]]}}]\"}]},{\"title\":\"Formatted citations\",\"description\":\"Plain-text citations for books, journal articles, chapters, dissertations, book reviews, and webpages, in Chicago, APA, Harvard, IEEE, Vancouver, ABNT, or OSCOLA shape. The dissertation keeps its “PhD diss.”, and every style’s review names the book it reviews (Borges 1.22.0 or later). ABNT’s surname in capitals comes back as a name (“FREIRE, Paulo” is Paulo Freire), and OSCOLA lines that end in a page number paste as separate entries in an OSCOLA bibliography; both need Borges 1.23.0 or later. A citation that contains a DOI, PMID, PMCID, or arXiv ID is looked up by that identifier instead. Borges is less sure of some shapes, such as the chapter, webpage, Harvard, IEEE, Vancouver, ABNT, and OSCOLA samples here, and marks them for review: check their fields before publishing.\",\"samples\":[{\"format\":\"freetext\",\"input\":\"Binder, Amy J., and Jeffrey L. Kidder. The Channels of Student Activism: How the Left and Right Are Winning (and Losing) in Campus Politics Today. University of Chicago Press, 2022.\"},{\"format\":\"freetext\",\"input\":\"Ostrom, Elinor. Governing the Commons. Cambridge: Cambridge University Press, 1990.\"},{\"format\":\"freetext\",\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85.\"},{\"format\":\"freetext\",\"input\":\"Doyle, Kathleen. “The Queen Mary Psalter.” In The Book by Design: The Remarkable Story of the World’s Greatest Invention, edited by P. J. M. Marks and Stephen Parkin. University of Chicago Press, 2023.\"},{\"format\":\"freetext\",\"input\":\"Yale University. “About Yale: Yale Facts.” Accessed March 8, 2022. https://www.yale.edu/about-yale/yale-facts.\"},{\"format\":\"freetext\",\"input\":\"ClinGen. “ClinGen Variant Curation Expert Panel Protocol, Version 11.” November 2023. https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf\"},{\"format\":\"freetext\",\"input\":\"Blajer de la Garza, Yuna. “A House Is Not a Home: Citizenship and Belonging in Contemporary Democracies.” PhD diss., University of Chicago, 2019.\"},{\"format\":\"freetext\",\"input\":\"Jacobs, Alexandra. “The Muchness of Madonna.” Review of Madonna: A Rebel Life, by Mary Gabriel. New York Times, October 8, 2023.\"},{\"format\":\"freetext\",\"input\":\"Grafton, A. (1997) The footnote: a curious history. Cambridge, MA: Harvard University Press.\"},{\"format\":\"freetext\",\"input\":\"T. Berners-Lee, J. Hendler, and O. Lassila, “The semantic web,” Scientific American, vol. 284, no. 5, pp. 34–43, May 2001.\"},{\"format\":\"freetext\",\"input\":\"Geertz C. Thick description: toward an interpretive theory of culture. In: The interpretation of cultures. New York: Basic Books; 1973. p. 3-30.\"},{\"format\":\"freetext\",\"input\":\"FREIRE, Paulo. Pedagogia do oprimido. 17. ed. Rio de Janeiro: Paz e Terra, 1987.\"},{\"format\":\"freetext\",\"input\":\"Endicott TAO, ‘The Impossibility of the Rule of Law’ (1999) 19 Oxford Journal of Legal Studies 1\"},{\"format\":\"doi\",\"embedded\":true,\"input\":\"Dittmar, Emily L., and Douglas W. Schemske. “Temporal Variation in Selection Influences Microgeographic Local Adaptation.” American Naturalist 202, no. 4 (2023): 471–85. https://doi.org/10.1086/725865.\"}]}],\"features\":[\"Citation Style (block sidebar): nine styles, Chicago Notes-Bibliography and Author-Date, APA 7, MLA 9, Harvard, IEEE, Vancouver, OSCOLA, and ABNT. Section 3 has an example of each. Switching reformats the generated text and keeps your manual edits.\",\"Heading: type the heading in the block, and choose its level in the sidebar: H2 (where a new block starts) to H6, or Paragraph for styled text that stays out of the page outline. the Align heading menu in the block toolbar (the sidebar's Heading Alignment in Borges 1.20.0) centers it, as APA, MLA, Chicago, and ABNT ask, or sets it to the start of the line; the Vancouver example in section 3 uses Start. Leave it empty for no heading.\",\"Edit fields: click any citation to correct its authors, title, year, DOI, and other fields; only the fields you change are saved. The pencil edits the displayed text instead, and Reset edits restores the generated text.\",\"Manual Entry: next to Paste / Import, add a citation field by field when there is nothing to paste. Paste a link on its own, such as https://clinicalgenome.org/site/assets/files/3635/clingen_vcep_protocol_version_11_november2023-1.pdf, and Manual Entry opens with the link filled in, ready for its title: a link alone has no title, author, or date to cite.\",\"Duplicates: paste a DOI that is already in the list; it is skipped, not added twice.\",\"Order: notes and author-date styles sort alphabetically. Numeric styles (IEEE, Vancouver) keep your order; use Move citation up/down.\",\"Confirmations: scroll down the list and move, copy, or edit an entry. “Moved … to position 2 of 5.” and the like appear at the bottom of the editor, like WordPress’s own “Post updated.”, and the list stays put when they go. Warnings that need reading, such as a skipped duplicate, stay next to the add form until you close them. Needs Borges 1.23.0 or later.\",\"Exports (block toolbar): copy the bibliography as text, or download BibTeX, BibLaTeX, RIS, or CSL-JSON.\",\"Per-entry Cite / Export (sidebar, off by default): gives readers copy and download links under each entry on the published page. The Chicago Notes-Bibliography example in section 3 has it on.\",\"Repeated authors (sidebar, for MLA, OSCOLA, Chicago, and ABNT): MLA’s three hyphens and OSCOLA’s double em dash can give way to the names written out, and Chicago and ABNT can bring back their older marks, the 3-em dash and the underscore line. Section 3’s Chicago Notes-Bibliography and ABNT examples use them.\",\"Machine-readable output (sidebar): JSON-LD for search engines (on by default), COinS for Zotero, and embedded CSL-JSON. The examples in section 3 show each on and off.\",\"Block settings: like other blocks, a bibliography takes an HTML anchor and extra CSS classes (Advanced), a font size, and top and bottom margin and padding.\",\"Front end: use View Post to see the published bibliography, then open its read-only REST data.\"],\"examples\":[{\"title\":\"Chicago Notes-Bibliography: per-entry Cite / Export\",\"description\":\"A book, a chapter, a journal article, and a webpage, sorted alphabetically. View the published page and open Cite / Export under any entry to copy it or download it as RIS, BibTeX, BibLaTeX, or CSL-JSON. Settings: Per-entry Cite / Export on, and every machine-readable layer on (JSON-LD, COinS, embedded CSL-JSON); Repeated authors set to the 3-em dash of Chicago’s 17th edition, so on the published page the second Borges entry begins “———.” instead of repeating his name (Chicago 18 repeats the name, the default; needs Borges 1.20.0 or later); heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-notes\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-chicago-notes\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":true,\"outputCiteExport\":true,\"repeatedAuthorMark\":\"dash\"},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"webpage\",\"title\":\"Block Editor Handbook\",\"author\":[{\"literal\":\"WordPress.org\"}],\"container-title\":\"WordPress Developer Resources\",\"URL\":\"https://developer.wordpress.org/block-editor/\"}],\"exports\":[{\"exportBibtex\":\"@book{Borges1962Labyrinths,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@book{Borges1962Labyrinths,\\n\\tauthor = {Borges, Jorge Luis},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@inbook{Borges1962Library,\\n\\taddress = {New York},\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tyear = {1962},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@inbook{Borges1962Library,\\n\\tauthor = {Borges, Jorge Luis},\\n\\tbooktitle = {Labyrinths: Selected {Stories} and {Other} {Writings}},\\n\\teditor = {Yates, Donald A. and Irby, James E.},\\n\\tdate = {1962},\\n\\tlocation = {New York},\\n\\tpublisher = {New Directions},\\n\\ttitle = {The {Library} of {Babel}},\\n\\ttranslator = {Irby, James E.},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournal = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tyear = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@article{Knuth1984Literate,\\n\\tauthor = {Knuth, Donald E.},\\n\\tjournaltitle = {The Computer Journal},\\n\\tdoi = {10.1093/comjnl/27.2.97},\\n\\tnumber = {2},\\n\\tdate = {1984},\\n\\tpages = {97--111},\\n\\ttitle = {Literate {Programming}},\\n\\tvolume = {27},\\n}\\n\\n\\n\"},{\"exportBibtex\":\"@misc{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n\\thowpublished = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\",\"exportBiblatex\":\"@online{WordPressBlock,\\n\\tauthor = {{WordPress.org}},\\n\\tbooktitle = {WordPress {Developer} {Resources}},\\n\\ttitle = {Block {Editor} {Handbook}},\\n\\turl = {https://developer.wordpress.org/block-editor/},\\n}\\n\\n\\n\"}]},{\"title\":\"In-text citations and an annotated bibliography\",\"description\":\"Three books with the compiler's own notes, and a paragraph that cites them. Settings: Show annotations on, Chicago Notes-Bibliography. Select a citation in the paragraph and choose Cite in the toolbar to see its entry and page, or select any text and cite it yourself. Then switch the style to IEEE in the block's sidebar and choose Update citations in its Citations in this post panel: every citation becomes a numbered one, pages kept. A theme's margin-note style turns the same citations into sidenotes.\",\"prose\":[\"The footnote is how a historian shows the work: Grafton, The Footnote. Print made that kind of checking possible at scale, by fixing texts so that every reader saw the same page: Eisenstein, The Printing Press as an Agent of Change. A citation is also a tool in Ivan Illich's sense, one that serves the reader only while it stays small enough to follow: Illich, Tools for Conviviality, chap. 3.\"],\"attributes\":{\"bibliographyId\":\"demo-cite-annotate\",\"citationStyle\":\"chicago-notes-bibliography\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"anchor\":\"demo-cite-annotate\",\"showAnnotations\":true},\"citations\":[{\"type\":\"book\",\"title\":\"Tools for Conviviality\",\"author\":[{\"family\":\"Illich\",\"given\":\"Ivan\"}],\"publisher\":\"Harper & Row\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1973]]},\"annote\":\"Argues that past a certain scale, tools begin to serve themselves rather than the people who use them, and proposes limits that keep them convivial.\\n\\nThe source of the idea of counterfoil research.\"},{\"type\":\"book\",\"title\":\"The Footnote: A Curious History\",\"author\":[{\"family\":\"Grafton\",\"given\":\"Anthony\"}],\"publisher\":\"Harvard University Press\",\"publisher-place\":\"Cambridge, MA\",\"issued\":{\"date-parts\":[[1997]]},\"annote\":\"A history of the scholarly footnote, from Ranke and Gibbon back to the early modern antiquaries: how notes became the way historians make their work checkable.\"},{\"type\":\"book\",\"title\":\"The Printing Press as an Agent of Change: Communications and Cultural Transformations in Early-Modern Europe\",\"author\":[{\"family\":\"Eisenstein\",\"given\":\"Elizabeth L.\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1979]]},\"annote\":\"Argues that printing changed how knowledge was preserved, standardized, and spread, and so helped shape the Renaissance, the Reformation, and the Scientific Revolution.\"}]},{\"title\":\"Chicago Author-Date: same author, same year\",\"description\":\"Three of Einstein’s 1905 papers. Author-date styles letter works by one author in one year (1905a, 1905b, 1905c) so in-text citations stay unambiguous. Settings: the default output (JSON-LD only); heading References at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-chicago-author-date\",\"citationStyle\":\"chicago-author-date\",\"headingText\":\"References\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Zur Elektrodynamik bewegter Körper\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"10\",\"page\":\"891-921\",\"DOI\":\"10.1002/andp.19053221004\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Über einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"322\",\"issue\":\"6\",\"page\":\"132-148\",\"DOI\":\"10.1002/andp.19053220607\",\"issued\":{\"date-parts\":[[1905]]}},{\"type\":\"article-journal\",\"title\":\"Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?\",\"author\":[{\"family\":\"Einstein\",\"given\":\"Albert\"}],\"container-title\":\"Annalen der Physik\",\"volume\":\"323\",\"issue\":\"13\",\"page\":\"639-641\",\"DOI\":\"10.1002/andp.19053231314\",\"issued\":{\"date-parts\":[[1905]]}}]},{\"title\":\"APA 7\",\"description\":\"Journal articles and an arXiv preprint, with DOIs as links. Settings: the default output (JSON-LD only), with the heading at the Paragraph level, so it is styled text rather than a heading.\",\"attributes\":{\"bibliographyId\":\"demo-apa-7\",\"citationStyle\":\"apa-7\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Deep learning\",\"author\":[{\"family\":\"LeCun\",\"given\":\"Yann\"},{\"family\":\"Bengio\",\"given\":\"Yoshua\"},{\"family\":\"Hinton\",\"given\":\"Geoffrey\"}],\"container-title\":\"Nature\",\"volume\":\"521\",\"issue\":\"7553\",\"page\":\"436-444\",\"DOI\":\"10.1038/nature14539\",\"issued\":{\"date-parts\":[[2015]]}},{\"type\":\"article\",\"title\":\"Attention is all you need\",\"author\":[{\"family\":\"Vaswani\",\"given\":\"Ashish\"},{\"family\":\"Shazeer\",\"given\":\"Noam\"},{\"family\":\"Parmar\",\"given\":\"Niki\"},{\"family\":\"Uszkoreit\",\"given\":\"Jakob\"},{\"family\":\"Jones\",\"given\":\"Llion\"},{\"family\":\"Gomez\",\"given\":\"Aidan N.\"},{\"family\":\"Kaiser\",\"given\":\"Łukasz\"},{\"family\":\"Polosukhin\",\"given\":\"Illia\"}],\"publisher\":\"arXiv\",\"number\":\"1706.03762\",\"DOI\":\"10.48550/arXiv.1706.03762\",\"issued\":{\"date-parts\":[[2017]]}},{\"type\":\"article-journal\",\"title\":\"Computing machinery and intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}}]},{\"title\":\"MLA 9: repeated authors\",\"description\":\"Three books by Borges and one about him. MLA 9 does not repeat an author’s name when the entry above is by the same author: it writes three hyphens instead, so the second and third Borges books begin “‑‑‑.” rather than “Borges, Jorge Luis.” The hyphens appear only on the published page; the editor list keeps the full names so you can edit each entry. View the published page to see them. Screen readers still hear the name. To print the name every time, set Repeated authors in the block sidebar to Write the names out. Settings: COinS on, so Zotero’s browser connector can save every entry; heading Works Cited at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-mla-9\",\"citationStyle\":\"mla-9\",\"headingText\":\"Works Cited\",\"headingLevel\":4,\"anchor\":\"demo-mla-9\",\"outputJsonLd\":true,\"outputCoins\":true,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Labyrinths: Selected Stories and Other Writings\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Ficciones\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"editor\":[{\"family\":\"Kerrigan\",\"given\":\"Anthony\"}],\"publisher\":\"Grove Press\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}},{\"type\":\"book\",\"title\":\"Other Inquisitions, 1937–1952\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Simms\",\"given\":\"Ruth L. C.\"}],\"publisher\":\"University of Texas Press\",\"publisher-place\":\"Austin\",\"issued\":{\"date-parts\":[[1964]]}},{\"type\":\"book\",\"title\":\"Borges: A Life\",\"author\":[{\"family\":\"Woodall\",\"given\":\"James\"}],\"publisher\":\"Basic Books\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1996]]}}]},{\"title\":\"Harvard: a bare list\",\"description\":\"No heading and no machine-readable output: just the entries. Settings: heading left empty, JSON-LD off, and the block’s Typography font size set to Small.\",\"attributes\":{\"bibliographyId\":\"demo-harvard\",\"citationStyle\":\"harvard\",\"headingText\":\"\",\"fontSize\":\"small\",\"outputJsonLd\":false,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"book\",\"title\":\"Governing the Commons: The Evolution of Institutions for Collective Action\",\"author\":[{\"family\":\"Ostrom\",\"given\":\"Elinor\"}],\"publisher\":\"Cambridge University Press\",\"publisher-place\":\"Cambridge\",\"issued\":{\"date-parts\":[[1990]]}},{\"type\":\"book\",\"title\":\"The Structure of Scientific Revolutions\",\"author\":[{\"family\":\"Kuhn\",\"given\":\"Thomas S.\"}],\"publisher\":\"University of Chicago Press\",\"publisher-place\":\"Chicago\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"IEEE\",\"description\":\"Numbered entries keep the order you give them. Select the block and use Move citation up/down to renumber. Journals print by their abbreviated titles, from each record's short title. Quoted titles print in sentence case, and well-known places keep their capitals, so Borges’s chapter reads “The library of Babel.” For other names, click the entry and tick Keep title capitalization as entered. Settings: the defaults, in a numbered list.\",\"attributes\":{\"bibliographyId\":\"demo-ieee\",\"citationStyle\":\"ieee\",\"headingText\":\"References\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"A Mathematical Theory of Communication\",\"author\":[{\"family\":\"Shannon\",\"given\":\"Claude E.\"}],\"container-title\":\"Bell System Technical Journal\",\"container-title-short\":\"Bell Syst. Tech. J.\",\"volume\":\"27\",\"issue\":\"3\",\"page\":\"379-423\",\"DOI\":\"10.1002/j.1538-7305.1948.tb01338.x\",\"issued\":{\"date-parts\":[[1948]]}},{\"type\":\"article-journal\",\"title\":\"Computing Machinery and Intelligence\",\"author\":[{\"family\":\"Turing\",\"given\":\"A. M.\"}],\"container-title\":\"Mind\",\"container-title-short\":\"Mind\",\"volume\":\"59\",\"issue\":\"236\",\"page\":\"433-460\",\"DOI\":\"10.1093/mind/LIX.236.433\",\"issued\":{\"date-parts\":[[1950]]}},{\"type\":\"article-journal\",\"title\":\"Literate Programming\",\"author\":[{\"family\":\"Knuth\",\"given\":\"Donald E.\"}],\"container-title\":\"The Computer Journal\",\"container-title-short\":\"Comput. J.\",\"volume\":\"27\",\"issue\":\"2\",\"page\":\"97-111\",\"DOI\":\"10.1093/comjnl/27.2.97\",\"issued\":{\"date-parts\":[[1984]]}},{\"type\":\"chapter\",\"title\":\"The Library of Babel\",\"author\":[{\"family\":\"Borges\",\"given\":\"Jorge Luis\"}],\"translator\":[{\"family\":\"Irby\",\"given\":\"James E.\"}],\"container-title\":\"Labyrinths: Selected Stories and Other Writings\",\"editor\":[{\"family\":\"Yates\",\"given\":\"Donald A.\"},{\"family\":\"Irby\",\"given\":\"James E.\"}],\"publisher\":\"New Directions\",\"publisher-place\":\"New York\",\"issued\":{\"date-parts\":[[1962]]}}]},{\"title\":\"Vancouver: biomedical references\",\"description\":\"Numbered entries with PubMed IDs; authors after the sixth become “et al.” Settings: embedded CSL-JSON on (a script tag other tools can read), beside the default JSON-LD; heading References at level H4, with Align heading set to Start so it lines up with the numbered entries (Vancouver leaves the heading to each journal; the other examples keep the centered default, needs Borges 1.20.0 or later).\",\"attributes\":{\"bibliographyId\":\"demo-vancouver\",\"citationStyle\":\"vancouver\",\"headingText\":\"References\",\"headingLevel\":4,\"headingAlign\":\"start\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":true,\"outputCiteExport\":false},\"citations\":[{\"type\":\"article-journal\",\"title\":\"Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid\",\"author\":[{\"family\":\"Watson\",\"given\":\"J. D.\"},{\"family\":\"Crick\",\"given\":\"F. H. C.\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"171\",\"issue\":\"4356\",\"page\":\"737-738\",\"DOI\":\"10.1038/171737a0\",\"PMID\":\"13054692\",\"issued\":{\"date-parts\":[[1953,4,25]]}},{\"type\":\"article-journal\",\"title\":\"Highly accurate protein structure prediction with AlphaFold\",\"author\":[{\"family\":\"Jumper\",\"given\":\"John\"},{\"family\":\"Evans\",\"given\":\"Richard\"},{\"family\":\"Pritzel\",\"given\":\"Alexander\"},{\"family\":\"Green\",\"given\":\"Tim\"},{\"family\":\"Figurnov\",\"given\":\"Michael\"},{\"family\":\"Ronneberger\",\"given\":\"Olaf\"},{\"family\":\"Tunyasuvunakool\",\"given\":\"Kathryn\"}],\"container-title\":\"Nature\",\"container-title-short\":\"Nature\",\"volume\":\"596\",\"issue\":\"7873\",\"page\":\"583-589\",\"DOI\":\"10.1038/s41586-021-03819-2\",\"PMID\":\"34265844\",\"issued\":{\"date-parts\":[[2021,8]]}}]},{\"title\":\"OSCOLA: tables of cases, legislation, and treaties\",\"description\":\"OSCOLA 5 lists primary sources in their own tables before the secondary sources. Each table’s label sits one level below the block heading. Case names, Acts, statutory instruments, and treaties stay roman in their tables, and the statutory instrument carries its SI number (“Air Navigation Order 2016, SI 2016/765”). Settings: the default output; heading Bibliography at level H4, so the tables are labeled at H5.\",\"attributes\":{\"bibliographyId\":\"demo-oscola\",\"citationStyle\":\"oscola\",\"headingText\":\"Bibliography\",\"headingLevel\":4,\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false},\"citations\":[{\"type\":\"legal_case\",\"title\":\"Donoghue v Stevenson\",\"container-title\":\"AC\",\"issued\":{\"date-parts\":[[1932]]},\"number\":\"562\"},{\"type\":\"legal_case\",\"title\":\"Carlill v Carbolic Smoke Ball Co\",\"container-title\":\"1 QB\",\"issued\":{\"date-parts\":[[1893]]},\"number\":\"256\"},{\"type\":\"legislation\",\"title\":\"Human Rights Act\",\"issued\":{\"date-parts\":[[1998]]}},{\"type\":\"regulation\",\"title\":\"Air Navigation Order 2016\",\"number\":\"SI 2016/765\"},{\"type\":\"treaty\",\"title\":\"Convention for the Protection of Human Rights and Fundamental Freedoms\",\"container-title\":\"213 UNTS\",\"page\":\"221\",\"issued\":{\"date-parts\":[[1950,11,4]]}},{\"type\":\"book\",\"title\":\"Constitutional and Administrative Law\",\"author\":[{\"family\":\"Bradley\",\"given\":\"A. W.\"},{\"family\":\"Ewing\",\"given\":\"K. D.\"},{\"family\":\"Knight\",\"given\":\"C. J. S.\"}],\"edition\":\"17\",\"publisher\":\"Pearson\",\"issued\":{\"date-parts\":[[2018]]}},{\"type\":\"article-journal\",\"title\":\"The Rule of Law\",\"author\":[{\"family\":\"Bingham\",\"given\":\"Tom\"}],\"container-title\":\"Cambridge Law Journal\",\"container-title-short\":\"CLJ\",\"volume\":\"66\",\"page\":\"67\",\"issued\":{\"date-parts\":[[2007]]}}]},{\"title\":\"ABNT: Brazilian references\",\"description\":\"Surnames in capitals, with particles such as “de” after the given name, sorted by surname. The JSON-LD keeps the particle in each person’s name (“Sérgio Buarque de Holanda”). Settings: the default output, except Repeated authors set to the underscore line of NBR 6023:2002, so on the published page Freyre’s second book begins “______.” instead of repeating his name (the 2018 revision repeats the name, the default; needs Borges 1.20.0 or later); heading Referências at level H4.\",\"attributes\":{\"bibliographyId\":\"demo-abnt\",\"citationStyle\":\"abnt\",\"headingText\":\"Referências\",\"headingLevel\":4,\"anchor\":\"demo-abnt\",\"outputJsonLd\":true,\"outputCoins\":false,\"outputCslJson\":false,\"outputCiteExport\":false,\"repeatedAuthorMark\":\"underscore\"},\"citations\":[{\"type\":\"book\",\"title\":\"O alienista\",\"author\":[{\"family\":\"Assis\",\"given\":\"Machado\",\"dropping-particle\":\"de\"}],\"publisher\":\"Ática\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1997]]}},{\"type\":\"book\",\"title\":\"Raízes do Brasil\",\"author\":[{\"family\":\"Holanda\",\"given\":\"Sérgio Buarque\",\"dropping-particle\":\"de\"}],\"publisher\":\"José Olympio\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1936]]}},{\"type\":\"book\",\"title\":\"Casa-grande & senzala\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Maia & Schmidt\",\"publisher-place\":\"Rio de Janeiro\",\"issued\":{\"date-parts\":[[1933]]}},{\"type\":\"book\",\"title\":\"Sobrados e mucambos\",\"author\":[{\"family\":\"Freyre\",\"given\":\"Gilberto\"}],\"publisher\":\"Companhia Editora Nacional\",\"publisher-place\":\"São Paulo\",\"issued\":{\"date-parts\":[[1936]]}}]}]}\nJSON;\n/**\n * Playground demo page builder.\n *\n * `npm run playground:build` inlines this file into each demo blueprint's\n * runPHP step, after defining:\n *\n * - $borges_demo_json The contents of playground/demo-content.json.\n * - $borges_demo_intro An HTML lead paragraph for that blueprint.\n *\n * It rewrites post 1 as the demo page the blueprint lands on, and turns off\n * the editor's Welcome Guide so the page is visible straight away. Example\n * bibliographies are formatted with the plugin's own citeproc formatter and\n * rendered with its PHP port of save(), so they validate against whatever\n * version is installed. A release without that port (before 1.7.0) gets a\n * note instead.\n *\n * Not part of the plugin package (playground/ is in .distignore).\n *\n * @package BibliographyBuilder\n */\n\nrequire_once '/wordpress/wp-load.php';\n\n// Write as the admin, and keep kses from stripping the blocks' JSON-LD\n// scripts and data attributes: kses_init() ran before any user was set.\nwp_set_current_user( 1 );\nkses_remove_filters();\n\n$borges_demo = json_decode( $borges_demo_json, true );\n\n$borges_demo_block = static function ( $name, $attrs, $html ) {\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => $name,\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$borges_demo_paragraph = static function ( $html ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block( 'core/paragraph', array(), '

    ' . $html . '

    ' );\n};\n\n$borges_demo_heading = static function ( $text, $level ) use ( $borges_demo_block ) {\n\t$attrs = 2 === $level ? array() : array( 'level' => $level );\n\t$tag = 'h' . $level;\n\n\treturn $borges_demo_block( 'core/heading', $attrs, '<' . $tag . ' class=\"wp-block-heading\">' . esc_html( $text ) . '' );\n};\n\n$borges_demo_code = static function ( $text ) use ( $borges_demo_block ) {\n\treturn $borges_demo_block(\n\t\t'core/code',\n\t\tarray(),\n\t\t'
    ' . htmlspecialchars( $text, ENT_NOQUOTES, 'UTF-8' ) . '
    '\n\t);\n};\n\n$borges_demo_list = static function ( $items ) {\n\t$html = \"\\n
      \";\n\n\tforeach ( $items as $item ) {\n\t\t$html .= \"\\n
    • \" . $item . \"
    • \\n\";\n\t}\n\n\treturn $html . \"
    \\n\\n\\n\";\n};\n\n$borges_demo_can_prebuild = function_exists( 'bibliography_builder_render_save_markup' )\n\t&& function_exists( 'bibliography_builder_format_csl_items' )\n\t&& bibliography_builder_can_render_save_markup();\n\n// Returns the serialized block, or '' when this install cannot build it.\n$borges_demo_bibliography = static function ( $example ) use ( $borges_demo_can_prebuild ) {\n\tif ( ! $borges_demo_can_prebuild ) {\n\t\treturn '';\n\t}\n\n\t$csl_items = bibliography_builder_validate_and_sanitize_csl_items( $example['citations'] );\n\n\tif ( is_wp_error( $csl_items ) ) {\n\t\treturn '';\n\t}\n\n\t$formatted = bibliography_builder_format_csl_items( $csl_items, $example['attributes']['citationStyle'] );\n\n\tif ( is_wp_error( $formatted ) ) {\n\t\treturn '';\n\t}\n\n\t$citations = array();\n\n\tforeach ( array_values( $csl_items ) as $index => $csl ) {\n\t\t$citation = array(\n\t\t\t'id' => $example['attributes']['bibliographyId'] . '-' . ( $index + 1 ),\n\t\t\t'csl' => $csl,\n\t\t\t'formattedText' => $formatted[ $index ],\n\t\t);\n\n\t\t// The editor stores these for Cite / Export; without them it adds\n\t\t// them on load and the untouched demo opens with unsaved changes.\n\t\tforeach ( array( 'exportBibtex', 'exportBiblatex' ) as $export_key ) {\n\t\t\tif ( isset( $example['exports'][ $index ][ $export_key ] ) ) {\n\t\t\t\t$citation[ $export_key ] = $example['exports'][ $index ][ $export_key ];\n\t\t\t}\n\t\t}\n\n\t\t$citations[] = $citation;\n\t}\n\n\t$attrs = $example['attributes'];\n\t// Stored in display order, as the editor stores them.\n\t$attrs['citations'] = bibliography_builder_sort_citations_for_save( $citations, $attrs['citationStyle'] );\n\t// Render from the attributes as the editor will parse them back.\n\t$html = bibliography_builder_render_save_markup(\n\t\tbibliography_builder_decode_save_attributes( wp_json_encode( $attrs ) )\n\t);\n\n\tif ( '' === $html ) {\n\t\treturn '';\n\t}\n\n\treturn serialize_block(\n\t\tarray(\n\t\t\t'blockName' => 'bibliography-builder/bibliography',\n\t\t\t'attrs' => $attrs,\n\t\t\t'innerBlocks' => array(),\n\t\t\t'innerHTML' => $html,\n\t\t\t'innerContent' => array( $html ),\n\t\t)\n\t) . \"\\n\\n\";\n};\n\n$content = $borges_demo_paragraph( $borges_demo_intro );\n\n$content .= $borges_demo_heading( '1. Paste any supported format', 2 );\n$content .= $borges_demo_paragraph(\n\t'Select the empty Bibliography block at the end of this section, open Paste / Import, paste one or more samples, and choose Add. Separate entries with a blank line; up to 50 go in one paste, so you can copy several groups at once. A CSL-JSON document goes in a paste of its own.'\n);\n\nforeach ( $borges_demo['sampleGroups'] as $group ) {\n\t$content .= $borges_demo_heading( $group['title'], 3 );\n\t$content .= $borges_demo_paragraph( $group['description'] );\n\t$content .= $borges_demo_code( implode( \"\\n\\n\", wp_list_pluck( $group['samples'], 'input' ) ) );\n}\n\n$content .= $borges_demo_block(\n\t'bibliography-builder/bibliography',\n\tarray(\n\t\t'bibliographyId' => 'demo-try-it',\n\t\t'headingText' => 'References',\n\t),\n\t''\n);\n\n$content .= $borges_demo_heading( '2. Key features to try', 2 );\n$content .= $borges_demo_list( $borges_demo['features'] );\n\n$content .= $borges_demo_heading( '3. Example bibliographies', 2 );\n\n$borges_demo_examples = '';\n\nforeach ( $borges_demo['examples'] as $example ) {\n\t$block = $borges_demo_bibliography( $example );\n\n\tif ( '' === $block ) {\n\t\tcontinue;\n\t}\n\n\t$borges_demo_examples .= $borges_demo_heading( $example['title'], 3 );\n\t$borges_demo_examples .= $borges_demo_paragraph( $example['description'] );\n\n\t// Paragraphs that cite the example's entries with the \"Cite\" format, as\n\t// it saves them: links to `#ref-{bibliographyId}-{n}`, the IDs given above.\n\tforeach ( isset( $example['prose'] ) ? $example['prose'] : array() as $prose ) {\n\t\t$borges_demo_examples .= $borges_demo_paragraph( $prose );\n\t}\n\n\t$borges_demo_examples .= $block;\n}\n\n$content .= '' !== $borges_demo_examples\n\t? $borges_demo_paragraph( 'One example per citation style, each built from CSL-JSON. Under each title, Settings names the block settings it shows. Select a block to change them, or view the published page to see them as readers do.' ) . $borges_demo_examples\n\t: $borges_demo_paragraph( 'Pre-built examples need Borges 1.7.0 or later. Paste a few samples from section 1 to build your own.' );\n\nwp_update_post(\n\tarray(\n\t\t'ID' => 1,\n\t\t'post_title' => $borges_demo['title'],\n\t\t'post_content' => wp_slash( $content ),\n\t)\n);\n\n// Skip the block editor's Welcome Guide so the demo page is what opens.\n$borges_demo_meta_key = $GLOBALS['wpdb']->get_blog_prefix() . 'persisted_preferences';\n$borges_demo_preferences = get_user_meta( 1, $borges_demo_meta_key, true );\n$borges_demo_preferences = is_array( $borges_demo_preferences ) ? $borges_demo_preferences : array();\n\n$borges_demo_preferences['core/edit-post'] = array_merge(\n\tisset( $borges_demo_preferences['core/edit-post'] ) && is_array( $borges_demo_preferences['core/edit-post'] )\n\t\t? $borges_demo_preferences['core/edit-post']\n\t\t: array(),\n\tarray( 'welcomeGuide' => false )\n);\n$borges_demo_preferences['_modified'] = gmdate( 'c' );\n\nupdate_user_meta( 1, $borges_demo_meta_key, $borges_demo_preferences );\n" } ] } diff --git a/playground/demo-content.json b/playground/demo-content.json index 86d21c99..729a8a37 100644 --- a/playground/demo-content.json +++ b/playground/demo-content.json @@ -4,11 +4,13 @@ "sampleGroups": [ { "title": "DOIs", - "description": "A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref.", + "description": "A bare DOI, a doi: prefix, or a doi.org link. Metadata comes from Crossref, and from DataCite for the DOIs Crossref does not hold: datasets, software, and repository deposits, such as the Dryad dataset and the Zenodo software release here (DataCite DOIs need Borges 1.23.0 or later).", "samples": [ { "format": "doi", "input": "10.1038/s41586-020-2649-2" }, { "format": "doi", "input": "doi:10.1038/nature14539" }, - { "format": "doi", "input": "https://doi.org/10.1145/3368089.3409742" } + { "format": "doi", "input": "https://doi.org/10.1145/3368089.3409742" }, + { "format": "doi", "input": "10.5061/dryad.8515" }, + { "format": "doi", "input": "https://doi.org/10.5281/zenodo.3509134" } ] }, { diff --git a/readme.txt b/readme.txt index 7eafd253..7e5cb23b 100644 --- a/readme.txt +++ b/readme.txt @@ -171,6 +171,12 @@ DOI input connects to the **Crossref REST API** (https://api.crossref.org/) to r * Crossref privacy policy: https://www.crossref.org/privacy/ * Crossref terms of service: https://www.crossref.org/terms/ +When Crossref has no record for a DOI, as for most datasets, software releases, and repository deposits (Zenodo, figshare, Dryad), the DOI is looked up through the plugin's authenticated WordPress REST proxy in **DataCite's content negotiation service** (https://api.datacite.org/dois/). The proxy uses a fixed upstream host and validates the DOI before making the outbound request. Only the DOI is sent. + +* DataCite content negotiation: https://support.datacite.org/docs/datacite-content-resolver +* DataCite privacy policy: https://datacite.org/privacy-policy/ +* DataCite terms and conditions: https://datacite.org/terms-and-conditions/ + **PubMed/PMID and PubMed Central/PMCID metadata** PubMed/PMID and PubMed Central/PMCID input connects through the plugin's authenticated WordPress REST proxy to the **NCBI/PMC Literature Citation Exporter** CSL endpoints. The proxy uses a fixed upstream host and validates the identifier as numeric before making the outbound request. Only the identifier is sent. diff --git a/src/lib/parser-resolvers.js b/src/lib/parser-resolvers.js index 7f38277b..25040159 100644 --- a/src/lib/parser-resolvers.js +++ b/src/lib/parser-resolvers.js @@ -1,7 +1,8 @@ /** * Network resolution for identifiers: NCBI (PMID, PMCID) through the plugin's - * REST proxy or a direct fetch, CrossRef DOIs and the DOI cache, arXiv, and the - * serial queues that keep lookups to one host at a time. + * REST proxy or a direct fetch, CrossRef DOIs (with a DataCite fallback through + * the plugin's REST proxy) and the DOI cache, arXiv, and the serial queues that + * keep lookups to one host at a time. * * Split from parser.js (refactor memo, Phase E); parser.js re-exports the * public names, so importers are unchanged. @@ -25,6 +26,7 @@ const CROSSREF_CSL_API = 'https://api.crossref.org/works/'; const PMID_REST_ENDPOINT = '/bibliography/v1/pmid/'; const PMCID_REST_ENDPOINT = '/bibliography/v1/pmcid/'; const ARXIV_REST_ENDPOINT = '/bibliography/v1/arxiv'; +export const DATACITE_REST_ENDPOINT = '/bibliography/v1/datacite'; export const ISBN_REST_ENDPOINT = '/bibliography/v1/isbn/'; export const CATALOG_REST_ENDPOINT = '/bibliography/v1/catalog'; export const ARCHIVE_REST_ENDPOINT = '/bibliography/v1/archive'; @@ -127,14 +129,81 @@ async function resolveDoiViaCrossRef( doi, fetchFn ) { ); if ( ! response.ok ) { - throw new Error( - `CrossRef API returned ${ response.status } for DOI ${ doi }` + // The status rides on the error so a 404 can fall through to DataCite. + throw Object.assign( + new Error( + `CrossRef API returned ${ response.status } for DOI ${ doi }` + ), + { status: response.status } ); } return normalizeCrossRefCsl( await response.json() ); } +/** + * Resolve a DOI that Crossref does not know through DataCite. + * + * DataCite registers the DOIs of datasets, software, and repository deposits + * (Zenodo, figshare, Dryad). The lookup goes through the plugin's REST route, + * which asks DataCite's fixed content negotiation host and tidies the record + * (`bibliography_builder_datacite_csl_to_record()` in includes/resolvers.php). + * + * @param {string} doi Normalized DOI. + * @return {Promise} CSL-JSON item, or null when there is no REST + * transport or the route answered with no record. + */ +async function resolveDoiViaDataCite( doi ) { + if ( typeof apiFetch !== 'function' ) { + return null; + } + + const csl = await apiFetch( { + path: `${ DATACITE_REST_ENDPOINT }?doi=${ encodeURIComponent( doi ) }`, + } ); + + return csl && typeof csl === 'object' && ! Array.isArray( csl ) + ? csl + : null; +} + +/** + * Resolve a DOI through Crossref, then DataCite when Crossref reports 404. + * + * Crossref stays first because it registers most journal and book DOIs and + * its CSL is the best tested. Only a 404 falls through: any other Crossref + * failure (an outage, a rate limit) is reported as it is, so a DOI Crossref + * does hold is never resolved from another source by accident. When DataCite + * has no record either, the Crossref error is the one reported. + * + * @param {string} doi Normalized DOI. + * @param {typeof fetch} fetchFn Fetch implementation for the Crossref request. + * @return {Promise} CSL-JSON item. + */ +async function resolveDoiViaRegistries( doi, fetchFn ) { + try { + return await resolveDoiViaCrossRef( doi, fetchFn ); + } catch ( crossRefError ) { + if ( crossRefError?.status !== 404 ) { + throw crossRefError; + } + + let dataCiteCsl = null; + + try { + dataCiteCsl = await resolveDoiViaDataCite( doi ); + } catch { + dataCiteCsl = null; + } + + if ( ! dataCiteCsl ) { + throw crossRefError; + } + + return dataCiteCsl; + } +} + function cloneCslItems( cslItems ) { return cslItems.map( ( item ) => JSON.parse( JSON.stringify( item ) ) ); } @@ -278,7 +347,7 @@ export async function resolveDoiCslItems( value, fetchFn ) { const cslItems = typeof doiFetchFn === 'function' ? [ - await resolveDoiViaCrossRef( + await resolveDoiViaRegistries( cacheKey, doiFetchFn ), diff --git a/src/lib/parser.test.js b/src/lib/parser.test.js index d7497465..718e7b23 100644 --- a/src/lib/parser.test.js +++ b/src/lib/parser.test.js @@ -2065,6 +2065,141 @@ describe( 'parsePastedInput — embedded identifier resolution', () => { } ); } ); +describe( 'DataCite DOI fallback', () => { + // Shaped like DataCite's answer for a Zenodo software DOI, after the REST + // route's tidying (includes/resolvers.php). + const DATACITE_CSL = { + type: 'software', + title: 'pandas-dev/pandas: Pandas', + author: [ { literal: 'The pandas development team' } ], + issued: { 'date-parts': [ [ 2026, 11, 4 ] ] }, + DOI: '10.5281/zenodo.3509134', + publisher: 'Zenodo', + URL: 'https://zenodo.org/doi/10.5281/zenodo.3509134', + version: 'v3.1.1', + }; + + function crossRefStatus( status ) { + return jest.fn( async () => ( { + ok: false, + status, + json: async () => ( {} ), + } ) ); + } + + beforeEach( () => { + jest.clearAllMocks(); + clearDoiMetadataCache(); + apiFetch.mockReset(); + } ); + + it( 'asks DataCite through the REST route when Crossref has no record', async () => { + const fetchFn = crossRefStatus( 404 ); + apiFetch.mockResolvedValue( DATACITE_CSL ); + + const result = await parsePastedInput( + 'https://doi.org/10.5281/zenodo.3509134', + 'apa-7', + { fetchFn } + ); + + expect( fetchFn ).toHaveBeenCalledTimes( 1 ); + expect( apiFetch ).toHaveBeenCalledWith( { + path: '/bibliography/v1/datacite?doi=10.5281%2Fzenodo.3509134', + } ); + expect( result.errors ).toEqual( [] ); + expect( result.entries ).toHaveLength( 1 ); + expect( result.entries[ 0 ].inputFormat ).toBe( 'doi' ); + expect( result.entries[ 0 ].csl ).toMatchObject( { + type: 'software', + title: 'pandas-dev/pandas: Pandas', + author: [ { literal: 'The pandas development team' } ], + publisher: 'Zenodo', + DOI: '10.5281/zenodo.3509134', + } ); + } ); + + it( 'never asks DataCite when Crossref resolves the DOI', async () => { + const fetchFn = jest.fn().mockResolvedValue( { + ok: true, + json: async () => ( { + type: 'journal-article', + title: 'Array programming with NumPy', + DOI: '10.1038/s41586-020-2649-2', + } ), + } ); + + const result = await parsePastedInput( + '10.1038/s41586-020-2649-2', + 'apa-7', + { fetchFn } + ); + + expect( result.entries ).toHaveLength( 1 ); + expect( apiFetch ).not.toHaveBeenCalled(); + } ); + + it( 'does not fall back when Crossref fails for another reason', async () => { + const fetchFn = crossRefStatus( 503 ); + apiFetch.mockResolvedValue( DATACITE_CSL ); + + const result = await parsePastedInput( + '10.5281/zenodo.3509134', + 'apa-7', + { fetchFn } + ); + + expect( apiFetch ).not.toHaveBeenCalled(); + expect( result.entries ).toHaveLength( 0 ); + expect( result.errors ).toHaveLength( 1 ); + } ); + + it( 'reports one error when neither registry knows the DOI', async () => { + const fetchFn = crossRefStatus( 404 ); + apiFetch.mockRejectedValue( + Object.assign( + new Error( 'The DOI is not registered with DataCite.' ), + { + code: 'bibliography_builder_datacite_not_found', + data: { status: 404 }, + } + ) + ); + + const result = await parsePastedInput( + '10.9999/not-a-real-doi', + 'apa-7', + { fetchFn } + ); + + expect( apiFetch ).toHaveBeenCalledTimes( 1 ); + expect( result.entries ).toHaveLength( 0 ); + expect( result.errors ).toEqual( [ + "Couldn't parse the DOI. Check it and try again.", + ] ); + } ); + + it( 'caches a DataCite record like a Crossref one', async () => { + const fetchFn = crossRefStatus( 404 ); + apiFetch.mockResolvedValue( DATACITE_CSL ); + + await parsePastedInput( '10.5281/zenodo.3509134', 'apa-7', { + fetchFn, + } ); + const again = await parsePastedInput( + 'doi:10.5281/ZENODO.3509134', + 'apa-7', + { fetchFn } + ); + + expect( fetchFn ).toHaveBeenCalledTimes( 1 ); + expect( apiFetch ).toHaveBeenCalledTimes( 1 ); + expect( again.entries[ 0 ].csl.title ).toBe( + 'pandas-dev/pandas: Pandas' + ); + } ); +} ); + describe( 'PMCID input resolution', () => { const PMC_CSL = { type: 'article-journal', diff --git a/tests/fixtures/function-inventory.txt b/tests/fixtures/function-inventory.txt index 0119de9d..069781ca 100644 --- a/tests/fixtures/function-inventory.txt +++ b/tests/fixtures/function-inventory.txt @@ -333,3 +333,8 @@ bibliography_builder_yoast_cited_works bibliography_builder_yoast_context_post bibliography_builder_yoast_schema_article bibliography_builder_yoast_schema_webpage +bibliography_builder_normalize_doi +bibliography_builder_get_datacite_cache_key +bibliography_builder_datacite_csl_to_record +bibliography_builder_rest_resolve_datacite +bibliography_builder_rest_datacite_permissions_check diff --git a/tests/phpunit/DataciteResolverTest.php b/tests/phpunit/DataciteResolverTest.php new file mode 100644 index 00000000..e5b3b02b --- /dev/null +++ b/tests/phpunit/DataciteResolverTest.php @@ -0,0 +1,216 @@ + array( 'code' => 200 ), + 'body' => is_string( $data ) ? $data : wp_json_encode( $data ), + ); + } + + private static function zenodo_software(): array { + return array( + 'type' => 'software', + 'id' => 'https://doi.org/10.5281/zenodo.3509134', + 'categories' => array( 'python', 'data science' ), + 'author' => array( array( 'family' => 'The pandas development team' ) ), + 'issued' => array( 'date-parts' => array( array( 2026, 11, 4 ) ) ), + 'abstract' => 'Pandas is a powerful data structures for data analysis, time series, and statistics.', + 'DOI' => '10.5281/ZENODO.3509134', + 'publisher' => 'Zenodo', + 'title' => 'pandas-dev/pandas: Pandas', + 'URL' => 'https://zenodo.org/doi/10.5281/zenodo.3509134', + 'copyright' => 'BSD 3-Clause "New" or "Revised" License', + 'version' => 'v3.1.1', + ); + } + + private static function request( $doi ): WP_REST_Request { + $request = new WP_REST_Request( 'GET', '/bibliography/v1/datacite' ); + $request['doi'] = $doi; + + return $request; + } + + public static function doi_cases(): array { + return array( + 'bare' => array( '10.5281/zenodo.3509134', '10.5281/zenodo.3509134' ), + 'uppercase' => array( '10.5061/DRYAD.8515', '10.5061/dryad.8515' ), + 'doi.org link' => array( 'https://doi.org/10.5061/dryad.8515', '10.5061/dryad.8515' ), + 'dx.doi.org link' => array( 'http://dx.doi.org/10.6084/m9.figshare.123', '10.6084/m9.figshare.123' ), + 'doi: label' => array( 'doi: 10.5281/zenodo.1', '10.5281/zenodo.1' ), + 'surrounding spaces' => array( ' 10.5281/zenodo.1 ', '10.5281/zenodo.1' ), + 'no prefix' => array( 'zenodo.3509134', '' ), + 'short registrant' => array( '10.12/x', '' ), + 'no suffix' => array( '10.5281/', '' ), + 'inner space' => array( '10.5281/zen odo', '' ), + 'markup' => array( '10.5281/