emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: "Bruce D'Arcus" <bdarcus@gmail.com>
Cc: Tom Gillespie <tgbugs@gmail.com>, Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Expanding how the new cite syntax is used to include cross-references - thoughts?
Date: Tue, 12 Oct 2021 19:27:54 -0400	[thread overview]
Message-ID: <CAJ51EToprHaGvnx4_k_RELopwbTBp9sc2-ZvSiC=paJmDqfzHA@mail.gmail.com> (raw)
In-Reply-To: <CAF-FPGNkbNcpJzoTPPCmPH4_3Fxk4F6WzAEiOe7W1EfMAtyNJQ@mail.gmail.com>

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

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 <bdarcus@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 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 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
>     ‘org-ref-refproc-clever-prefixes’ fails to specify type
> org-ref-refproc.el:15:1: Warning: defcustom for
>     ‘org-ref-refproc-clever-prefixes’ fails to specify type
>
> In org-ref-get-ref-links:
> org-ref-refproc.el:47:54: Warning: reference to free variable
>     ‘org-ref-ref-types’
>
> In org-ref-refproc-referenceables:
> org-ref-refproc.el:113:60: Warning: reference to free variable
>     ‘org-ref-label-re’
>
> In org-ref-refproc-cref-replacement:
> org-ref-refproc.el:379:41: Warning: assignment to free variable
> ‘prefix-data’
> org-ref-refproc.el:382:27: Warning: reference to free variable
> ‘prefix-data’
>
> In end of data:
> org-ref-refproc.el:244:7: Warning: the function ‘org-ref-ref-jump-to’ is
> not
>     known to be defined.
>

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

  reply	other threads:[~2021-10-12 23:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  0:58 Expanding how the new cite syntax is used to include cross-references - thoughts? John Kitchin
2021-08-11  1:19 ` Bruce D'Arcus
2021-08-11  5:28   ` Tom Gillespie
2021-08-11 11:13     ` Bruce D'Arcus
2021-08-11 11:54       ` Bruce D'Arcus
2021-08-11 13:43         ` John Kitchin
2021-08-11 14:32           ` Bruce D'Arcus
2021-08-11 14:56             ` John Kitchin
2021-08-11 15:41               ` Bruce D'Arcus
2021-08-11 16:08                 ` Timothy
2021-08-11 16:26                   ` Bruce D'Arcus
2021-08-11 14:13       ` John Kitchin
2021-08-12 15:23         ` Bruce D'Arcus
2021-08-12 17:19           ` John Kitchin
2021-08-12 18:06             ` Bruce D'Arcus
2021-08-13 15:22             ` Eric S Fraga
2021-10-10 13:30               ` Bruce D'Arcus
2021-10-12 21:16                 ` John Kitchin
2021-10-12 21:58                   ` Bruce D'Arcus
2021-10-12 23:27                     ` John Kitchin [this message]
2021-10-13  0:08                       ` Bruce D'Arcus
2021-08-11 13:23   ` 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='CAJ51EToprHaGvnx4_k_RELopwbTBp9sc2-ZvSiC=paJmDqfzHA@mail.gmail.com' \
    --to=jkitchin@andrew.cmu.edu \
    --cc=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tgbugs@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).