public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Newbie: Unable to resolve references with citeproc
@ 2023-08-10 16:19 Nigel Jones
       [not found] ` <683f39b2-7d09-4f6c-97da-0b04d42c34e0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Nigel Jones @ 2023-08-10 16:19 UTC (permalink / raw)
  To: pandoc-discuss


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

I have a bibliography file with many citations, and a variety of jupyter 
notebooks which refer to these. Previously these were processed using 
jupyter book, but I now need to create raw notebook versions.

With that in mind I tried this

Create a simple bibliography 'bib.bib'

@article{smid_development_2021,
     title = {Development of the {Advanced} {Encryption} {Standard}},
     volume = {126},
     url = 
{https://www.nist.gov/publications/development-advanced-encryption-standard},
     abstract = {Strong cryptographic algorithms are essential for the 
protection of stored and transmitted data throughout the world.},
     language = {en},
     urldate = {2023-05-17},
     journal = {NIST},
     author = {Smid, Miles E. and Foti, James},
     month = aug,
     year = {2021},
     note = {Last Modified: 2021-10-14T05:10-04:00
 Publisher: Miles E. Smid, James Foti},
     file = {Full Text PDF:/Users/dasc/Zotero/storage/5YCK8JKG/Smid and 
Foti - 2021 - Development of the Advanced Encryption 
Standard.pdf:application/pdf},
}

Now create a simple notebook in lesson1.ipynb with a single reference of 
the form AES[@smid_development_2021] or in full:

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "364e8ef9-eebe-4da8-b3e2-0005c94392ae",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Test document for pandoc\n",
    "\n",
    "We have just one article on the development of 
AES[@smid_development_2021]\n",
    "\n",
    "# References\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}

I also want these citations in IEEE format, so download

https://github.com/citation-style-language/styles/blob/master/ieee.csl

I then experimented with pandoc, but so far I've nott been able to get 
references resolved.

I then invoke 

pandoc -f ipynb -t ipynb --citeproc lesson1.ipynb -o lesson1-withrefs.ipynb 
--bibliography bib.bib --csl ieee.csl

But the output virtually identical to input, other than minor metadata 
differences

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Test document for pandoc\n",
    "\n",
    "We have just one article on the development of 
AES[@smid_development_2021]\n",
    "\n",
    "# References\n",
    "\n"
   ],
   "id": "364e8ef9-eebe-4da8-b3e2-0005c94392ae"
  }
 ],
 "nbformat": 4,
 "nbformat_minor": 5,
 "metadata": {
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3 (ipykernel)",
   "language": "python"
  },
  "language_info": {
   "name": "python",
   "codemirror_mode": {
    "name": "ipython",
    "version": "3"
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 }
}

I then tried other variations such as writing to html, or markdown (gfm), 
but wasn't able to get the references expanded.

I WAS able to process the bibliography references completely in another 
test using a markdown input file of 

---
# Reference
bibliography: references.bib
link-citations: true
csl: ieee.csl
nocite: "@*"
---

and appropriate invocation changes

So I presume I've made a really simple/silly mistake, but I've yet to 
figure out where.

Can anyone spot the obvious error?

Many thanks
Nigel Jones





-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/683f39b2-7d09-4f6c-97da-0b04d42c34e0n%40googlegroups.com.

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

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

* Re: Newbie: Unable to resolve references with citeproc
       [not found] ` <683f39b2-7d09-4f6c-97da-0b04d42c34e0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-08-12  8:44   ` 'Nick Bart' via pandoc-discuss
  0 siblings, 0 replies; 2+ messages in thread
From: 'Nick Bart' via pandoc-discuss @ 2023-08-12  8:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Try

-f ipynb+citations

For an explanation, see https://github.com/jgm/pandoc/issues/5295.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/BAlW-LsU__Fg-DIvIKjyoqNn6EkHEeW1NCF5ZPCt493rt0KZwS9UyHYiL2hhAUg4aBulvsuBnWko7ZGbOS5dAWPBvqUw31r7uB2LFpNDH_M%3D%40protonmail.com.

[-- Attachment #2: Type: text/html, Size: 1411 bytes --]

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

end of thread, other threads:[~2023-08-12  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10 16:19 Newbie: Unable to resolve references with citeproc Nigel Jones
     [not found] ` <683f39b2-7d09-4f6c-97da-0b04d42c34e0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-12  8:44   ` 'Nick Bart' via pandoc-discuss

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