emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Timothy <tecosaur@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] Citations in tables are not exported
Date: Sun, 18 Jul 2021 19:28:21 -0400	[thread overview]
Message-ID: <m2im17i4mi.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <87o8b45gze.fsf@gmail.com>

I also see this behavior. I think this should be considered a bug, it is
pretty common to see citations in a table cell.

Additionally, I cannot insert a citation in a caption that is above a
table (or a figure), I get
"user-error: Cannot insert a citation here". That should be considered a
bug in org-cite--allowed-p  I think. It fails because in the caption the
context is a table, and it has :post-affiliated item which causes
org-cite--allowed-p  to return nil.

If I put a citation in the caption anyway, it does seem to get exported
correctly.

I am not sure why the cites don't export inside the table cell though.

Thanks,

Timothy <tecosaur@gmail.com> writes:

> Hi,
>
> I've just started playing with citations, but it seems that I've
> stumbled across a bug where if the citation is in a table cell it will
> be left "raw". See the following example
>
> #+begin_org
> ,#+begin_src bibtex :tangle activedoc.bib
> @article{SchulteActiveOrg,
>          author={Schulte, Eric and Davison, Dan},
>          journal={Computing in Science Engineering},
>          title={Active Documents with Org-Mode},
>          year={2011},
>          volume={13},
>          number={3},
>          pages={66-73},
>          doi={10.1109/MCSE.2011.41}}
> ,#+end_src
>
> ,#+bibliography: activedoc.bib
> ,#+print_bibliography:
>
> [cite/a:@SchulteActiveOrg]
>
> | [cite/a:@SchulteActiveOrg] |
> #+end_org
>
> When exporting to ASCII, I see this:
>
> #+begin_example
> Schulte, Eric, and Dan Davison. 2011. “Active Documents with Org-Mode.”
> /Computing in Science Engineering/ 13 (3):66–73.
>
> (Schulte and Davison 2011)
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>  [cite/a:@SchulteActiveOrg]
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> #+end_example
>
> I hope that's enough to go off.


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


  reply	other threads:[~2021-07-18 23:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  4:38 [BUG] Citations in tables are not exported Timothy
2021-07-18 23:28 ` John Kitchin [this message]
2021-07-27 11:52   ` Matt Price
2021-07-29 12:30     ` Nicolas Goaziou
2021-07-30  0:49       ` Matt Price
2021-07-29 12:26   ` Nicolas Goaziou
2021-07-29 15:34     ` John Kitchin
2021-07-29 19:26       ` Nicolas Goaziou
2021-07-29 22:04         ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2im17i4mi.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).