Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question has been heavily rewritten. That's why some of the comments and answers might be a little bit odd (they were responses to earlier versions of the question).

I'm using the BiBLaTeX apa package in conjunction with a .bib-file (generated by Mendeley) to create references. Now, in one of my titles, I would like some words to be in italics. Is it possible to invoke stylizing commands directly in the .bib-file?

Minimal (non)working example (taken from Lockstep):

\documentclass{article}

\usepackage[style=apa]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@thesis{A01,
  author = {Author, A.},
  year = {2001},
  title = {This is a thesis title with some \mkbibemph{emphasized words}},
}
@book{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {This is a book title with some \mkbibemph{emphasized words}},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

This just prints the whole title with italics (as specified by the apa style).

share|improve this question
    
If I write A \emph{title} in the title field, then the word will be emphasized in the final printout. Would you show a minimal example, please? –  egreg Nov 1 '11 at 11:09
    
Works for me also with biblatex-apa, so you'll have to provide a minimal working example (MWE) –  lockstep Nov 1 '11 at 11:34
    
Also, check the .bib file generated by Mendeley. Maybe Mendeley tries to sanitize your input and goes over the top (i.e., removes \mkbibemeph). –  lockstep Nov 1 '11 at 11:37
    
@lockstep Darn it. You're right. Mendeley converts it like so: 'title = {{The $\backslash$mkbibemph\{Treason\} of Images [Painting]}}' when I write 'The \mkbibemph{Treason} of Images [Painting]' in Mendeley itself. –  Speldosa Nov 1 '11 at 11:42
    
I'll probably just have to unsync my .bib-file from Mendeley and do the edits manually. –  Speldosa Nov 1 '11 at 11:48
add comment

1 Answer 1

up vote 6 down vote accepted

If you use commands like \mkbibemph in a .bib file, biblatex should apply the correct formatting. Note, however, that the built-in bibliography styles will by default print the titles of some entry types (e.g. @book) in italics, so \mkbibemph will result in upright text.

\documentclass{article}

\usepackage{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@thesis{A01,
  author = {Author, A.},
  year = {2001},
  title = {This is a thesis title with some \mkbibemph{emphasized words}},
}
@book{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {This is a book title with some \mkbibemph{emphasized words}},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

EDIT: In response to your edited question: Your original example doesn't compile for me, and if I replace

\usepackage[style=apa]{biblatex}

with

\usepackage[american]{babel}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

, \mkbibemph works as expected. (Note that biblatex-apa typesets thesis titles in italics.)

EDIT 2: Also, check the .bib file generated by Mendeley. Maybe Mendeley tries to sanitize your input and goes over the top (i.e., removes \mkbibemph).

share|improve this answer
    
Formally, this answers my question. However, I'm using the BiBLaTeX apa package "Invoked by adding the option '[style=apa]' when loading the biblatex package. This is what causes my problems.I'll try to rewrite my question. –  Speldosa Nov 1 '11 at 11:31
    
How come the two different titles are different? The stylizing you've applied looks the same to me. –  Speldosa Nov 1 '11 at 11:38
    
It's @thesis v. @book in the .bib file. –  lockstep Nov 1 '11 at 11:40
    
Right :) I see it now. –  Speldosa Nov 1 '11 at 11:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.