2

I can't seem to use the rupee symbol using package tfrupee if I am in math mode. The output produces a vertical line instead of the symbol. Any suggestions on how to fix this?

\documentclass[11pt,letterpaper]{article}
\usepackage{tfrupee}
\begin{document}

\begin{enumerate}
    \item Current Fuel Consumption ($\frac{Volume}{Time}$)  \& Cost of Fuel ($\frac{\rupee}{Volume}$)
\end{enumerate}

\end{document}

Output from above

3
  • 2
    Welcome to TeX.SX! Have you tried \text{\rupee}?
    – TeXnician
    Apr 21, 2017 at 7:30
  • \text is from the amsmath package: \usepackage{amsmath}... \begin{document}.... $...\frac{\text{\rupee}}...$
    – gernot
    Apr 21, 2017 at 7:39
  • 4
    Please also the other words as text: $\frac{\text{Volume}}{\text{Time}}$ and $\frac{\text{\rupee}}{\text{Volume}}$
    – cgnieder
    Apr 21, 2017 at 8:06

1 Answer 1

3

This solution checks, whether in math mode or not and selects the matching command automatically.

rupee

\documentclass[11pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{tfrupee}

\let\orupee\rupee
\def\rupee{\ifmmode\text{\orupee}\else\orupee\fi}

\begin{document}

\begin{enumerate}
    \item a \rupee
    \item Current Fuel Consumption ($\frac{Volume}{Time}$)  \& Cost of Fuel ($\frac{\rupee}{Volume}$)
\end{enumerate}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .