Discussion:
[Tugindia] Rupee symbol for LaTeX on Mac OS X
Kannan Moudgalya
2011-01-03 16:01:52 UTC
Permalink
Can anyone tell me how to get the Rupee symbol on Mac OS X? I am using
MacTeX-2009. Thanks.

Kannan
Inderpreet Arora
2011-01-03 18:33:23 UTC
Permalink
Sir, please see the following link:
http://tug.ctan.org/tex-archive/fonts/tfrupee/

After downloading tfrupee.zip, I installed it with the help of this link:
http://www.tug.org/fonts/fontinstall.html

I could make it work for MiKTeX on Windows. With the directions given for
TeXLive and MacTeX, it is likely to work on Mac OS as well.

Sincerely,
Inderpreet
Post by Kannan Moudgalya
Can anyone tell me how to get the Rupee symbol on Mac OS X? I am using
MacTeX-2009. Thanks.
Kannan
_______________________________________________
Home: http://www.tug.org.in/
TeX FAQ: http://www.tex.ac.uk/faq
unsubscribe: http://tug.org/mailman/listinfo/tugindia
Kannan Moudgalya
2011-01-03 19:22:06 UTC
Permalink
Post by Inderpreet Arora
http://tug.ctan.org/tex-archive/fonts/tfrupee/
http://www.tug.org/fonts/fontinstall.html
I could make it work for MiKTeX on Windows. With the directions given for
TeXLive and MacTeX, it is likely to work on Mac OS as well.
I saw this link yesterday. Unfortunately, I do not know how to use
these instructions on Mac OS X.

Kannan
Shrisha Rao
2011-01-03 23:55:11 UTC
Permalink
Post by Inderpreet Arora
http://tug.ctan.org/tex-archive/fonts/tfrupee/
http://www.tug.org/fonts/fontinstall.html
I could make it work for MiKTeX on Windows. With the directions given for
TeXLive and MacTeX, it is likely to work on Mac OS as well.
I saw this link yesterday. Unfortunately, I do not know how to use these instructions on Mac OS X.
I am using the symbol on Mac OS X with XeLaTeX (not plain LaTeX), using fontspec and the following lines in the preamble (with the font itself placed in /Library/Fonts):

