You can pass the options [greek,english]
to the babel
package. Then you can switch between them using \greektext
and \latintext
.
\documentclass{minimal}
\usepackage[greek,english]{babel}
\begin{document}
\greektext
A whole paragraph in greek letters
\latintext
% If we only want a single letter, it might make sense to define commands:
\newcommand{\ga}{\greektext a\latintext}
\newcommand{\gA}{\greektext A\latintext}
\gA lph\ga
\end{document}
You might want to file a feature request to the developer of newtxmath
; in the meantime you can change the definitions of the Greek lowercase letters.
\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[type1]{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{bm}
\makeatletter
\re@DeclareMathSymbol{\alpha}{\mathord}{lettersA}{11}
\re@DeclareMathSymbol{\beta}{\mathord}{lettersA}{12}
\re@DeclareMathSymbol{\gamma}{\mathord}{lettersA}{13}
\re@DeclareMathSymbol{\delta}{\mathord}{lettersA}{14}
\re@DeclareMathSymbol{\epsilon}{\mathord}{lettersA}{15}
\re@DeclareMathSymbol{\zeta}{\mathord}{lettersA}{16}
\re@DeclareMathSymbol{\eta}{\mathord}{lettersA}{17}
\re@DeclareMathSymbol{\theta}{\mathord}{lettersA}{18}
\re@DeclareMathSymbol{\iota}{\mathord}{lettersA}{19}
\re@DeclareMathSymbol{\kappa}{\mathord}{lettersA}{20}
\re@DeclareMathSymbol{\lambda}{\mathord}{lettersA}{21}
\re@DeclareMathSymbol{\mu}{\mathord}{lettersA}{22}
\re@DeclareMathSymbol{\nu}{\mathord}{lettersA}{23}
\iftx@altnu
\re@DeclareMathSymbol{\nu}{\mathord}{lettersA}{40}
\fi
\re@DeclareMathSymbol{\xi}{\mathord}{lettersA}{24}
\re@DeclareMathSymbol{\pi}{\mathord}{lettersA}{25}
\re@DeclareMathSymbol{\rho}{\mathord}{lettersA}{26}
\re@DeclareMathSymbol{\sigma}{\mathord}{lettersA}{27}
\re@DeclareMathSymbol{\tau}{\mathord}{lettersA}{28}
\re@DeclareMathSymbol{\upsilon}{\mathord}{lettersA}{29}
\re@DeclareMathSymbol{\phi}{\mathord}{lettersA}{30}
\re@DeclareMathSymbol{\chi}{\mathord}{lettersA}{31}
\re@DeclareMathSymbol{\psi}{\mathord}{lettersA}{32}
\re@DeclareMathSymbol{\omega}{\mathord}{lettersA}{33}
\re@DeclareMathSymbol{\varepsilon}{\mathord}{lettersA}{34}
\re@DeclareMathSymbol{\vartheta}{\mathord}{lettersA}{35}
\re@DeclareMathSymbol{\varpi}{\mathord}{lettersA}{36}
\re@DeclareMathSymbol{\varrho}{\mathord}{lettersA}{37}
\re@DeclareMathSymbol{\varsigma}{\mathord}{lettersA}{38}
\re@DeclareMathSymbol{\varphi}{\mathord}{lettersA}{39}
\makeatother
\begin{document}
What I get: $\theta \bm{\theta}$
What I want: $\uptheta \bm{\uptheta}$
\end{document}
Note that \mathbf{\theta}
won't do any good, only Latin letters are affected by \mathbf
.
You can also define \mathup
and \mathbfup
:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[type1]{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{bm}
\DeclareRobustCommand{\mathup}[1]{\begingroup\changegreek\mathrm{#1}\endgroup}
\DeclareRobustCommand{\mathbfup}[1]{\begingroup\changegreekbf\mathbf{#1}\endgroup}
\makeatletter
\def\changegreek{\@for\next:={%
alpha,beta,gamma,delta,epsilon,zeta,eta,theta,kappa,lambda,mu,nu,xi,pi,rho,sigma,%
tau,upsilon,phi,chi,psi,omega,varepsilon,vartheta,varpi,varrho,varsigma,varphi}%
\do{\expandafter\let\csname\next\expandafter\endcsname\csname\next up\endcsname}}
\def\changegreekbf{\@for\next:={%
alpha,beta,gamma,delta,epsilon,zeta,eta,theta,kappa,lambda,mu,nu,xi,pi,rho,sigma,%
tau,upsilon,phi,chi,psi,omega,varepsilon,vartheta,varpi,varrho,varsigma,varphi}%
\do{\expandafter\def\csname\next\expandafter\endcsname\expandafter{%
\expandafter\bm\expandafter{\csname\next up\endcsname}}}}
\makeatother
\begin{document}
$\mathup{d}\mathup{\theta}d\theta$
$\mathbfup{d}\mathbfup{\theta}\bm{d}\bm{\theta}$
\end{document}
Best Answer
As others have said in their answers there are a number of packages that provide upright Greek letters, e.g.,
upgreek
,textgreek
,kpfonts
,fourier
,newtxmath
, ... which one to choose is in my eyes mainly a design question: which one fits best to the document's main font?Since in chemistry upright Greek letters are used in a number of different places (particle symbols such as in your question, IUPAC names, ...) the
chemgreek
package defines a number of mappings for those different packages to macros\chemalpha
,\chembeta
, etc. (48 in total) and also allows to define own mappings. It does not load any of those packages so the choice is still up to the user. The advantage is thatchemmacros
(or other chemistry packages likemhchem
) can simply use the\chem<letter>
commands internally and the corresponding output will match the choice made by the user.This can be used to define particle macros yourself: