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

  • 2
    Welcome to TeX.SX! Have you tried \text{\rupee}? – TeXnician Apr 21 '17 at 7:30
  • \text is from the amsmath package: \usepackage{amsmath}... \begin{document}.... $...\frac{\text{\rupee}}...$ – gernot Apr 21 '17 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 '17 at 8:06
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}
| improve this answer | |

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.