\newfontface\Rupee{Indian Rupee} % Raju Das's Indian Rupee font
\newcommand{\Rs}{{\Rupee \symbol{"20A8}}}

Then in the main body (after \begin{document}), one can simply write ``This contract is worth \Rs 20,000,'' etc.

It is possible to use another font rather than "Indian Rupee.ttf" -- just change the name in the \newfontface appropriately.

Regards,

Shrisha Rao
Kannan
Kannan Moudgalya
2011-01-04 02:45:54 UTC
Permalink
Post by Shrisha Rao
\newfontface\Rupee{Indian Rupee} % Raju Das's Indian Rupee font
\newcommand{\Rs}{{\Rupee \symbol{"20A8}}}
Then in the main body (after \begin{document}), one can simply write ``This contract is worth \Rs 20,000,'' etc.
Unfortunately, it does not work on LaTeX. Thanks.

Kannan
Sridhar M.A.
2011-01-04 02:48:59 UTC
Permalink
Unfortunately, it does not work on LaTeX. ?Thanks.
What I did to get the INR symbol was the following :

Converted the ttf font to mf.
Removed all the characters except ` which maps to the symbol in the font.
Used that mf file in my local tree.
Define a newcommand for the symbol as
\newcommand{\inr}{{\font\x=inrr8\x `}\relax}

Might not be the best way or elegant, but it works :-) I am including
the mf file which I think can be used on any system that has LaTeX.

Regards,

The mf file is given below, if you want to try it :
==============
mode_setup;

u#:=1pt#;
define_pixels(u);
currenttransform:=currenttransform scaled u;

primarydef v picxor w =
begingroup
picture q; q=v+w; cull q keeping (1,1); q
endgroup
enddef;


picture pom;
def neg expr p = pom:=nullpicture;
% if turningnumber p=0:
turningcheck:=0;
addto pom contour p.t_;
cull pom keeping (1,100);
currentpicture:=currentpicture picxor pom;
pom:=nullpicture;
addto pom contour reverse p.t_;
cull pom keeping (1,100);
turningcheck:=2;
% else: addto pom contour p.t_; fi
currentpicture:=currentpicture picxor pom; enddef;
def c(expr a,b,c,d) = .. controls (a,b) and (c,d) .. enddef;

beginchar(96,5.0000u#,7.4316u#,-0.1416u#);
neg (0.3760,7.4316)c(0.3760,7.4316,5.0732,7.4316)
(5.0732,7.4316)c(5.0732,7.4316,5.0732,7.4219)
(5.0732,7.4219)c(4.6582,6.7822,4.6045,6.7383)
(4.6045,6.7383)c(4.6045,6.7383,3.3496,6.7383)
(3.3496,6.7383)c(3.6084,6.4355,3.7012,6.0010)
(3.7012,6.0010)c(3.7012,6.0010,5.0391,6.0010)
(5.0391,6.0010)c(5.0635,5.9961,5.0635,5.9814)
(5.0635,5.9814)c(4.6143,5.3076,4.6045,5.3076)
(4.6045,5.3076)c(4.6045,5.3076,3.7354,5.3076)
(3.7354,5.3076)c(3.7061,4.9609,3.4033,4.4727)
(3.4033,4.4727)c(3.0029,3.9795,2.6367,3.8330)
(2.6367,3.8330)c(1.9531,3.5059,1.3281,3.5059)
(1.3281,3.5059)c(1.3281,3.5059,1.3281,3.4961)
(1.3281,3.4961)c(1.3281,3.4473,1.6357,3.0908)
(1.6357,3.0908)c(1.6357,3.0908,3.9551,0.2930)
(3.9551,0.2930)c(3.9551,0.2930,3.9551,0.1611)
(3.9551,0.1611)c(3.9551,0.1416,3.9307,0.1416)
(3.9307,0.1416)c(3.9307,0.1416,2.9102,0.1416)
(2.9102,0.1416)c(0.1563,3.3496,0.1563,3.3643)
(0.1563,3.3643)c(0.1563,3.3643,0.1563,4.0137)
(0.1563,4.0137)c(0.1563,4.0137,0.1660,4.0381)
(0.1660,4.0381)c(0.4102,4.0039,0.7373,4.0039)
(0.7373,4.0039)c(2.2803,4.0039,2.6562,5.0049)
(2.6562,5.0049)c(2.7148,5.1514,2.7148,5.3076)
(2.7148,5.3076)c(2.7148,5.3076,-0.0781,5.3076)
(-0.0781,5.3076)c(-0.0977,5.3076,-0.0977,5.3271)
(-0.0977,5.3271)c(0.3662,6.0010,0.3760,6.0010)
(0.3760,6.0010)c(0.3760,6.0010,2.5928,6.0010)
(2.5928,6.0010)c(2.5928,6.0010,2.5928,6.0107)
(2.5928,6.0107)c(2.4023,6.3965,1.8555,6.6113)
(1.8555,6.6113)c(1.4648,6.7383,1.1523,6.7383)
(1.1523,6.7383)c(1.1523,6.7383,-0.0879,6.7383)
(-0.0879,6.7383)c(-0.0879,6.7383,-0.0879,6.7627)
(-0.0879,6.7627)c(0.3613,7.4316,0.3760,7.4316)
(0.3760,7.4316)..cycle;
endchar;

font_size 10.0000u#;
font_normal_space 5.0000u#;
font_normal_stretch 2.9940u#;
font_normal_shrink 2.0000u#;
font_quad 5.0000u#;
font_extra_space 2.0000u#;
end;
=================


Regards,
--
Sridhar M.A.
Kannan Moudgalya
2011-01-04 03:12:39 UTC
Permalink
Post by Sridhar M.A.
Converted the ttf font to mf.
Removed all the characters except ` which maps to the symbol in the font.
Used that mf file in my local tree.
Define a newcommand for the symbol as
\newcommand{\inr}{{\font\x=inrr8\x `}\relax}
This worked fine, on naming the file as inrr8.mf. Thanks.

What is the recommended place to keep such mf files in a MacTeX
installation?

Kannan
Shrisha Rao
2011-01-04 03:33:59 UTC
Permalink
Post by Kannan Moudgalya
Post by Shrisha Rao
\newfontface\Rupee{Indian Rupee} % Raju Das's Indian Rupee font
\newcommand{\Rs}{{\Rupee \symbol{"20A8}}}
Then in the main body (after \begin{document}), one can simply write ``This contract is worth \Rs 20,000,'' etc.
Unfortunately, it does not work on LaTeX.
Of course; it requires XeLaTeX as I said; fontspec itself does not work with LaTeX.

Regards,

Shrisha Rao
Post by Kannan Moudgalya
Thanks.
Kannan
S. venkataraman
2011-01-04 05:03:54 UTC
Permalink
Post by Shrisha Rao
Post by Kannan Moudgalya
Post by Shrisha Rao
I am using the symbol on Mac OS X with XeLaTeX (not plain LaTeX), using
fontspec and the following lines in the preamble (with the font itself
Post by Kannan Moudgalya
Post by Shrisha Rao
\newfontface\Rupee{Indian Rupee} % Raju Das's Indian Rupee font
\newcommand{\Rs}{{\Rupee \symbol{"20A8}}}
Then in the main body (after \begin{document}), one can simply write
``This contract is worth \Rs 20,000,'' etc.
Post by Kannan Moudgalya
Unfortunately, it does not work on LaTeX.
Of course; it requires XeLaTeX as I said; fontspec itself does not work with LaTeX.
Regards,
Shrisha Rao
Post by Kannan Moudgalya
Thanks.
Kannan
_______________________________________________
Home: http://www.tug.org.in/
TeX FAQ: http://www.tex.ac.uk/faq
unsubscribe: http://tug.org/mailman/listinfo/tugin<http://tug.org/mailman/listinfo/tugindia>
I am using ubuntu 10.04 and texlive 2009.
Here is what I did to use the rupee font in pdflatex.
It should work with texlive on other platforms too.

1. Download the archive and unzipped it.
2. Copied the entire contents of the directory tfrupee to my
local directory under /opt/local/texlive.
sudo cp -r * /opt/texlive/texmf-local/.
3. Ran texhash as super user.
sudo texhash
4. Enabled the map file for all users.
sudo updmap-sys --enable Map=tfrupee.map
5. Created a small test file:
******************************
\documentclass[12pt]{article}
\usepackage{tfrupee}
\begin{document}
\rupee\ 20,000
\end{document}
***************************
6. Ran pdflatex. Worked fine.

Best,
S. Venkataraman

Loading...