2

I am using mathastext and bm packages.

I want a bold upright phi. \bm{\phi} gives me italicized one and if I change it to a capital \Phi, it works.

... \usepackage[upgreek]{mathastext} ...

What additional options do I need? Please give an example.
Hint: The solution exist on pg. 19-20 of mathastext documentation. I couldn't understand it.

  • 1
    According to page 40 of the documentation, the upgreek option only does something if you also use the LGRgreek option. But this changes the shape of the phi which might not be what you want. – David Purton Sep 7 '17 at 3:02
  • 1
    Is using the upgreek package an option for you? If so, you could simply type \bm{\upphi}. – Mico Sep 7 '17 at 4:26
  • 1
    @Mico options eulergreek and symbolgreek of mathastext use same glyphs as upgreek package, but with \phi, not \upphi. So if one needs both \phi and \upphi it is better to use upgreek package. If not one can just pass one of eulergreek or symbolgreek option to mathastext. Then \MTEulerScale and \MTSymbolScale commands allow to scale the fonts (where upgreek only provides one alternative scale for Symbol font). – user4686 Sep 7 '17 at 9:28
3

As pointed out by @DavidPurton in a comment, the documentation of mathastext indicates (but in a not so clear way) that upgreek option has effect only if one of the Greek related options described in §1.9 Greek letters is active.

For example:

\documentclass{article}
\usepackage[upgreek, LGRgreek]{mathastext}
\usepackage{bm}

\begin{document}
\[\phi, \Phi\]
\[\bm{\phi}, \bm{\Phi}\]
\end{document}

Output: enter image description here

However, perhaps your font set-up has some specifics.

Other approaches

E.g. you could use \usepackage[upright]{fourier}...load text packages...\usepackage{mathastext} to benefit from the Fourier set-up for Greek letters. Then \bm{\phi} gives a bold upright Greek letter. mathastext does not interfere at all in this.

\documentclass{article}
\usepackage[upright]{fourier}
% add here text packages according to what is needed
\usepackage{mathastext}% does not modify anything to Greek in math
\usepackage{bm}

\begin{document}
\[\phi, \Phi\]
\[\bm{\phi}, \bm{\Phi}\]
\end{document}

Produces: enter image description here

Or use eulergreek option:

\documentclass{article}
\usepackage[eulergreek]{mathastext}
\usepackage{bm}

\begin{document}
\[\phi, \Phi\]
\[\bm{\phi}, \bm{\Phi}\]
\end{document}

Produces: enter image description here

  • independently of mathastext, there is also for example \usepackage[upgreek]{txgreeks}. It does work with \usepackage{bm} and \bm{\phi}. – user4686 Sep 7 '17 at 9:24
1

As an alternative...

Based on my answer at Upright Greek font fitting to Computer Modern, this works for bold upright by \unslanting the \bm\phi.

This works only in pdflatex.

\documentclass{article}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\mbox{%
        \sbox{\foobox}{#2}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
}}
\newcommand\unslant[2][-.25]{\slantbox[#1]{$#2$}}
\usepackage{bm}
\begin{document}
$\phi \bm\phi \unslant{\bm\phi}$
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.