hi eveyone!
im trying to put a nice looking lande g-factor into an equation. what i need is a roman g that is italicised when in the equation environment. i just can't figure out how to do this!
so far ive tried...
\rm{g}, this gives a roman g but it is not in italics
\emph{\rm{g}}, this gives a roman g but it is not in italics
\rm{\emph{g}}, this gives an italic g, but not the roman font!
any help would be very appreciated.
cheers.
General ⇒ italic roman inside an equation
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
italic roman inside an equation
Hi edallica,
welcome to the board!
Don't use the old macros like \rm, \it, \bf. Instead of \rm use \rmfamily or \textrm{text} or in math mode \mathrx{text}.
If there's no italic shape of the font typeface you like, you could try slanted: \textsl{text} or \slshape. Try this small example:
Stefan
welcome to the board!
Don't use the old macros like \rm, \it, \bf. Instead of \rm use \rmfamily or \textrm{text} or in math mode \mathrx{text}.
If there's no italic shape of the font typeface you like, you could try slanted: \textsl{text} or \slshape. Try this small example:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ \text{g} , \text{\textit{g}} , \textsl{\textrm{g}} \]
\end{document}
LaTeX.org admin
Re: italic roman inside an equation
Thanks Stefan,
\textsl{\textrm{g}} worked a treat.
\textsl{\textrm{g}} worked a treat.