all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Basic citations: should default citation style have a name and style code?
@ 2024-01-11  5:25 William Denton
  2024-01-11  7:52 ` Fraga, Eric
  2024-01-11 12:33 ` Ihor Radchenko
  0 siblings, 2 replies; 12+ messages in thread
From: William Denton @ 2024-01-11  5:25 UTC (permalink / raw)
  To: Emacs Org mode mailing list

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-01-14 19:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11  5:25 Basic citations: should default citation style have a name and style code? William Denton
2024-01-11  7:52 ` 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

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.