Fonts & Character Sets ⇒ Malayalam numbers
Malayalam numbers
Typesetting in Malayalam (a language of South India) is not a problem, as I am using the malayalam package. However, I cannot find a possibility to typeset the numbers in Malayalam. Does anybody have a solution.
Best regards
Suren
Best regards
Suren
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Malayalam numbers
Could someone help? Anybody has an idea?
Thank you.
Suren
Thank you.
Suren
Malayalam numbers
Hi Suren,
Maybe you could post a
minimal working example that shows the issue. Without compilable code at hand many people (including me, I admit) often are too lazy to prepare a sample document themselves that shows what the problem is and in consequence they don't bother answering.
Regards
Maybe you could post a

Regards
site moderator & package author
Malayalam numbers
Sorry for the late reply. Finally here with concrete details. However, I am not sure if XeLaTeX is discussed here. I shall move on to that group on TUG as well.
I have, finally, managed to get Malayalam working on my Mac(Mountain Lion 10.5.8) using XeLaTeX. The issue in question is character rendering. Here are the details before I proceed.
System: Mac Mountain Lion 10.5.8
Editor: TeXShop 2.47
Engine : xelatex
Fonts used:
The workaround is cumbersome.
The same applies to punctuation marks. if the punctuation marks are inserted using the above command, the rendering is fine.
The final problem. dashes are inserted when a word is broken at the end of the line and these dashes appear as boxes!!!
Final point: is there a possibility to generate the Malayalam numerals?
(http://en.wikipedia.org/wiki/Indian_numerals scroll down and you will see the table with the numbers)
Best regards
Suren
I have, finally, managed to get Malayalam working on my Mac(Mountain Lion 10.5.8) using XeLaTeX. The issue in question is character rendering. Here are the details before I proceed.
System: Mac Mountain Lion 10.5.8
Editor: TeXShop 2.47
Engine : xelatex
Fonts used:
- Rachana (my favourite) uses old script
- Meera
- AnjaliOldLipi
- Rachana: the numerals (arabic) are NOT rendered. Only boxes appear. This includes page numbers. The punctuation marks, too, are not rendered. Only boxes appear.
- Meera and AnjaliOldLipi: numbers are rendered but ligatures are terrible.
Code: Select all
\listfiles
\documentclass[a4paper,12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX} %[Mapping=tex-text]
\usepackage{polyglossia}
\setdefaultlanguage{malayalam}
\setotherlanguage{english}
\newfontfamily\malayalamfont[Script=Malayalam]{Rachana}
\newfontfamily\englishfont{Times}
\begin{document}
\lefthyphenmin=2
\righthyphenmin=2
%\thispagestyle{empty}
\setmainfont[Script=Malayalam]{Rachana}
%
\setlength{\baselineskip}{1.25\baselineskip}\addtolength{\parskip}{10pt}
%\textenglish{1,2,3.}
മലയാളം ൽ ൾ ർ 3 .
\end{document}
\textbf{പ്രാരംഭഃ}
\begin{verse}
\noindent
\hfill{\textenglish{0}}
\end{verse}
\end{document}
Code: Select all
\textenglish{3}
The final problem. dashes are inserted when a word is broken at the end of the line and these dashes appear as boxes!!!
Final point: is there a possibility to generate the Malayalam numerals?
(http://en.wikipedia.org/wiki/Indian_numerals scroll down and you will see the table with the numbers)
Best regards
Suren
Last edited by localghost on Wed Nov 13, 2013 10:06 pm, edited 1 time in total.
Malayalam numbers
I shall be grateful for any help in generating Malayalam numbers in my LaTeX Documents.
The documentation is not a problem, as I can generate documents in Malayalam. However, the numbers are still not in that language
Thank you in advance
Suren
The documentation is not a problem, as I can generate documents in Malayalam. However, the numbers are still not in that language
Thank you in advance
Suren
Malayalam numbers
you could try something like
Now, you can use
Since I can't read Malayalam, you best check if I assembled those numbers correctly
KR
Rainer
Code: Select all
\listfiles
\documentclass[a4paper,12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX} %[Mapping=tex-text]
\usepackage{polyglossia}
\setdefaultlanguage{malayalam}
\setotherlanguage{english}
\newfontfamily\malayalamfont[Script=Malayalam]{Akshar Unicode}
\setmainfont[Script=Malayalam]{Akshar Unicode}
%\newfontfamily\englishfont{Times}
\newcounter{malayalamtemp}
\newcounter{malayalamtempb}
\newcounter{foo}
\setcounter{foo}{358}
\newcommand*\malayalamdigit[1]{%
\ifcase#1
൦\or
൧\or
൨\or
൩\or
൪\or
൫\or
൬\or
൭\or
൮\or
൯\else
?\fi
}
\makeatletter
\newcommand*\malayalamnum[1]{%
% This is rather limited so far for numbers 0--999. For higher numbers, it would
% need to be expanded accordingly.
% Also, I'm unsure how ൰ (10),൱ (100), and ൲ (1000) would fit in
% and if they're even the right symbols...
% Frankly, they're not rendered by my version of Akshar Unicode anyway,
% so I ignored them here.
\ifnum\value{#1}<0 -%retain sign, though if this is the right symbol in Malayalam, I don't know
\setcounter{malayalamtemp}{-\value{#1}}%
\else
\setcounter{malayalamtemp}{\value{#1}}%
\fi
\c@malayalamtempb\c@malayalamtemp% tempb = temp = |(#1)|
\ifnum\c@malayalamtemp>99
\divide\c@malayalamtemp by 100
%CAVEAT: if the counter's (#1) value exceeds 999, malayalamtemp's value
% exceeds 9 here and would be rendered as `?' by the following command:
\malayalamdigit{\c@malayalamtemp}%
\multiply\c@malayalamtemp by 100
\advance\c@malayalamtempb by -\c@malayalamtemp
\c@malayalamtemp\c@malayalamtempb
\fi
\ifnum\c@malayalamtemp>9
\divide\c@malayalamtemp by 10 % temp = temp / 10 (integer division)
\malayalamdigit{\c@malayalamtemp}%
\multiply\c@malayalamtemp by 10
\advance\c@malayalamtempb by -\c@malayalamtemp
\malayalamdigit{\c@malayalamtempb}%
\else
\malayalamdigit{\c@malayalamtemp}%
\fi
}%\malayalamnum{counter}
\makeatother
\renewcommand*\thepage{\malayalamnum{page}}
\begin{document}
\lefthyphenmin=2
\righthyphenmin=2
%\thispagestyle{empty}
%
\setlength{\baselineskip}{1.25\baselineskip}\addtolength{\parskip}{10pt}
%\textenglish{1,2,3.}
മലയാളം ൽ ൾ ർ ൩ .
൦ ൧ ൨ ൩ ൪ ൫ ൬ ൭ ൮ ൯
\malayalamnum{foo}
\end{document}
\malayalamnum
similar to \roman
or \arabic
to redefine whatever \the<counter>
you want, as demonstrated here with \thepage
.Since I can't read Malayalam, you best check if I assembled those numbers correctly

KR
Rainer
Malayalam numbers
Dear Rainer,
a million thanks. I shall try that. I only need a limited set. The remaining I can try later.
Regards
Suren
a million thanks. I shall try that. I only need a limited set. The remaining I can try later.
Regards
Suren
Malayalam numbers
Dear Rainer,
I am sorry for not getting back.I thought I had replied. it worked. Lost my last login details. Hence, registered new.
Now am back on Linux (Ubuntu 18.04). Not using polyglossia, but the package written by Alex.
Sample code, taken from Alex's package
File is saved with the mm extension (sample.mm) and then processed using the preprocessor mal
mal sample.mm rachana
then
latex sample.tex
What modifications to the code above should I do to make it work in this case. The text compiles well. The problem is only the numerals
I am sorry for not getting back.I thought I had replied. it worked. Lost my last login details. Hence, registered new.
Now am back on Linux (Ubuntu 18.04). Not using polyglossia, but the package written by Alex.
Sample code, taken from Alex's package
File is saved with the mm extension (sample.mm) and then processed using the preprocessor mal
mal sample.mm rachana
then
latex sample.tex
Code: Select all
\listfiles
\documentclass[a4,12pt]{article}
\usepackage[rachana]{malayalam}
\begin{document}
\noindent
<m>
atiprAcInakAlaMmutalkkutanne shabdan"n"aLuTEyuM
bhAvahAvAdikaLuTEyuM sahAyattOTukUTi AshayaprakaTanaM
naTattAn manuSyaR paThiccukazhin~n~irunnu.
manuSyasharIrattinnuLLilttanneyuLLa h.rdayaM,
1
</m>
\end{document}
What modifications to the code above should I do to make it work in this case. The text compiles well. The problem is only the numerals
Malayalam numbers
Hi Suren,
I dunno...sounds to me like you've thrown away a working shovel and now you're trying to dig a hole using chop sticks
Why don't you stick (no pun intended) with xelatex? That works under Linux too, you know.
KR
Rainer
I dunno...sounds to me like you've thrown away a working shovel and now you're trying to dig a hole using chop sticks

Why don't you stick (no pun intended) with xelatex? That works under Linux too, you know.
KR
Rainer
Malayalam numbers
No Rainer,
My Mac is as good as dead. Too many problems am planning to convert it to a linux machine. But that can wait. I am using a laptop now with Ubuntu on it. I would love using polyglossia and type directly in Malayalam and process the file using Xelatex. However, I haven't got a Malayalam Keyboard. The ones I have seen are terrible. They use the new script, That is a murder of typography. One does offer a phonetic typing but it is not easy to use I would spend over ten minutes typing just a paragraph. Hence, I am using the Malayalam package (by Alex). I type in latin script, save the file as *.mm and run it through the pre-processor (mal) to generate a *.tex file, which I can process using pdflatex to get the final document. But the package does not use polyglossia and the typing is in latin script. The only thing I am missing is the malayalam number form. Hope you understand me.
My Mac is as good as dead. Too many problems am planning to convert it to a linux machine. But that can wait. I am using a laptop now with Ubuntu on it. I would love using polyglossia and type directly in Malayalam and process the file using Xelatex. However, I haven't got a Malayalam Keyboard. The ones I have seen are terrible. They use the new script, That is a murder of typography. One does offer a phonetic typing but it is not easy to use I would spend over ten minutes typing just a paragraph. Hence, I am using the Malayalam package (by Alex). I type in latin script, save the file as *.mm and run it through the pre-processor (mal) to generate a *.tex file, which I can process using pdflatex to get the final document. But the package does not use polyglossia and the typing is in latin script. The only thing I am missing is the malayalam number form. Hope you understand me.