emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]
@ 2022-04-07 22:44 Olaf Trygve Berglihn
  2022-04-08 11:09 ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Trygve Berglihn @ 2022-04-07 22:44 UTC (permalink / raw)
  To: emacs-orgmode

When using the @techreport, @mastersthesis, @phdthesis, and @conference org-cite
fails to find the entry.  Export to some formats fails due to this.

To reproduce use the following bib file with all standard entry types:

test.bib:

@Article{article,
  author =       {Article Author},
  title =        {The Title},
  journal =      {The Journal},
  year =         {2022},
}

@InProceedings{inproceedings,
  author =       {Proceedings Author},
  title =        {The Title},
}

@Conference{conference,
  author =       {Conference Author},
  title =        {The Title},
  booktitle =    {The Book Title},
  year =         {2022},
}

@InCollection{incollection,
  author =       {Incollection Author},
  title =        {The Title},
  booktitle =    {The Book Title},
}

@InBook{inbook,
  author =    {Alt Author},
  editor =    {Alt Editor},
  title =        {The Title},
  chapter =      {1},
  publisher =    {The Publisher},
  year =         {2022},
}

@Proceedings{proceedings,
  title =        {The Proceedings Title},
  year =         {2022},
}

@Book{book,
  author =    {The Author},
  editor =    {The Editor},
  title =        {The Title},
  publisher =    {The Publisher},
  year =         {2022},
}

@Booklet{booklet,
  title =        {The Booklet Title},
}

@PhdThesis{phdthesis,
  author =       {The PhdAuthor},
  title =        {The Title},
  school =       {The School},
  year =         {2022},
}

@MastersThesis{mastersthesis,
  author =       {The MastersThesisAuthor},
  title =        {The Title},
  school =       {The School},
  year =         {2022},
}

@TechReport{techreport,
  author =       {The TechreportAuthor},
  title =        {The Title},
  institution =  {The Institution},
  year =         {2022},
}

@Manual{manual,
  title =        {The Manual Title},
}

@Unpublished{unpublished,
  author =       {The Author},
  title =        {The Unpublished Title},
  note =         {A note},
}

@Misc{misc,
  key =       {Optional key},
  author =    {The Author},
  title =     {Optional Title},
}



Then I try to cite each entry using the following org mode file.  On my
system using Org mode version 9.5.2 (release_9.5.2-426-gf6813d) the
entry types conference, phdthesis, mastersthesis and techreport fails to
resolve and export for some formats.

test.org
--------

#+TITLE: org-cite test
#+BIBLIOGRAPHY: test.bib


[cite:@article]
[cite:@inproceedings]
[cite:@conference]
[cite:@incollection]
[cite:@inbook]
[cite:@proceedings]
[cite:@book]
[cite:@booklet]
[cite:@phdthesis]
[cite:@mastersthesis]
[cite:@techreport]
[cite:@manual]
[cite:@unpublished]
[cite:@misc]


#+PRINT_BIBLIOGRAPHY:




Emacs  : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.4)
 of 2022-03-11
Package: Org mode version 9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)

-- 
Olaf Trygve Berglihn <olafb@pvv.org>


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

* Re: [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]
  2022-04-07 22:44 [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)] Olaf Trygve Berglihn
@ 2022-04-08 11:09 ` Eric S Fraga
  2022-04-08 11:40   ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2022-04-08 11:09 UTC (permalink / raw)
  To: Olaf Trygve Berglihn; +Cc: emacs-orgmode

On Friday,  8 Apr 2022 at 00:44, Olaf Trygve Berglihn wrote:
> When using the @techreport, @mastersthesis, @phdthesis, and @conference org-cite
> fails to find the entry.  Export to some formats fails due to this.

I have tried this and it is true that org cite fails but only for
mastersthesis and conference, in my case, with org up to date as of a
few minutes ago.

According to https://www.bibtex.com/e/entry-types/, conference as a type
was only included for compatibility with Scribe (as either proceedings
or inproceedings do the job) but the others are definitely in the list
and should be supported, I guess.

-- 
: Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50


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

* Re: [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]
  2022-04-08 11:09 ` Eric S Fraga
@ 2022-04-08 11:40   ` John Kitchin
  2022-04-08 19:10     ` Olaf Trygve Berglihn
  0 siblings, 1 reply; 6+ messages in thread
From: John Kitchin @ 2022-04-08 11:40 UTC (permalink / raw)
  To: Org Mode List; +Cc: Olaf Trygve Berglihn

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

I guess this could be related to the dialect of the bibtex file. If it is
BibTeX, then org-cite-basic--parse-bibtex finds conference and masterthesis
for me, and probably anything defined in bibtex-entry-alist. Things that
are not in that list would probably be ignored. This is outsourced to
bibtex.el.

