emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Citations: strip braces {} in titles in bibliographies in basic style?
@ 2023-12-13  1:42 William Denton
  2023-12-13 10:49 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: William Denton @ 2023-12-13  1:42 UTC (permalink / raw)
  To: emacs-orgmode

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

Let's say we have a file Basic.bib, like so, with one or two pairs of braces 
around words that need special case preservation:

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

@book{lispandc,
   title = {Lisp and {C}},
   author = {Example, Example},
   publisher = {Example},
   date = {2023}
}

Either one or two braces works and could well be used.  The Zotero extension 
Better Bibtex has a FAQ explaining why it uses two by default: "because the 
Bib(La)TeX case protection rules are incredibly convoluted."¹

We also have an Org file (where "/n" means no citation but the work 
stills goes in the bibliography; note that the basic citation style is set):

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

[cite/n:@friends] [cite/n:@lispandc]

#+print_bibliography:
# ----------

Exporting to text (C-c C-e t A) gives this:

# ----------
Example, Example (2023). /Lisp and {C}/, Example.

van Dongen, M.R.C. (2012). /{{LaTeX}} and Friends/, Springer.
# ----------

The braces are there.  The're also visible in the HTML and ODT exports.  In 
LaTeX, in this example, they're exported but ultimately invisible because of how 
LaTeX handles "\textit{Lisp and {C}}".

Should they be stripped?  I suggest they should.

The basic style is very basic and doesn't do anything fancy in 
bibliographies---just some italics on titles, which it's showing in the text 
export with slashes, and does nicely in the others---but I wonder if it should 
remove the braces.  They are used to preserve case in titles, but the basic 
exporter doesn't change case.  Passing the braces through means people will have 
to edit them out in every basic export.


Bill

¹ https://retorque.re/zotero-better-bibtex/support/faq/#why-the-double-braces

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 421.66 ppm (Mauna Loa Observatory, 2023-12-11)

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

end of thread, other threads:[~2024-05-06 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13  1:42 Citations: strip braces {} in titles in bibliographies in basic style? William Denton
2023-12-13 10:49 ` Ihor Radchenko
2023-12-13 17:12   ` William Denton
2024-05-04 19:19   ` Ihor Radchenko
2024-05-06 17:02     ` William Denton

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