From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gMDpG4oaZmFeKQEAgWs5BA (envelope-from ) for ; Wed, 13 Oct 2021 01:30:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eF1yF4oaZmFnHwAAbx9fmQ (envelope-from ) for ; Tue, 12 Oct 2021 23:30:18 +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 5217B1463A for ; Wed, 13 Oct 2021 01:30:17 +0200 (CEST) Received: from localhost ([::1]:56676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maRDs-0000UA-7I for larch@yhetil.org; Tue, 12 Oct 2021 19:30:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maRBq-0006XH-1e for emacs-orgmode@gnu.org; Tue, 12 Oct 2021 19:28:11 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:39485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maRBm-0005dP-Vw for emacs-orgmode@gnu.org; Tue, 12 Oct 2021 19:28:09 -0400 Received: by mail-wr1-x434.google.com with SMTP id r18so2107598wrg.6 for ; Tue, 12 Oct 2021 16:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RKf38uGkxowVTwXyxU7mWAmLuqQlPDnf6Z0VQ6P1DB0=; b=KuDjj+oR+c5iB4kTx/wKluL4p4Ep2Jl7hvOm+nVPODsl+rBVmNfncerN+XBDPUY9aV MsSOjXevnUts06P3uPWVZEt+2EZapO4dXK5KePuOiVEVZqI6gfFZP0v7lx+v10uDOEAF xRVUypuva9eEhpap5C5vvb9A1FfceVk9wS7Vaaxd8T+NUphs4bxcp2C8T/KWva15zybB 0cVAo1/XwiTERbJUGK1gNsb/q1P5BlqSw0XmH2UfieGN7/0Kfowa+J63vLYL4LbIX0Hu mu26/pdsPwVIhWbtV566CHD9YF+b29gBXjFK0jto8GZ7YeKoAzU5EH8iav4vPA69K0QO 3X+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RKf38uGkxowVTwXyxU7mWAmLuqQlPDnf6Z0VQ6P1DB0=; b=ZiaC3ThHifPWYLNdj7bv3xpSRaOmCVauYM6JDq1N2ekcNi5P10CsQpt1pVOV4dtNFJ HF09L+y3rl+TA8ZlOLq3V/Zc7f7AfUQ4Y5H5kD2xJ9Al2RLD62RsuxlsvUGo71NYjivE 05u8oh8SV503/lnpT/0rUhpgYzH+bcZScubhCCCuTJkzJXtKKJoTcAxiRWT/F9cT3gwi U9JQy/XlTVQCxc/mB4Dn8hraLcNPU8IwhmoJOZBUB2GPLnQQwcgR+1hCLlC/yNvMUT7G xmWtvBy3Ij8anc885XEbyTGTwRFu/eTcLholubORDlRg/C5Lrj/QK0XALXxFQIn46W4i qdEQ== X-Gm-Message-State: AOAM5316mFtbj+lLjPuId5faKM8KUg0VvmxQ2cLP5rJ3SRbOxSBWT3Db Re++e88z8X/M6+52+7eahWew9TS+ftZ40Bh5yoc= X-Google-Smtp-Source: ABdhPJydn2hnWoAimbaiS281KUkJMCf0VeduMBIwqEKTbhcBT2CZWj7CD9rOgPPj355tjzDu+pZfJtECqov59Bi+UJk= X-Received: by 2002:a05:600c:1c03:: with SMTP id j3mr8769839wms.171.1634081285182; Tue, 12 Oct 2021 16:28:05 -0700 (PDT) MIME-Version: 1.0 References: <87sfzdv083.fsf@ucl.ac.uk> In-Reply-To: From: John Kitchin Date: Tue, 12 Oct 2021 19:27:54 -0400 Message-ID: Subject: Re: Expanding how the new cite syntax is used to include cross-references - thoughts? To: "Bruce D'Arcus" Content-Type: multipart/alternative; boundary="0000000000008998c905ce303270" Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=johnrkitchin@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: Tom Gillespie , Org Mode List 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=1634081418; 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=RKf38uGkxowVTwXyxU7mWAmLuqQlPDnf6Z0VQ6P1DB0=; b=n+gj6s6miDK7yHG83PjTbnKMz3A87aF4Vs7ln5xs2RoKT1PWZoaDrOBHq0ZvcoMUvQxWw0 nIGv+7KZJ6KXpbX1a4AqBCyNaQncK1INY7vVh+zjgRJOx6+h/CCqkVKDG7u0xfd3dMMqvJ GALb0moKGAHei8zrJmFKPAUSnLnDyaFbZ4Kal8Xap1CJELnSUPAFMR+mggT52hiXxsoeNT eXx33+AuWpFv0kODJ4KRIgD48bKZmUoifMFCi60cnsN9taHbfJu+hDZOMrZOR5FCpYux5F U7V4MxoKFV3fsoPkeS/NCED34iVGuPMn5FE8MGBRvnMk5VcijtZxlXczglp+Ng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634081418; a=rsa-sha256; cv=none; b=ekms7eO/mNCbhgTi7WvIeXyylthTPCBCHCh6s6hXHrC4pYYCQAkTbg4yYJWHCsbGw7CdbE DaifFEWpU95EMn8EL0Ng4puDund/s8ffsrLnf/Pb6u8c6xnEzleGGEmk1zcLo9gftPr3eM Zrg37LzCweF2Ow3spaCQVVkmgSHzLOu5ovEu/hC5I5OzydagNyKoyyVnVZTS7k7niaLjEe W961NYP/p60YHNjO6lrEH+6Gl33xuFJ/8wZnBdsIH4bI8pT7mcVOK5hhX2I7DVVwF9sZUd KhykCXMz4rlZtTBWCqUxYWEuJroZt1IIPH9G8s63d9gOx8oi7zoIc66uHZnq0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=andrew.cmu.edu header.s=google-2021 header.b=KuDjj+oR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (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.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=andrew.cmu.edu header.s=google-2021 header.b=KuDjj+oR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (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: 5217B1463A X-Spam-Score: 1.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: YqMuNd5Jspac --0000000000008998c905ce303270 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I am not sure it really fits the model of the exporters that are in org, since it is basically just a pre-processing hook. I don't think there are any exporters in org that rely on that, e.g. you can't just C-c C-e choose a backend and export with a pre-processing hook. It doesn't make sense to make a command that does that either I think, since you might want to use other pre-processing hooks too, e.g. I have one called natmove (inspired by the latex package) that moves superscript citations to the right hand side of punctuation, and in ox-ipynb I use pre-processing functions for removing solutions, and things like that. So some exports might use all three, and others only two, some just one, and others none. One solution for that is file-local variables I guess. It also is (IMO) a part of org-ref since it uses the links that are defined in org-ref. I see it as more an extension of org-mode than something that needs to be in the core. For simple cross-references the built in internal links are adequate I think. Anyway, it should be tested for a while to see if it is the right way to do this. Maybe there are better ideas for it. 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 Tue, Oct 12, 2021 at 5:58 PM Bruce D'Arcus wrote: > On Tue, Oct 12, 2021 at 5:16 PM John Kitchin > wrote: > > > > I think the existing link capability of org-mode is completely adequate > for cross-references. LaTeX exports are almost completely covered in > org-ref. I made a refproc ( > https://github.com/jkitchin/org-ref/blob/org-ref-3/org-ref-refproc.el) > that provides similar export behavior for other backends in a > pre-processing hook. It supports the concepts in autoref and cleveref by > replacing the org-links with an appropriate org syntax that then exports > natively. For example, if cref:name references a table, it would get > replaced by "Table [[name]]" in the buffer and then exported to the desir= ed > backend. > > Nice work John; I'm glad you were able to sort it out. > > I haven't had a chance to play with it, but FYI I'm seeing a number of > compilation warnings (see below), which should be easy enough to fix. > > Any reason this, or something like it, shouldn't be added to org? > > Bruce > > org-ref-refproc.el:15:1: Warning: defcustom for > =E2=80=98org-ref-refproc-clever-prefixes=E2=80=99 fails to specify ty= pe > org-ref-refproc.el:15:1: Warning: defcustom for > =E2=80=98org-ref-refproc-clever-prefixes=E2=80=99 fails to specify ty= pe > > In org-ref-get-ref-links: > org-ref-refproc.el:47:54: Warning: reference to free variable > =E2=80=98org-ref-ref-types=E2=80=99 > > In org-ref-refproc-referenceables: > org-ref-refproc.el:113:60: Warning: reference to free variable > =E2=80=98org-ref-label-re=E2=80=99 > > In org-ref-refproc-cref-replacement: > org-ref-refproc.el:379:41: Warning: assignment to free variable > =E2=80=98prefix-data=E2=80=99 > org-ref-refproc.el:382:27: Warning: reference to free variable > =E2=80=98prefix-data=E2=80=99 > > In end of data: > org-ref-refproc.el:244:7: Warning: the function =E2=80=98org-ref-ref-jump= -to=E2=80=99 is > not > known to be defined. > --0000000000008998c905ce303270 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am not sure it really fits the model of= the exporters that are in org, since it is basically just a pre-processing= hook. I don't think there are any exporters in org that rely on that, = e.g. you can't just C-c C-e choose a backend and export with a pre-proc= essing hook. It doesn't make sense to make a command that does that eit= her I think, since you might want to use other pre-processing hooks too, e.= g. I have one called natmove (inspired by the latex package) that moves sup= erscript=C2=A0citations to the right hand side of punctuation, and in ox-ip= ynb I use pre-processing functions for removing solutions, and things like = that. So some exports might use all three, and others only two, some just o= ne, and others none. One solution for that is file-local variables I guess.= =C2=A0

It also is (IMO) a part of org-= ref since it uses the links that are defined in org-ref. I see it as more a= n extension of org-mode than something that needs to be in the core. For si= mple cross-references the built in internal links are adequate I think.

Anyway, it should be tested for a while to see if it = is the right way to do this. Maybe there are better ideas for it.


John

--------------------------------= ---
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Departm= ent of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA= 15213
412-268-7803


On Tue, Oct 12, 2021= at 5:58 PM Bruce D'Arcus <bdar= cus@gmail.com> wrote:
On Tue, Oct 12, 2021 at 5:16 PM John Kitchin <jkitchin@andrew.cmu.edu= > wrote:
>
> I think the existing link capability of org-mode is completely adequat= e for cross-references. LaTeX exports are almost completely covered in org-= ref. I made a refproc (https://= github.com/jkitchin/org-ref/blob/org-ref-3/org-ref-refproc.el) that pro= vides similar export behavior for other backends in a pre-processing hook. = It supports the concepts in autoref and cleveref by replacing the org-links= with an appropriate org syntax that then exports natively. For example, if= cref:name references a table, it would get replaced by "Table [[name]= ]" in the buffer and then exported to the desired backend.

Nice work John; I'm glad you were able to sort it out.

I haven't had a chance to play with it, but FYI I'm seeing a number= of
compilation warnings (see below), which should be easy enough to fix.

Any reason this, or something like it, shouldn't be added to org?

Bruce

org-ref-refproc.el:15:1: Warning: defcustom for
=C2=A0 =C2=A0 =E2=80=98org-ref-refproc-clever-prefixes=E2=80=99 fails to sp= ecify type
org-ref-refproc.el:15:1: Warning: defcustom for
=C2=A0 =C2=A0 =E2=80=98org-ref-refproc-clever-prefixes=E2=80=99 fails to sp= ecify type

In org-ref-get-ref-links:
org-ref-refproc.el:47:54: Warning: reference to free variable
=C2=A0 =C2=A0 =E2=80=98org-ref-ref-types=E2=80=99

In org-ref-refproc-referenceables:
org-ref-refproc.el:113:60: Warning: reference to free variable
=C2=A0 =C2=A0 =E2=80=98org-ref-label-re=E2=80=99

In org-ref-refproc-cref-replacement:
org-ref-refproc.el:379:41: Warning: assignment to free variable =E2=80=98pr= efix-data=E2=80=99
org-ref-refproc.el:382:27: Warning: reference to free variable =E2=80=98pre= fix-data=E2=80=99

In end of data:
org-ref-refproc.el:244:7: Warning: the function =E2=80=98org-ref-ref-jump-t= o=E2=80=99 is not
=C2=A0 =C2=A0 known to be defined.
--0000000000008998c905ce303270--