11

I'm using Biblatex-APA/Biber with LyX and a Bibtex file produced from Mendeley. I can produce bibliographies without any problem, but I would like to change the reference style for inproceedings/booktitle. At the moment, my references look like:

Cole, R., Purao, S., Rossi, M. & Sein, M. (2005). Being proactive: Where action research meets design research. In Proceedings of the 26th international conference on information systems.

From my Bibtex-file:

@inproceedings{Cole2005,
   author = {Cole, Robert and Purao, Sandeep and Rossi, Matti and Sein, Maung},
   booktitle = {Proceedings of the 26th International Conference on Information Systems},
   title = {{Being proactive: Where action research meets design research}},
   year = {2005}
}

Now I want to preserve capitalisation for my inproceedings/booktitle to get this:

Cole, R., Purao, S., Rossi, M. & Sein, M. (2005). Being proactive: Where action
research meets design research. In Proceedings of the 26th International Conference
on Information Systems.

I have experimented with the following, but was not successful.

\DeclareFieldFormat[inproceedings]{booktitle}{#1}

Any suggestions?

moewe
  • 175,683
Christian
  • 133
  • Welcome to TeX.sx!. Try to change booktitle = {{Proceedings of the 26th International Conference on Information Systems}} – Dominikus K. Apr 09 '13 at 13:56
  • @dominikus-k This does the trick, thanks. But is there any way to force Mendeley to produce two curly braces? – Christian Apr 09 '13 at 14:05
  • I have no idea as I am not using Mendeley (in fact: I was not even aware of it being an editor..). This might be a good starting point for a follow-up question =) – Dominikus K. Apr 09 '13 at 14:08
  • Take a look at the BibTeX manual (the link is to an expanded/completed version). It is required reading. And I disagree with @DominikusK, don't force things, work with, not against the software. – vonbrand Apr 09 '13 at 15:05
  • @vonbrand so how can one keep capital letters within some titles without using two curly braces and what is the downside of not using your method? – Dominikus K. Apr 09 '13 at 15:30
  • Since you're using the biblatex-apa style, and since APA style is to typeset titles of books, articles, etc. in (English) "sentence style" -- i.e., only the first letter of the sentence and the first letters of proper names should be set in uppercase, regardless of the form of the original input furnished by, say, Mendeley -- you may have to just get used to this style. If not, don't be surprised if the editorial staff of the outlet where you're trying to get your piece published complains and makes you redo the entire bibliography... – Mico Apr 09 '13 at 15:41
  • @Mico thank your for this tip. But as some of my booktitle are in German, and the reviewing comitee for my thesis too, I wanted to preserve capitalisation. – Christian Apr 09 '13 at 19:32
  • Thanks for providing this clarification. Is there maybe an APA=German (or similarly-named) version of the APA style guide? That way, you won't have to mess with the contents of the bib file... – Mico Apr 09 '13 at 19:49
  • biblatex automatically preserves capitalization as entered in (many) non-English entrys (perhaps unsurprising since biblatex's original author is German). Adding a field like hyphenation = {german} should be enough to ensure downcasing doesn't happen. (Though note: I am not very familiar with the APA style.) – jon Apr 09 '13 at 19:49

3 Answers3

9

From the bibliography style file apa.bbx,

\DeclareFieldFormat[inproceedings]{booktitle}{#1}

doesn't work because the booktitle field is set with \printfield[apacase]{booktitle}, where the apacase formatting directive is defined as

\DeclareFieldFormat{apacase}{\MakeSentenceCase*{#1}}

To preserve the source casing for the booktitle field in the @inproceedings entry type you can redefine the booktitle bibliography macro or the apacase directive in your document preamble. An example of the latter approach is:

\DeclareFieldFormat{apacase}{%
  \ifboolexpr{ test {\ifentrytype{inproceedings}}
    and ( test {\ifcurrentfield{booktitle}}
          or test {\ifcurrentfield{booksubtitle}} ) }
    {#1}{\MakeSentenceCase*{#1}}}

To avoid sentence casing in all but original titles (origtitle) and title add-ons use

\DeclareFieldFormat{apacase}{#1}

instead. Since biblatex-apa relies only on the starred variant \MakeSentenceCase* you can avoid all sentence casing by adding \DeclareCaseLangs{} to the preamble and making use of the hyphenation field in your bib file.

Note that you can avoid protecting some words from down-casing via the subtitle field. For example:

   title = {Being proactive},
   subtitle = {Where action research meets design research},
Audrey
  • 28,881
  • Thank you @Audrey your answer helped me. Personally, using \DeclareCaseLangs{} and the hyphenation field seems to me like the cleanest solution. However, the downside is that Mendeley does not support this field. As a consequence, changes by hand will be overwritten by automatic Bibtex syncing. Therefore, I opted for \DeclareFieldFormat{apacase}{#1}. – Christian Apr 10 '13 at 07:12
  • Apart from that I'm somehow confused about the APA style. After @Mico mentioned that "APA style is to typeset titles of books, articles, etc. in (English) sentence style", I looked up the APA publication manual (6ed.) for proceedings (p. 207, ex. 38 and 39). However, these example preserved capitalisation - from the examples: "Proceedings of the National Academy of Sciences", "Lecture Notes in Computer Scinece: Vol. 4678 ..."? Is this a deviation in biblatex-apa from the APA guidelines? – Christian Apr 10 '13 at 07:17
  • @Christian Perhaps, although biblatex-apa conforms to the 7th edition. bib entries for the APA examples can be found in the documentation (biblatex-apa-test-references.bib). In example 38, the title is protected with braces. 39 isn't. You could contact the biblatex-apa author directly about this. – Audrey Apr 10 '13 at 13:35
  • Just in case people who are not happy with sentence casing who don't use biblatex-apa come here: The equivalent of apacase is titlecase in many styles, so one would need \DeclareFieldFormat{titlecase}{#1}. See https://tex.stackexchange.com/q/430483/35864 – moewe May 07 '18 at 16:33
6

One can preserve specific capitalisation by simply putting the letter of question in curly braces. So

@inproceedings{Cole2005,
   author = {Cole, Robert and Purao, Sandeep and Rossi, Matti and Sein, Maung},
   booktitle = {{Proceedings} of the 26th {International} {Conference} on {Information} {Systems}},
   title = {{Being proactive: Where action research meets design research}},
   year = {2005}
}

will do the job. But most times it is way easier to put the whole line in curly braces, just as it is done with the title.

Dominikus K.
  • 897
  • 7
  • 18
  • 3
    If you go this route, it is better to do things like {International} in place of {I}nternational as the former will allow proper kerning between letters in the word, while in {I}<other letters> there will be none between the I and what follows. – jon Apr 09 '13 at 19:45
  • Good to know - I updated my answer @jon – Dominikus K. Apr 09 '13 at 20:04
2

As I was looking for a convenient solution, at least for me, I wrote a little Python script that parses my local bib file produced by Mendeley. This script puts booktitles in two curly brackets.

import re
import fileinput

library = 'path/to/file'

import re

def re_sub_verbose(pattern, replace, string):
  def substitute(match):
    return match.expand(replace)

  result = re.sub(pattern, substitute, string)

  return result

for line in fileinput.input(library, inplace=1):
    print re_sub_verbose("booktitle = \{(.*)\},", "booktitle = {{\\1}},", line)
Christian
  • 133