From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Bruce D'Arcus" <bdarcus@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [wip-cite-new] New natbib processor
Date: Sat, 15 May 2021 23:29:00 +0200 [thread overview]
Message-ID: <87r1i7r8ir.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAF-FPGN=qf7g-sf4C=uR6F9siq1ArpdMjZCzDdXuKxszMf7LHQ@mail.gmail.com> (Bruce D'Arcus's message of "Sun, 9 May 2021 18:01:44 -0400")
Hello,
"Bruce D'Arcus" <bdarcus@gmail.com> writes:
> I guess the question is really about the logic in this function?
No, not really. It was a more general question about handling
style+variant between local specification and global one, independently
on the processor.
> First, I am thinking "bare" would be more clear than "alt", at least
> if we're shooting for names that are clear outside the content of a
> particular output format. WDYT?
OK for "bare".
> That aside, I think just logically the first makes more sense, because
> nowhere does the style or sub-styles specify the "citep" style.
> Indeed, that style doesn't exist in the current list. This is what the
> code currently produces.
Fair enough.
I pushed in "wip-cite-new" an attempt to parse styles as a pair (name .
variant). I also updated oc-natbib.el and oc-basic.el accordingly.
Now, in oc-natbib.el, the LaTeX command is selected like this:
--8<---------------cut here---------------start------------->8---
(pcase style
;; "text" style.
(`(,(or "text" "t") . ,(or "bare" "b")) "\\citealt")
(`(,(or "text" "t") . ,(or "caps" "c")) "\\Citet")
(`(,(or "text" "t") . ,(or "full" "f")) "\\citet*")
(`(,(or "text" "t") . ,(or "bare-caps" "bc")) "\\Citealt")
(`(,(or "text" "t") . ,(or "bare-full" "bf")) "\\citealt*")
(`(,(or "text" "t") . ,(or "caps-full" "cf")) "\\Citet*")
(`(,(or "text" "t") . ,(or "bare-caps-full" "bcf")) "\\Citealt*")
(`(,(or "text" "t") . ,_) "\\citet")
;; "author" style.
(`(,(or "author" "a") . ,(or "caps" "c")) "\\Citeauthor")
(`(,(or "author" "a") . ,(or "full" "f")) "\\citeauthor*")
(`(,(or "author" "a") . ,_) "\\citeauthor")
;; "year" style.
(`(,(or "year" "y") . ,(or "bare" "b")) "\\citeyear")
(`(,(or "year" "y") . ,_) "\\citeyearpar")
;; Default ("nil") style.
(`(,_ . ,(or "bare" "b")) "\\citealp")
(`(,_ . ,(or "caps" "c")) "\\Citep")
(`(,_ . ,(or "full" "f")) "\\citep*")
(`(,_ . ,(or "bare-caps" "bc")) "\\Citealp")
(`(,_ . ,(or "bare-full" "bf")) "\\citealp*")
(`(,_ . ,(or "caps-full" "cf")) "\\Citep*")
(`(,_ . ,(or "bare-caps-full" "bcf")) "\\Citealp*")
(`(,_ . ,_) "\\citep")
;; This should not happen.
(_ (error "Invalid style: %S" style)))
--8<---------------cut here---------------end--------------->8---
So now, you can write a cryptic [cite/t/bcf:@key] and get
\Citealt*{key}.
Feedback welcome, as always.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2021-05-15 21:29 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 14:53 [wip-cite-new] New natbib processor Nicolas Goaziou
2021-05-05 15:20 ` Bruce D'Arcus
2021-05-05 15:32 ` Bastien
2021-05-06 12:29 ` Nicolas Goaziou
2021-05-06 12:56 ` Bruce D'Arcus
2021-05-05 18:08 ` Bruce D'Arcus
2021-05-05 21:25 ` Bruce D'Arcus
2021-05-05 21:40 ` Bruce D'Arcus
2021-05-05 22:32 ` Bruce D'Arcus
2021-05-06 7:36 ` Denis Maier
2021-05-06 10:06 ` Bruce D'Arcus
2021-05-06 11:22 ` Bruce D'Arcus
2021-05-06 12:05 ` Nicolas Goaziou
2021-05-06 13:09 ` Bruce D'Arcus
2021-05-06 14:12 ` Nicolas Goaziou
2021-05-06 14:23 ` Bruce D'Arcus
2021-05-06 16:20 ` Nicolas Goaziou
2021-05-06 16:59 ` Bruce D'Arcus
2021-05-06 8:47 ` Bruce D'Arcus
2021-05-06 12:11 ` Nicolas Goaziou
2021-05-06 12:37 ` Bruce D'Arcus
2021-05-07 11:37 ` Bruce D'Arcus
2021-05-08 13:51 ` Bruce D'Arcus
2021-05-09 8:57 ` Nicolas Goaziou
2021-05-09 13:49 ` Bruce D'Arcus
2021-05-09 20:25 ` Nicolas Goaziou
2021-05-09 22:01 ` Bruce D'Arcus
2021-05-10 17:07 ` Bruce D'Arcus
2021-05-10 20:22 ` Nicolas Goaziou
2021-05-10 20:52 ` Bruce D'Arcus
2021-05-15 21:29 ` Nicolas Goaziou [this message]
2021-05-15 21:54 ` Bruce D'Arcus
2021-05-16 9:47 ` Nicolas Goaziou
2021-05-11 12:13 ` Eric S Fraga
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=87r1i7r8ir.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--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 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).