emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Denton <william@williamdenton.org>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: Basic citations: should default citation style have a name and style code?
Date: Thu, 11 Jan 2024 05:25:28 +0000	[thread overview]
Message-ID: <FRzu66HtvIbH7yzFTsyFnZZuKbqsrgWm8oO1qxZyf0b5JCHCpTn6GL0vRi7LZLUKlfUq78aqI5B2RJgBRMkknd5whfD3nDRBF3G2V711V2g=@williamdenton.org> (raw)

This is a small point, but I think I've found a situation where the lack of a name for a default means there are situations where it can't be used.  

Let's say we have Basic.bib with this:

  @book{friends,
    title = {{{LaTeX}} and Friends},
    author = {van Dongen, M.R.C.},
    date = {2012},
    location = {Berlin},
    publisher = {Springer},
    doi = {10.1007/978-3-642-23816-1},
    isbn = {9783642238161}
  }

Also we have this Org file.  Note that it's using the basic citation processor and the author-year bibliography style.  There's no bibliography printed, but that doesn't matter for this example.  The author-year bibliography style is the default: if it was left out of the cite_export line it would still be used, but it can be specified by name.

Because no citation style is set for the document, the default (which has no name) will be used.  The first citation object will use the default and the second will be text with caps (/t/c means the style is set with t for text, variant with c for caps):

# ----------

#+bibliography: Basic.bib
#+cite_export: basic author-year

"Most scholarly works have citations and a bibliography or reference section," wrote a computer scientist [cite:@friends].

[cite/t/c:@friends] wrote, "Most scholarly works have citations and a bibliography or reference section."

# ----------

This exports (C-c C-e t A) to:

# ----------

"Most scholarly works have citations and a bibliography or reference
section," wrote a computer scientist (van Dongen, M.R.C., 2012).

Van Dongen, M.R.C. (2012) wrote, "Most scholarly works have citations
and a bibliography or reference section."

# ----------

But let's say we set the citation style for the document to "text".  Now there is no way to use the unnamed "default" citation style!  Note the change in the second citation object here, because now text is the default.

# ----------

#+bibliography: Basic.bib
#+cite_export: basic author-year text

"Most scholarly works have citations and a bibliography or reference section," wrote a computer scientist [cite:@friends].

[cite//c:@friends] wrote, "Most scholarly works have citations and a bibliography or reference section."

# ----------

This exports to:

# ----------

"Most scholarly works have citations and a bibliography or reference
section," wrote a computer scientist van Dongen, M.R.C. (2012).

Van Dongen, M.R.C. (2012) wrote, "Most scholarly works have citations
and a bibliography or reference section."

# ----------

As far as I can tell, there's nothing that can be done to the first citation object to make it use the "default" style.  The document-level setting makes a new default, and because the original "default" has no name or style code, there's no way to get at it.

The basic citation processor is a proof of concept and shouldn't be used for real work, so this is probably never going to result in a real problem.  Nevertheless, it seems like a bug.  There is a combination that should be possible but isn't.  Sadly my Lisp isn't good enough for me to offer a working solution, but if the default citation style had, for example, the name "default" and one-letter code "d" then I think the problem would go away.

With thanks to everyone who did all the great citation work originally,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada


             reply	other threads:[~2024-01-11  5:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  5:25 William Denton [this message]
2024-01-11  7:52 ` Basic citations: should default citation style have a name and style code? Fraga, Eric
2024-01-11 12:33 ` Ihor Radchenko
2024-01-11 16:36   ` William Denton
2024-01-11 18:10     ` Ihor Radchenko
2024-01-11 22:37       ` William Denton
2024-01-13 19:05   ` Ihor Radchenko
2024-01-14  5:08     ` William Denton
2024-01-14  5:38       ` William Denton
2024-01-14  8:26         ` András Simonyi
2024-01-14 19:10           ` William Denton
2024-01-14 15:16         ` Joost Kremers

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='FRzu66HtvIbH7yzFTsyFnZZuKbqsrgWm8oO1qxZyf0b5JCHCpTn6GL0vRi7LZLUKlfUq78aqI5B2RJgBRMkknd5whfD3nDRBF3G2V711V2g=@williamdenton.org' \
    --to=william@williamdenton.org \
    --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).