From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yMFVG8Dz/2D6HQAAgWs5BA (envelope-from ) for ; Tue, 27 Jul 2021 13:53:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iCIvF8Dz/2AXXgAA1q6Kng (envelope-from ) for ; Tue, 27 Jul 2021 11:53:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A70D9B028 for ; Tue, 27 Jul 2021 13:53:35 +0200 (CEST) Received: from localhost ([::1]:53678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8LeP-0004ym-1U for larch@yhetil.org; Tue, 27 Jul 2021 07:53:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8Ldi-0004yP-5U for emacs-orgmode@gnu.org; Tue, 27 Jul 2021 07:52:50 -0400 Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]:44739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8Ldf-0001Zh-Tn for emacs-orgmode@gnu.org; Tue, 27 Jul 2021 07:52:49 -0400 Received: by mail-vk1-xa2d.google.com with SMTP id r2so2685727vkl.11 for ; Tue, 27 Jul 2021 04:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pQF1mHZl4wQb7OIJnaZVA2BAWM12ssQTZcHFzp+oeQg=; b=aR8rCa9ot1AVlTR+csZC1tJOenMCuMQEu+FeuHUL6Bi9nwRPr4gz6XymflzISR/fcJ OSWiApjxUGpAqOAsVfnUVGTijSAQfzU69jnLe18uNU+CnvUEs4Ux8PdeitJ4GpHWCjmw 12MP40ypH88/sKnfXt/Bk1Xbqj5NY8X2OkPAH7kvi4V314hIhinhI+WCAKdyNPQwqCCM GQEJXtqEEzu8XBetFGmNJ9IzMm+ryj7TjKz1di5k6BPJU/FvJnyZUoCX6V2d/lDWRVzU FG+GB3LdKavALpwsLY0iBT4nKVUOQ3YX27tFLZZtCmuNMYtaaejGBGL5n4zJ80/TY+aE KWqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pQF1mHZl4wQb7OIJnaZVA2BAWM12ssQTZcHFzp+oeQg=; b=HMH5mQBsXBQ/+hyhBWwXYn0mYDpyqKvZNX6xcjvsW6OX0Ep7N44KYpaiE2XS+sgWit 2xDd7kTxnCKKZY9GfNnERIxI+Pt4M54gLe5tJn+YhiMvh9QZBZWbcL4r+CHeLY/t+5hs gASVo1HqnbZbFtfGsTIaYnEigiGpx5sTXq9ycgBPL4scn+SKwbXlIt1zQpEObJaeQiJv ai6qZrf4F92cZD7+p7hy6LHmNkhPxFuTAIiPRUYiKjG74lDewL5pg7GZZaIPS06mxAop 8glkoaLJiUIa6g8yvalU7819PBbk3IyNVjv8dgl4F5m+BC2d3Dwr4ZtcWtPtW+lIXqOZ 7yRg== X-Gm-Message-State: AOAM531pkfnoviWhXnnuxKB2W4KAhRUEL6kXtrAb6cF/wwFvnYquXy75 NaLG5JBkUmA/1vyffNQu6aW9Y6sHzaH8hgsg82I= X-Google-Smtp-Source: ABdhPJzT/n80QASVRAcH7bGb6bFkdMOD/sNXLts3MgXQTJQj+aSRrr34nLyL86SwzE5tPnyw2iXI+0Oc0cvkt50AEZ0= X-Received: by 2002:a1f:cb02:: with SMTP id b2mr7665808vkg.20.1627386763899; Tue, 27 Jul 2021 04:52:43 -0700 (PDT) MIME-Version: 1.0 References: <87o8b45gze.fsf@gmail.com> In-Reply-To: From: Matt Price Date: Tue, 27 Jul 2021 07:52:32 -0400 Message-ID: Subject: Re: [BUG] Citations in tables are not exported To: John Kitchin Content-Type: multipart/alternative; boundary="000000000000f977be05c81981ed" Received-SPF: pass client-ip=2607:f8b0:4864:20::a2d; envelope-from=moptop99@gmail.com; helo=mail-vk1-xa2d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode , Timothy Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627386816; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pQF1mHZl4wQb7OIJnaZVA2BAWM12ssQTZcHFzp+oeQg=; b=fZVRsH63c3y+/aUaXC8/Rw1wBswGo2+Irl4B9pu7qY1X6xf9YHA4kwPxLoyqYicniNcQb9 Du0L9I1Dj8mxOLSi27hluPT7cx3QviRaVuo5cs3OyvnbcQA9miKvbAxx6X4+OOJvCso9E5 5O3hh8DQRT5UkGAXCI7HdfdxiYm7ZmbUojb13710oTGeqpzbRuxP4krrh5MS47XgvRlANC hZAc/8p30FGp0B3Ewg7X80827FZeajmw2DL+h651wBfSQ+19CvZAbPor5bajGkUJgRlva+ BY/+2p9rllie59vAcVWVN3OspGWICTy4L82DVWxg6gb/p9Ty1lpPnxCbNw0p7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627386816; a=rsa-sha256; cv=none; b=bmBFqrEA/ATvylLbpxLBrZ/3ISwVVlY/JH7q5n12T9SeEXWXeQMetvcGR5BdpDurGVcBoO QeAqv85qubFdAxPESNPtgzBH+nHIdPBua4qmleihj19+RbNKAd1hjTLW2XYthulkiEwUEf IQoBHVrWtukGBbZ3naLo6BpT4tcUdVnjf7llNm6adAhwArX4A9hMwTfnWBOyyS7wxsTxdY DVEefSfwQOVRfKq2aStOkw43tv50A7dqNvbmHTOK557Nw/DMjdpYxtStS5HfoYKOb2YT/g 5H+d5+BmtKUY2o9qHNuHjWo/Vs9/76Z/3pVYMTAfsb3KYVRYs0jrurGdhEdW1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=aR8rCa9o; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=aR8rCa9o; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: A70D9B028 X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: JpRWjpE4lOH0 --000000000000f977be05c81981ed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable re: captions, a quick hack is to change line 1373 of oc.el to ((memq type '(nil paragraph keyword))) This makes my life quite a bit easier. No doubt this is a bit too broad, though I am not entirely clear on why there are any restrictions at all on inserting cites. On Sun, Jul 18, 2021 at 7:29 PM John Kitchin wrote: > 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 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=3D{Schulte, Eric and Davison, Dan}, > > journal=3D{Computing in Science Engineering}, > > title=3D{Active Documents with Org-Mode}, > > year=3D{2011}, > > volume=3D{13}, > > number=3D{3}, > > pages=3D{66-73}, > > doi=3D{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. =E2=80=9CActive Documents with Or= g-Mode.=E2=80=9D > > /Computing in Science Engineering/ 13 (3):66=E2=80=9373. > > > > (Schulte and Davison 2011) > > > > =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81 > > [cite/a:@SchulteActiveOrg] > > =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81 > > #+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 > > --000000000000f977be05c81981ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
re: captions, a quick hack is to change line 1373 of = oc.el to

((memq type '(nil paragraph keyw= ord)))

This makes my life quite a bit easier.
<= /div>

No doubt this is a bit too broad, though I am not = entirely clear on why there are any restrictions at all on inserting cites.=

On Sun, Jul 18, 2021 at 7:29 PM John Kitchin <jkitchin@andrew.cmu.edu> wrot= e:
I also see th= is 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 consi= dered a
bug in org-cite--allowed-p=C2=A0 I think. It fails because in the caption t= he
context is a table, and it has :post-affiliated item which causes
org-cite--allowed-p=C2=A0 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.<= br>
Thanks,

Timothy <tecosau= r@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,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 author=3D{Schulte, Eric and Davison,= Dan},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 journal=3D{Computing in Science Engi= neering},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 title=3D{Active Documents with Org-M= ode},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 year=3D{2011},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 volume=3D{13},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 number=3D{3},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pages=3D{66-73},
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 doi=3D{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. =E2=80=9CActive Documents with O= rg-Mode.=E2=80=9D
> /Computing in Science Engineering/ 13 (3):66=E2=80=9373.
>
> (Schulte and Davison 2011)
>
> =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81
>=C2=A0 [cite/a:@SchulteActiveOrg]
> =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94= =81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2= =94=81=E2=94=81=E2=94=81=E2=94=81
> #+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

--000000000000f977be05c81981ed--