#+BEGIN_SRC emacs-lisp
(mapcar 'car bibtex-entry-alist)
#+END_SRC

#+RESULTS:
| Article | InProceedings | Conference | InCollection | InBook |
Proceedings | Book | Booklet | PhdThesis | MastersThesis | TechReport |
Manual | Unpublished | Misc |

if the file has a biblatex dialect then these are the entries that can be
parsed.

#+BEGIN_SRC emacs-lisp
(mapcar 'car bibtex-biblatex-entry-alist)
#+END_SRC

#+RESULTS:
| Article | Book | MVBook | InBook | BookInBook | SuppBook | Booklet |
Collection | MVCollection | InCollection | SuppCollection | Dataset |
Manual | Misc | Online | Patent | Periodical | SuppPeriodical | Proceedings
| MVProceedings | InProceedings | Reference | MVReference | InReference |
Report | Software | Thesis | Unpublished |

If you open your bibtex file and type C-h v bibtex-dialect, or check that
in the Entry-Types menu you can see what the dialect is.

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 Fri, Apr 8, 2022 at 7:10 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> On Friday,  8 Apr 2022 at 00:44, Olaf Trygve Berglihn wrote:
> > When using the @techreport, @mastersthesis, @phdthesis, and @conference
> org-cite
> > fails to find the entry.  Export to some formats fails due to this.
>
> I have tried this and it is true that org cite fails but only for
> mastersthesis and conference, in my case, with org up to date as of a
> few minutes ago.
>
> According to https://www.bibtex.com/e/entry-types/, conference as a type
> was only included for compatibility with Scribe (as either proceedings
> or inproceedings do the job) but the others are definitely in the list
> and should be supported, I guess.
>
> --
> : Eric S Fraga, with org release_9.5.2-426-gf6813d in Emacs 29.0.50
>
>

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

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

* Re: [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]
  2022-04-08 11:40   ` John Kitchin
@ 2022-04-08 19:10     ` Olaf Trygve Berglihn
  2022-04-08 19:51       ` Rick Lupton
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Trygve Berglihn @ 2022-04-08 19:10 UTC (permalink / raw)
  To: John Kitchin; +Cc: Org Mode List

Thanks for the info.  I do get that e.g. TechReport is in
bibtex-entry-alist, but it does not work still.  I also tried to remove
any ${HOME}/.emacs.d stuff to ensure no interaction.

bibtex-entry-alist is only populated after an explicit call to
(load-library "bibtex")
or by first visiting a bibtex buffer.

#+BEGIN_SRC emacs-lisp
(mapcar 'car bibtex-entry-alist)
#+END_SRC

#+RESULTS:
| Article | InProceedings | Conference | InCollection | InBook | Proceedings | Book | Booklet | PhdThesis | MastersThesis | TechReport | Manual | Unpublished | Misc |


bibtex-dialect is a variable defined in ‘bibtex.el’.
Its value is ‘BibTeX’

Unfortunately, my elisp and org knowledge is limited, so I'm currently
not able to provide more details, trace, or debugging info without some
guidance.

Thanks for your help.

-Olaf

-- 
Olaf Trygve Berglihn <olafb@pvv.org>



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

* Re: [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]
  2022-04-08 19:10     ` Olaf Trygve Berglihn
@ 2022-04-08 19:51       ` Rick Lupton
  2022-04-08 20:10         ` Bruce D'Arcus
  0 siblings, 1 reply; 6+ messages in thread
From: Rick Lupton @ 2022-04-08 19:51 UTC (permalink / raw)
  To: emacs-orgmode

I also found this recently. The reason is that BibTeX-dialect is set by org-cite-basic--parse-bibliography in oc-basic.el based on the file extension. Renaming your bibliography file to end in “.bibtex” instead of “.bib” should make it be parsed using the bibtex rather than biblatex dialect. 

I did find this surprising, as I’ve always just used “.bib” for both dialects, and unless I was missing something it seemed to be incompatible with the bibtex program which seemed to expect a .bib extension. 

Generally the cite export is working well, thank you. 

Best
Rick

On Fri, 8 Apr 2022, at 8:10 PM, Olaf Trygve Berglihn wrote:
> Thanks for the info.  I do get that e.g. TechReport is in
> bibtex-entry-alist, but it does not work still.  I also tried to remove
> any ${HOME}/.emacs.d stuff to ensure no interaction.
>
> bibtex-entry-alist is only populated after an explicit call to
> (load-library "bibtex")
> or by first visiting a bibtex buffer.
>
> #+BEGIN_SRC emacs-lisp
> (mapcar 'car bibtex-entry-alist)
> #+END_SRC
>
> #+RESULTS:
> | Article | InProceedings | Conference | InCollection | InBook | 
> Proceedings | Book | Booklet | PhdThesis | MastersThesis | TechReport | 
> Manual | Unpublished | Misc |
>
>
> bibtex-dialect is a variable defined in ‘bibtex.el’.
> Its value is ‘BibTeX’
>
> Unfortunately, my elisp and org knowledge is limited, so I'm currently
> not able to provide more details, trace, or debugging info without some
> guidance.
>
> Thanks for your help.
>
> -Olaf
>
> -- 
> Olaf Trygve Berglihn <olafb@pvv.org>


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

* Re: [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)]
  2022-04-08 19:51       ` Rick Lupton
@ 2022-04-08 20:10         ` Bruce D'Arcus
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce D'Arcus @ 2022-04-08 20:10 UTC (permalink / raw)
  To: Rick Lupton; +Cc: org-mode-email

On Fri, Apr 8, 2022 at 3:51 PM Rick Lupton <mail@ricklupton.name> wrote:
>
> I also found this recently. The reason is that BibTeX-dialect is set by org-cite-basic--parse-bibliography in oc-basic.el based on the file extension. Renaming your bibliography file to end in “.bibtex” instead of “.bib” should make it be parsed using the bibtex rather than biblatex dialect.
>
> I did find this surprising, as I’ve always just used “.bib” for both dialects ...

Yeah.

Perhaps the code should instead use of ~bibtex-dialect~, rather than,
as now, reset that variable based on the file extension?

Bruce


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

end of thread, other threads:[~2022-04-08 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 22:44 [BUG] org-cite does not support techreport, mastersthesis, phdthesis, and conference entries [9.5.2 (release_9.5.2-426-gf6813d @ /usr/share/emacs/site-lisp/org/)] Olaf Trygve Berglihn
2022-04-08 11:09 ` Eric S Fraga
2022-04-08 11:40   ` John Kitchin
2022-04-08 19:10     ` Olaf Trygve Berglihn
2022-04-08 19:51       ` Rick Lupton
2022-04-08 20:10         ` Bruce D'Arcus

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).