6

Consider the following MWE:

\documentclass{article}
\usepackage[upright]{fourier}

\begin{document}
    As $\rho\rightarrow1,000$, we all die.

    \textit{As $\mathit{\rho\rightarrow1,000}$, we all die.}
\end{document}

Which generates the following output:

enter image description here

There is a paragraph in my document that, for reasons that go beyond the post, is typeset in italics and has one Greek letter in math mode in it. Therefore, I'd like to get that Greek letter in italics as well, but I wish to keep the upright option of Fourier, since 99% of Greek letters in my document are in non-italics paragraphs. Can someone help me achieve what I need? Notice that \mathit{...} does not work.

Thank you all for your time.

6

Use \otherrho to typeset the non-default shape of the Greek character \rho. Since the option upright makes upright the default shape, the non-default shape picked up by \otherrho is sloped. Likewise for \otheralpha, \otherbeta, \othergamma, etc.

enter image description here

\documentclass{article}
\usepackage[upright]{fourier}

\begin{document}
    As $\rho\to1{,}000$, we all die.

\em As $\otherrho\to\mathit{1{,}000}$, we all die.
\end{document}
  • Thank you for your answer. Why to instead of longrightarrow? Also, which answer is the one that I should accept, given that are both correct and identical? – Héctor Mar 30 '18 at 15:09
  • 1
    @Héctor - \to involves many fewer characters to type than \rightarrow; the macros are otherwise identical. If two or more answers provide (essentially) the same solution -- here, using \otherrho to generate a "sloped" \rho -- it's customary to accept the one that was posted first. – Mico Mar 30 '18 at 15:11
6
\documentclass{article}
\usepackage{amsmath}
\usepackage[upright]{fourier}

\DeclareFontFamily{U}{pseudofourier}{}
\DeclareFontShape{U}{pseudofourier}{m}{n}{
  <-> futmi
}{}
\DeclareFontShape{U}{pseudofourier}{m}{it}{
  <-> futmii
}{}
\DeclareFontShape{U}{pseudofourier}{b}{n}{
  <-> futmib
}{}
\DeclareFontShape{U}{pseudofourier}{b}{it}{
  <-> futmiib
}{}

\DeclareRobustCommand{\trho}{%
  \text{%
    \fontencoding{U}\fontfamily{pseudofourier}\selectfont
    \symbol{"1A}%
  }%
}

\begin{document}

As $\trho\rightarrow1,000$, we all die.

\textit{As $\mathit{\trho\rightarrow1,000}$, we all die.}

\end{document}

But this is wrong: symbols should not change their shape according to the context.

enter image description here

  • I suspected I was violating some typographical convention here, but else it looks so ugly to my (untrained) eye... – Héctor Mar 30 '18 at 15:13
  • 4
    This answer comes with egreg's personal seal of disapproval :P – Au101 Mar 30 '18 at 15:14
  • 1
    Is there a circumstance when using \trho is superior to using \otherho? – Mico Mar 30 '18 at 15:15
  • @egreg: Yet I'd love a small caps Ρ in an scshape context… ;o) – Bernard Mar 30 '18 at 15:19
5

Use \otherrho to have a slanted Greek letter in an upright setting, and vice-versa. Also I added a pair of braces around the decimal comma to have a correct spacing.

\documentclass{article}
\usepackage[upright]{fourier}

\begin{document}
    As $\rho\rightarrow1{,}000$, we all die.

    \textit{As $\mathit{\otherrho\rightarrow1{,}000}$, we all die.}

\end{document} 

enter image description here

  • 1
    Thank you for your answer. Should I accept the one it was posted sooner? – Héctor Mar 30 '18 at 15:10
  • 2
    @Héctor: Yes, of course! My answer is not different, except I insisted explicitly on the spacing of the decimal comma, which is unrelated to your question – Bernard Mar 30 '18 at 15:13

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.