BibTeX, biblatex and biber ⇒ Italics in book titles
Italics in book titles
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!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Italics in book titles
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Italics in book titles
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
. Code: Select all
\begin{filecontents}{\jobname.bib}@book{lion2010,author = {Laura Lion and Gabrielle Giraffe and Carl Capybara},title = {The history of \species{Homo sapiens} and other stuff},publisher = {publishing house},date = {2010},keywords = {trusted},}\end{filecontents}\documentclass{article}\usepackage[backend=biber]{biblatex}\addbibresource{\jobname.bib}\makeatletter\DeclareRobustCommand\spec{\@nomath\spec \ifdim \fontdimen\@ne\font >\z@\specinnershape \else \itshape \fi}\newcommand\specinnershape{\upshape}%\makeatother\DeclareTextFontCommand{\species}{\spec}\usepackage{xcolor}\begin{document}Quote: \textit{test of \species{Lalala}}\cite{lion2010}\printbibliography{\renewcommand\specinnershape{\color{black!50!red}\selectfont}\itshape test \species{wombat}}\end{document}
Italics in book titles
Sorry for this ridiculously late reply, thank you so very much for your help, that's fantastic !