all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Bruce D'Arcus <bdarcus@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: Expanding how the new cite syntax is used to include cross-references - thoughts?
Date: Wed, 11 Aug 2021 09:23:56 -0400	[thread overview]
Message-ID: <m2k0ksp101.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <CAF-FPGMKJyJRWdPRmjQD76z_sTAsScc6T8zwAH86+yWvRFt9cg@mail.gmail.com>


"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> Hi John,
>
> On Tue, Aug 10, 2021 at 8:58 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>
>> ... I would like what I call an orthogonal approach for cross-references,
>> orthogonal in the sense that it can coexist with org-ref, but not require
>> org-ref if you don't use it. The built in internal links like [[label]] lack
>> the flexibility I need (I think), e.g. to differentiate a typical reference
>> from an equation reference (these map to \ref{label} and \eqref{label} in
>> latex for example), and there are other references that are relevant in latex
>> also like \pageref{label}, \cref{label} etc.
>
> Granting the current "lack of flexibility" of internal links, what
> about extending them to allow an optional type; like:
>
> [[eq:label]]
> [[table:label]]

Those look like regular org links, and are handled differently from [[label]]
which is called a fuzzy link if the links are defined. Interestingly, if
the org-links are not defined, they are still fuzzy links, but that is
going to be super confusing because the syntax is so similar. In any
case, this is substituting using one syntax for another purpose for
another syntax.

No extension is needed for regular links, it is already a feature of
org-links which is used heavily in org-ref already does via ref:label,
eqref:label, etc. But to use them, you would have to install org-ref,
and it would come with helm and ivy, which many people do not like. I
don't want to redefine these links because some people (like me) will
have to have both packages installed for legacy documents, and the link
behavior is what ever is loaded last.

It is not necessary to differentiate figures and tables that way, imo, and you
can use different kinds of references to the same label anyway. E.g.
\ref{tab-1} (in LaTeX) would refer to the table number, whereas
\pageref{tab-1} would refer to the page number it is on. Obviously, that
has less meaning for html where there is a single page.


>
> ... etc?
>
> It could work based on similar logic as citation styles, namely that
> content preceding some delimiter (in the examples above, the hyphen)
> would be an optional link type. As you say, it could even have a
> similar style/variant structure as citations.
>
> Perhaps a handful such link types could be reserved, for obvious org
> link targets (like tables, equations, figures, etc), but it would be
> flexible beyond that.
>
> Would that not work?

I don't think this would work. org-ref already defines most or all of
these links. Maybe we could use new names like ref/:label ref/eq:label,
etc though. They seem to be legal names. It still seems like there is a
lot of opportunity for mixing exports from org-ref and org-ref-cite this
way though, because the syntax is so similar. I want as clear a
separation of these packages as can be had.

>
> Because if it could, that would seem to be a better solution, both for
> cross-references, and for citations.
>
> I do grant there may be a challenge with legacy documents adding such
> an optional type, but perhaps there's a solution to that problem?
>
> Bruce


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


      parent reply	other threads:[~2021-08-11 13:42 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
2021-10-13  0:08                       ` Bruce D'Arcus
2021-08-11 13:23   ` John Kitchin [this message]

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

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

  git send-email \
    --in-reply-to=m2k0ksp101.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.