Rupee symbol in LaTeX
Last modified: Wed 27 Apr 2011 11:19:28 AM IST
Author: Uday Bondhugula
<uday@csa.iisc.ernet.in>
This
work is licensed under a Creative
Commons NonCommercial Sampling Plus 1.0 License.
This document is on getting the new Rupee symbol working with LaTeX on most modern Linux distributions. In particular, it describes installation of the tfrupee font package. The tfrupee font package offers the new Indian Rupee symbol. Installing Latex fonts is neither straightforward nor easy to remember nor easy to find/search for on the web. The following have worked successfully on Fedore Core 14, and should work on most other distributions without any change or with minor changes depending on TeX installation.
- On a modern Fedora distribution, one just needs to do
sudo yum -y install texlive-tfrupee
A similar command will work on Ubuntu too. - Test to see if it's working. Create a tex file that uses
the font as shown below:
\documentclass[12pt]{article} \usepackage{tfrupee} \begin{document} \rupee~7,000 \end{document}
Run pdflatex on it. You shouldn't see any messages from tex about inability to create bitmap fonts for tfrupee. Similarly, you should be able to run latex followed by dvips on it.$ pdflatex test.tex This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %&-line parsing enabled. entering extended mode Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, turkish, ukenglish, ukrainian, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/tfrupee/tfrupee.sty) (./test.aux) [1{/var/lib/texmf /fonts/map/pdftex/updmap/pdftex.map}] (./test.aux) )</usr/share/texmf/fonts/typ e1/bluesky/cm/cmr12.pfb><usr/share/texmf/fonts/type1/tfrupee/tfrupee.pfb> Output written on test.pdf (1 page, 94442 bytes). Transcript written on test.log.
$ latex test.tex; dvips test.dvi -o This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %&-line parsing enabled. entering extended mode (./test.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, turkish, ukenglish, ukrainian, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/tfrupee/tfrupee.sty) (./test.aux) [1] (./test.aux) ) Output written on test.dvi (1 page, 272 bytes). Transcript written on test.log. This is dvips(k) 5.96.1 Copyright 2007 Radical Eye Software (www.radicaleye.com) ' TeX output 2011.04.27:1108' -< test.ps <usr/share/texmf/dvips/base/tex.pro><usr/share/texmf/dvips/base/texps.pro> . <usr/share/texmf/fonts/type1/bluesky/cm/cmr12.pfb> </usr/share/texmf/fonts/type1/tfrupee/tfrupee.pfb>[1]
-
While using a ~ provides unbreakable space in between the rupee symbol and an amount, the amount of space is more than desirable. For example, see the amount of space one gets when using \EUR{euro amount} -- it's the right amount. Hence, when using the rupee symbol for particular amounts, add this additional LaTeX script to the tfrupee style file, and use \RUPEE{rupee amount} when using it for rupee currency amounts.
\def\RUPEE#1{\rupee\,#1}
Or you can use my rupeesym.sty with "\usepackage{rupeesym}".
Here's a screenshot of the generated PDF.
