Math & ScienceItalic Math Expressions in Reference Title

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
LionAM
Posts: 4
Joined: Fri Oct 22, 2010 9:37 am

Italic Math Expressions in Reference Title

Post by LionAM »

Hello,

is there a way to print a formula completely in italics?
With the bibliography style I use, titles of references are printed in italics - however, when there is some inline math $...$ inside the title, numbers and symbols (<, >, \geq, ...) are put upright. Is there any way to change this behavior locally, similar to the \boldmath command (however for italics)?

Alex

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Italic Math Expressions in Reference Title

Post by kaiserkarl13 »

This is not a function of your bibliography style. Observe:

Code: Select all

\documentclass{article}
\begin{document}
\emph{This is 1 in italics.}
\emph{This is $1$ in italics and math mode.}
This is $1$ in normal text and math mode.
This is 1 in normal text.
\end{document}
There is a difference between math mode and italics---that's why TeX has a separate math mode! There is also a difference between > in text mode and the math symbol >; the latter is a mathematical symbol, the former is a grammatical symbol called a guillemet. For example, in Spanish and some other languages you would quote something as <<hola>> instead of "hola" as you would in English.

A mathematical expression in a title is strange anyway, but mathematical expressions are intentionally set in upright type to distinguish them from guillemets.
LionAM
Posts: 4
Joined: Fri Oct 22, 2010 9:37 am

Re: Italic Math Expressions in Reference Title

Post by LionAM »

Thank you for your answer.
However, the titles contain chemical formulas such as Mg$_x$Zn$_{1-x}$O and intervals such as $0 ≤ x ≤ 0.22$. It looks a bit strange if the numbers and symbols are upright... Is there an efficient way to get them in italics, without rewriting all math environments?

The question is: how is \boldmath defined - couldn't one define a similar command for italics?

Alex
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Italic Math Expressions in Reference Title

Post by localghost »

As far as I know relation symbols (or similar operators) are always typeset upright regardless of the formatting for the surrounding text. To get what you want for your chemical formulae just use the mhchem package. For the intervals I'm afraid that you have to choose a workaround.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[version=3]{mhchem}

\begin{document}
  $0\leq x\leq0.22$ \emph{$\text{0}\leq x\leq\text{0.22}$}

  \ce{Mg_xZn_{1-x}O} \emph{\ce{Mg_xZn_{1-x}O}}
\end{document}
In your bibliography entries you don't have to use the \emph command. It has only been used here to show that formatting attributes are inherited by the text.


Thorsten
Post Reply