I use libertine and newtxmath font packages, they provide upright greek letters. However, there is no way to conveniently swith between italic and upright greek letters. I need a command, simillar to what is discussed here, to change normal greek letters to upright bold symbols.
None of the commands \mathrm, \mathbf, \boldsymbol or \bm makes\theta to appear as \uptheta. Moreover, isomath package does not work with the encoding and its typeface is not desired. I don't want to globally switch to upright greek letters or change the font shape.
\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[type1]{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{bm}
\begin{document}
What I get: $\theta \bm{\theta} \mathrm{\theta} \bm{\mathrm{\theta}}$
What I want: $\theta \bm{\theta} \uptheta \bm{\uptheta}$
\end{document}
--- Partial Solution ---
I found that a new upgreek command may be defined to replace all greek letter macros (e.g. \theta) with their upside variants (e.g. \uptheta) in its argument. Following example does it for three greek letters. The scope of the command is local, so both variants can be used in a single equation.
\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[type1]{libertine}
\usepackage[libertine]{newtxmath}
\usepackage{bm}
\newcommand{\upgreek}[1]{{
\renewcommand{\beta}{\upbeta}
\renewcommand{\theta}{\uptheta}
\renewcommand{\zeta}{\upzeta}
#1
}}
\begin{document}
$\upgreek{\theta} \bm{\upgreek{\theta}} \theta \bm{\theta}$
\end{document}
Questions:
- Is it safe to patch
\mathrmto run\upgreekon its argument?



isomathis not working withlibertine, and globally forcing greek letters to upright form is not wanted. I need\mathrmor any other command to modify\thetato appear as\uptheta. – Aydin Apr 18 '13 at 12:27\mathup, not\mathrm. I can't compile the MWE for come reason so I can't offer much help. How about loadingamsmathand try\operatorname{\theta}? – Mobius Pizza Apr 18 '13 at 13:47\mathup?\operatornamecalls\mathrm. Did you try them yourself ?! – Aydin Apr 18 '13 at 14:05