Possible Duplicate:
Whatever happened to \newfontinstance?

I compiled the following code with TexLive 2009 before. However, I get the following error message now.

undefined contorl sequence
<recently red> \newfontinstance

l.14 \newfontinstance {\sifont}[Script=Sinhla]{LKLUG}

I have the sinhala.sty in my ~/library/texmf/tex/latex folder.

The following is the LaTeX code.


% Will Robertson's fontspec.sty can be used to simplify font choices.
% To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,
% and change "Hoefler Text" to any of these choices.

\setromanfont[Mapping=tex-text]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\title{සිංහල අකුරු}
\author{සැලෙන මනස විසිනි}
මේ වාර්තාව පිලියෙල කලේ XeLaTeX භාවිතා කරමිනි. මෙහි අකුරු පැබැඳුම සඳහා TeXShop භාවිතා කල අතර,  අකුරු ලබා ගත්තේ Mac OS X 10.6 හී Character Viewer මගිනි. මේ සිංහල Unicode අකුරු LKLUG මිනිස් සමූහය විසින් නිර්මානය කරන ලද්දකි.

මෙවැනි වාර්තාවක් පිලියෙල කිරීම සඳහා XeLaTeX භාවිතා කිරීමේදී අනුරැද්ධ රත්නවීර විසින් රචිත ``සිංහල මල්ල" (sinhala package) යොදා ගත යුතුය.

වාසනාවකට මෙන් මේ සඳහා Keyboard එකද භාවිතා කල හැකිය.  ඒ සඳහා කොලඹ විශ්ව විද්‍යාලයේ \href{http://www.ucsc.cmb.ac.lk/ltrl/services/feconverter/t1.html}{සිංග්ලිශ්} භවිතා කර ඔබේ වාර්තාවේ අලවන්න.
  • 1
    Possible duplicate: Whatever happened to \newfontinstance?. You need to put \let\newfontinstance=\newfontfamily after loading fontspec. – Werner Aug 27 '11 at 22:44
  • 1
    I fixed the problem. I found the answer from this site. Thanks. I changed the line \newfontinstance{\sifont}[Script=Sinhala]{LKLUG} in the style sheet sinhala.sty to \newfontfamily{\sifont}[Script=Sinhala]{LKLUG} and saved it as sinhala1.sty in my ~/library/texmf/tex/latex folder. You have to do this because there is a sinhala.sty in TexLive2010 somewhere and it is the default. I contacted the author of sinhala.sty but he has not responded yet. Overall, I am very happy with your site. – Sony Aug 28 '11 at 14:29
  • Just wanted to mention to you that TeXlive2011 has been released. (Which would not have solved your problem, but you might want to think about updating nevertheless.) – Stephen Aug 29 '11 at 18:11

Browse other questions tagged or ask your own question.