## LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ Italics in book titles

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Loupiote3
Posts: 4
Joined: Tue Jul 31, 2018 2:47 pm

### Italics in book titles

Dear all,

Please excuse me for asking this question as there is probably an easy fix but haven't been able to find it online and have been out of using Latex for a couple of months so I am a bit rusty…

I have a number of book titles with species names in them. BibTex is automatically putting my book titles in italics, which is fine. But seeing that species names are normally italicised, when they are in a title which is already in italics one is supposed to de-italicise the species name (if that makes sense). And I have no idea how to do this!

For instance, I have:

Cranial shape variation in \textit{Homo erectus}
or
Cranial shape variation in Homo erectus

which compiles as:

Cranial shape variation in Homo erectus

But I want:

Cranial shape variation in Homo erectus

Does anyone know what to do to rectify this?

Many thanks!

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm
Back on my computer I thought i would provide a more robust solution.

Naturally, defining a new semantic command comes to mind for this kind of stuff. So i looked up the original definition for \emph and modified it to create a new command \species.

1. \begin{filecontents}{\jobname.bib}
2. @book{lion2010,
3. author = {Laura Lion and Gabrielle Giraffe and Carl Capybara},
4. title = {The history of \species{Homo sapiens} and other stuff},
5. publisher = {publishing house},
6. date = {2010},
7. keywords = {trusted},
8. }
9. \end{filecontents}
10. \documentclass{article}
11. \usepackage[backend=biber]{biblatex}
13. \makeatletter
14. \DeclareRobustCommand\spec{\@nomath\spec \ifdim \fontdimen\@ne\font >\z@
15. \specinnershape \else \itshape \fi}
16. \newcommand\specinnershape{\upshape}%
17. \makeatother
18. \DeclareTextFontCommand{\species}{\spec}
19. \usepackage{xcolor}
20. \begin{document}
21. Quote: \textit{test of \species{Lalala}}
22. \cite{lion2010}
23. \printbibliography
24.
25. {\renewcommand\specinnershape{\color{black!50!red}\selectfont}\itshape test \species{wombat}}
26. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Loupiote3
Posts: 4
Joined: Tue Jul 31, 2018 2:47 pm
Hi Johannes,

Sorry for this ridiculously late reply, thank you so very much for your help, that's fantastic !