emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bibliographies on export with ox-context and ox-epub
@ 2021-11-24  7:22 juh
  2021-11-24  8:43 ` Denis Maier
  2021-11-24 18:14 ` John Kitchin
  0 siblings, 2 replies; 14+ messages in thread
From: juh @ 2021-11-24  7:22 UTC (permalink / raw)
  To: Org-mode Mailinglist

Hi all,

I am kind of lost with references and ox-context and ox-epub.

Is there a tutorial how to integrate a bibliography in ConTeXt and
epub-Export?


What I want to achieve is to use a bibtex bibliographies with org-roam and
export them to epub and ConTeXt to generate bibliographies in the output.

The first wish kind of works as I can insert entries from the bibtex file with C-].

They look like this:

Nam a sapien.[[cite:@horkheimer_dialektik_1984]]

This is the org-ref entry in settings.org.

  (straight-use-package 'org-ref)
  (with-eval-after-load "org-ref" 
  (setq reftex-default-bibliography '("~/org/bibliography.bib")))

  (setq bibtex-completion-bibliography '("~/org/bibliography.bib")
        bibtex-completion-library-path '("~/org/bibtex-pdfs/")
        bibtex-completion-notes-path "~/org/notes/"
        bibtex-completion-pdf-open-function
        (lambda (fpath)
          (call-process "open" nil 0 nil fpath)))

  (define-key org-mode-map (kbd "C-c ]") 'org-ref-insert-link)


What puzzles me is that I could not find a hint to create a bibliography
for epub export and context export. Maybe there isn't. But as some
things with references does not work in my setup I fear that my
configuration is not working. I take snippets from the documentations of
the packages.

I miss an overall example or tutorial for note taking via org-roam and
exporting to epub and ConTeXt.

So for now my current publishing workflow is split into two.

1. Zettelkasten via org-roam

2. PDF and epub creation via pandoc and cite-proc.

As you can see there is a break of tools, so I would like to avoid this.

TIA
juh

-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de




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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  7:22 Bibliographies on export with ox-context and ox-epub juh
@ 2021-11-24  8:43 ` Denis Maier
  2021-11-24  9:32   ` juh
  2021-11-24  9:59   ` Colin Baxter 😺
  2021-11-24 18:14 ` John Kitchin
  1 sibling, 2 replies; 14+ messages in thread
From: Denis Maier @ 2021-11-24  8:43 UTC (permalink / raw)
  To: juh, Org Mode List

Are you already on org 9.5? Looks like your still using the "old" 
org-ref links.

The following mwe might get you started:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#+title: Citation tests
#+cite_export: csl
#+bibliography: test.bib

[cite: @doe 45]

[cite/text: @doe 45]

#+print_bibliography:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This will use the new citation export framework. citeproc-el needs to be 
installed for this to be working.

Anyway, I can export this to plain text, html, and latex without 
problems. I have not yet tried out the context exporter, but I don't see 
why it should not work there as well.

In case you haven't seen it already: 
https://blog.tecosaur.com/tmio/2021-07-31-citations.html

Best,
Denis

Am 24.11.2021 um 08:22 schrieb juh:
> Hi all,
> 
> I am kind of lost with references and ox-context and ox-epub.
> 
> Is there a tutorial how to integrate a bibliography in ConTeXt and
> epub-Export?
> 
> 
> What I want to achieve is to use a bibtex bibliographies with org-roam and
> export them to epub and ConTeXt to generate bibliographies in the output.
> 
> The first wish kind of works as I can insert entries from the bibtex file with C-].
> 
> They look like this:
> 
> Nam a sapien.[[cite:@horkheimer_dialektik_1984]]
> 
> This is the org-ref entry in settings.org.
> 
>    (straight-use-package 'org-ref)
>    (with-eval-after-load "org-ref"
>    (setq reftex-default-bibliography '("~/org/bibliography.bib")))
> 
>    (setq bibtex-completion-bibliography '("~/org/bibliography.bib")
>          bibtex-completion-library-path '("~/org/bibtex-pdfs/")
>          bibtex-completion-notes-path "~/org/notes/"
>          bibtex-completion-pdf-open-function
>          (lambda (fpath)
>            (call-process "open" nil 0 nil fpath)))
> 
>    (define-key org-mode-map (kbd "C-c ]") 'org-ref-insert-link)
> 
> 
> What puzzles me is that I could not find a hint to create a bibliography
> for epub export and context export. Maybe there isn't. But as some
> things with references does not work in my setup I fear that my
> configuration is not working. I take snippets from the documentations of
> the packages.
> 
> I miss an overall example or tutorial for note taking via org-roam and
> exporting to epub and ConTeXt.
> 
> So for now my current publishing workflow is split into two.
> 
> 1. Zettelkasten via org-roam
> 
> 2. PDF and epub creation via pandoc and cite-proc.
> 
> As you can see there is a break of tools, so I would like to avoid this.
> 
> TIA
> juh
> 



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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  8:43 ` Denis Maier
@ 2021-11-24  9:32   ` juh
  2021-11-24 10:59     ` Denis Maier
  2021-11-24  9:59   ` Colin Baxter 😺
  1 sibling, 1 reply; 14+ messages in thread
From: juh @ 2021-11-24  9:32 UTC (permalink / raw)
  To: Denis Maier, juh, Org Mode List

Am 24.11.21 um 09:43 schrieb Denis Maier:
> Are you already on org 9.5? Looks like your still using the "old" 
> org-ref links.
> 
> The following mwe might get you started:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> #+title: Citation tests
> #+cite_export: csl
> #+bibliography: test.bib
> 
> [cite: @doe 45]
> 
> [cite/text: @doe 45]
> 
> #+print_bibliography:
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 

Thanks a lot but I get:

Unknown processor csl

I also followed the example given here:
https://blog.tecosaur.com/tmio/2021-07-31-citations.html

juh


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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  8:43 ` Denis Maier
  2021-11-24  9:32   ` juh
@ 2021-11-24  9:59   ` Colin Baxter 😺
  2021-11-24 10:51     ` Denis Maier
  2021-11-24 11:13     ` Eric S Fraga
  1 sibling, 2 replies; 14+ messages in thread
From: Colin Baxter 😺 @ 2021-11-24  9:59 UTC (permalink / raw)
  To: Denis Maier; +Cc: , juh, Org Mode List

>>>>> Denis Maier <denismaier@mailbox.org> writes:

    > Are you already on org 9.5? Looks like your still using the "old"
    > org-ref links.

    > The following mwe might get you started:

    > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    > #+title: Citation tests #+cite_export: csl

    > #+bibliography: test.bib

    > [cite: @doe 45]

    > [cite/text: @doe 45]

    > #+print_bibliography:
    > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    > This will use the new citation export framework. citeproc-el needs
    > to be installed for this to be working.

Where is citeproc.el? I'm using Org mode version 9.5.1
(release_9.5.1-194-gd82936) and I don't see it.

Best wishes,



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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  9:59   ` Colin Baxter 😺
@ 2021-11-24 10:51     ` Denis Maier
  2021-11-24 11:13     ` Eric S Fraga
  1 sibling, 0 replies; 14+ messages in thread
From: Denis Maier @ 2021-11-24 10:51 UTC (permalink / raw)
  To: Colin Baxter 😺; +Cc: juh, Org Mode List

Am 24.11.2021 um 10:59 schrieb Colin Baxter 😺:
>>>>>> Denis Maier <denismaier@mailbox.org> writes:
>      > Are you already on org 9.5? Looks like your still using the "old"
>      > org-ref links.
>
>      > The following mwe might get you started:
>
>      > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>      > #+title: Citation tests #+cite_export: csl
>
>      > #+bibliography: test.bib
>
>      > [cite: @doe 45]
>
>      > [cite/text: @doe 45]
>
>      > #+print_bibliography:
>      > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>      > This will use the new citation export framework. citeproc-el needs
>      > to be installed for this to be working.
>
> Where is citeproc.el? I'm using Org mode version 9.5.1
> (release_9.5.1-194-gd82936) and I don't see it.
>
> Best wishes,

You'll need to install it. It's an independent package.

Denis




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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  9:32   ` juh
@ 2021-11-24 10:59     ` Denis Maier
  2021-11-24 11:36       ` juh
  0 siblings, 1 reply; 14+ messages in thread
From: Denis Maier @ 2021-11-24 10:59 UTC (permalink / raw)
  To: juh, juh, Org Mode List


Am 24.11.2021 um 10:32 schrieb juh:
> [...]

> Thanks a lot but I get:
>
> Unknown processor csl
What happens after this?

M-: (require 'oc-csl)

Will this evaluate or do you get an error message?

Denis





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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  9:59   ` Colin Baxter 😺
  2021-11-24 10:51     ` Denis Maier
@ 2021-11-24 11:13     ` Eric S Fraga
  2021-11-24 11:58       ` Colin Baxter 😺
  1 sibling, 1 reply; 14+ messages in thread
From: Eric S Fraga @ 2021-11-24 11:13 UTC (permalink / raw)
  To: Colin Baxter 😺; +Cc: juh, Org Mode List, Denis Maier

On Wednesday, 24 Nov 2021 at 09:59, Colin Baxter 😺 wrote:
> Where is citeproc.el? I'm using Org mode version 9.5.1
> (release_9.5.1-194-gd82936) and I don't see it.

It's a separate Emacs package which you will need to install.  It's
available on MELPA.  The csl citation engine depends on it.  It is not
part of org itself.

-- 
: Eric S Fraga, with org release_9.5-230-g2bbac4 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096


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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24 10:59     ` Denis Maier
@ 2021-11-24 11:36       ` juh
  2021-11-24 19:29         ` András Simonyi
  0 siblings, 1 reply; 14+ messages in thread
From: juh @ 2021-11-24 11:36 UTC (permalink / raw)
  To: emacs-orgmode

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

Am Wed, Nov 24, 2021 at 11:59:19AM +0100 schrieb Denis Maier:
> 
> Am 24.11.2021 um 10:32 schrieb juh:
> > [...]
> 
> > Thanks a lot but I get:
> > 
> > Unknown processor csl
> What happens after this?
> 
> M-: (require 'oc-csl)
> 
> Will this evaluate or do you get an error message?
> 

The error disappears but the bibliography still is not rendered.

I get the plain code:

[@doe 45]

[cite/t:@doe 45] 

juh
-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24 11:13     ` Eric S Fraga
@ 2021-11-24 11:58       ` Colin Baxter 😺
  0 siblings, 0 replies; 14+ messages in thread
From: Colin Baxter 😺 @ 2021-11-24 11:58 UTC (permalink / raw)
  To: Org Mode List

>>>>> Eric S Fraga <e.fraga@ucl.ac.uk> writes:

    > On Wednesday, 24 Nov 2021 at 09:59, Colin Baxter 😺 wrote:
    >> Where is citeproc.el? I'm using Org mode version 9.5.1
    >> (release_9.5.1-194-gd82936) and I don't see it.

    > It's a separate Emacs package which you will need to install.
    > It's available on MELPA.  The csl citation engine depends on it.
    > It is not part of org itself.

Ah, I see. Tthanks again Eric

Best wishes,


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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24  7:22 Bibliographies on export with ox-context and ox-epub juh
  2021-11-24  8:43 ` Denis Maier
@ 2021-11-24 18:14 ` John Kitchin
  1 sibling, 0 replies; 14+ messages in thread
From: John Kitchin @ 2021-11-24 18:14 UTC (permalink / raw)
  To: juh; +Cc: Org-mode Mailinglist

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

If you are happy with org-ref, here is a minimal example that shows how to
get a bibliography via csl, and a pre-processing hook.


* test

A sentence with ref [[cite:&nandy-2021-audac-huge]].


* Bibliography
bibliography:~/Dropbox/emacs/bibliography/references.bib

* build
 :noexport:

#+csl-style: apa-5th-edition.csl
#+csl-locale: en-US

#+BEGIN_SRC emacs-lisp
(require 'ox-epub)
(let ((org-export-before-parsing-hook '(org-ref-csl-preprocess-buffer)))
  (org-open-file (org-epub-export-to-epub)))
#+END_SRC


John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Wed, Nov 24, 2021 at 3:00 AM juh <juh+org-mode@mailbox.org> wrote:

> Hi all,
>
> I am kind of lost with references and ox-context and ox-epub.
>
> Is there a tutorial how to integrate a bibliography in ConTeXt and
> epub-Export?
>
>
> What I want to achieve is to use a bibtex bibliographies with org-roam and
> export them to epub and ConTeXt to generate bibliographies in the output.
>
> The first wish kind of works as I can insert entries from the bibtex file
> with C-].
>
> They look like this:
>
> Nam a sapien.[[cite:@horkheimer_dialektik_1984]]
>
> This is the org-ref entry in settings.org.
>
>   (straight-use-package 'org-ref)
>   (with-eval-after-load "org-ref"
>   (setq reftex-default-bibliography '("~/org/bibliography.bib")))
>
>   (setq bibtex-completion-bibliography '("~/org/bibliography.bib")
>         bibtex-completion-library-path '("~/org/bibtex-pdfs/")
>         bibtex-completion-notes-path "~/org/notes/"
>         bibtex-completion-pdf-open-function
>         (lambda (fpath)
>           (call-process "open" nil 0 nil fpath)))
>
>   (define-key org-mode-map (kbd "C-c ]") 'org-ref-insert-link)
>
>
> What puzzles me is that I could not find a hint to create a bibliography
> for epub export and context export. Maybe there isn't. But as some
> things with references does not work in my setup I fear that my
> configuration is not working. I take snippets from the documentations of
> the packages.
>
> I miss an overall example or tutorial for note taking via org-roam and
> exporting to epub and ConTeXt.
>
> So for now my current publishing workflow is split into two.
>
> 1. Zettelkasten via org-roam
>
> 2. PDF and epub creation via pandoc and cite-proc.
>
> As you can see there is a break of tools, so I would like to avoid this.
>
> TIA
> juh
>
> --
> Autoren-Homepage: ......... http://literatur.hasecke.com
> Satiren & Essays: ......... http://www.sudelbuch.de
> Privater Blog: ............ http://www.hasecke.eu
> Netzliteratur-Projekt: .... http://www.generationenprojekt.de
>
>
>
>

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

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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24 11:36       ` juh
@ 2021-11-24 19:29         ` András Simonyi
  2021-11-25 11:19           ` juh
  0 siblings, 1 reply; 14+ messages in thread
From: András Simonyi @ 2021-11-24 19:29 UTC (permalink / raw)
  To: juh; +Cc: emacs-orgmode

Dear All,
On Wed, 24 Nov 2021 at 16:49, juh <juh@mailbox.org> wrote:
> The error disappears but the bibliography still is not rendered.
>
> I get the plain code:
>
> [@doe 45]
>
> [cite/t:@doe 45]
>
> juh
is the rendering OK when you export using the built-in, standard
backends, e.g., html or txt? As a data point, on my system org-cite
export with the CSL processor using ox-context works as expected.

best wishes,
András


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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-24 19:29         ` András Simonyi
@ 2021-11-25 11:19           ` juh
  2021-11-25 12:49             ` András Simonyi
  0 siblings, 1 reply; 14+ messages in thread
From: juh @ 2021-11-25 11:19 UTC (permalink / raw)
  To: emacs-orgmode

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

Am Wed, Nov 24, 2021 at 08:29:46PM +0100 schrieb András Simonyi:
> > The error disappears but the bibliography still is not rendered.
> >
> > I get the plain code:
> >
> > [@doe 45]
> >
> > [cite/t:@doe 45]
> >
> > juh
> is the rendering OK when you export using the built-in, standard
> backends, e.g., html or txt? As a data point, on my system org-cite
> export with the CSL processor using ox-context works as expected.

After I fixed my installation I now use org-mode 9.5.1 but still
citations are not rendered in no export format neither with basic nor
with csl.

Sample is:

#+title: Citation tests
#+cite_export: basic
#+bibliography: test.bib

[cite:@doe 45]

[cite/text:@doe 45]


#+print_bibliography: 



test.bib in same directory:


@article{doe,
         author={org, mode and Syntax, Citation and List, Mailing and Effort, Time},
         journal={Journal of Plain Text Formats},
         title={Elegant Citations with Org-Mode},
         year={2021},
         month={7},
         volume={42},
         number={1},
         pages


With cite_export: csl I get

Scan error: "Unbalanced parentheses" , 9, 299

With cite_export: basic I get

Wrong value for ENTRY-OR-KEY: nil

With org-cite-insert my modeline shows

0 Key ("" to exit): 


TIA
juh


-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-25 11:19           ` juh
@ 2021-11-25 12:49             ` András Simonyi
  2021-11-25 13:53               ` juh
  0 siblings, 1 reply; 14+ messages in thread
From: András Simonyi @ 2021-11-25 12:49 UTC (permalink / raw)
  To: juh; +Cc: emacs-orgmode

On Thu, 25 Nov 2021 at 12:21, juh <juh@mailbox.org> wrote:

> After I fixed my installation I now use org-mode 9.5.1 but still
> citations are not rendered in no export format neither with basic nor
> with csl.

> test.bib in same directory:
>
>
> @article{doe,
>          author={org, mode and Syntax, Citation and List, Mailing and Effort, Time},
>          journal={Journal of Plain Text Formats},
>          title={Elegant Citations with Org-Mode},
>          year={2021},
>          month={7},
>          volume={42},
>          number={1},
>          pages
>
if that's the entire content then it is not a well-formed bib(la)tex
bibliography file: the value of the pages field and the entry's
closing bracket are missing.

best wishes,
András


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

* Re: Bibliographies on export with ox-context and ox-epub
  2021-11-25 12:49             ` András Simonyi
@ 2021-11-25 13:53               ` juh
  0 siblings, 0 replies; 14+ messages in thread
From: juh @ 2021-11-25 13:53 UTC (permalink / raw)
  To: emacs-orgmode

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

Am Thu, Nov 25, 2021 at 01:49:01PM +0100 schrieb András Simonyi:
> if that's the entire content then it is not a well-formed bib(la)tex
> bibliography file: the value of the pages field and the entry's
> closing bracket are missing.

Thanks a lot. 

I fixed this, updated to the newest org but still no rendering in no
format.

Thanks to all.

I will give up for the moment and maybe come back again later.

juh
-- 
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-11-25 13:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  7:22 Bibliographies on export with ox-context and ox-epub juh
2021-11-24  8:43 ` Denis Maier
2021-11-24  9:32   ` juh
2021-11-24 10:59     ` Denis Maier
2021-11-24 11:36       ` juh
2021-11-24 19:29         ` András Simonyi
2021-11-25 11:19           ` juh
2021-11-25 12:49             ` András Simonyi
2021-11-25 13:53               ` juh
2021-11-24  9:59   ` Colin Baxter 😺
2021-11-24 10:51     ` Denis Maier
2021-11-24 11:13     ` Eric S Fraga
2021-11-24 11:58       ` Colin Baxter 😺
2021-11-24 18:14 ` John Kitchin

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).