Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to set up a TeX System at work, where I have no admin rights. So I went for MiKTeX portable. It is "installed" on my Desktop. I want to use fontspec with XeLaTeX to be able to choose the fonts I want.

I can compile a normal document, but when I try to use fontspec, XeLaTeX throws an error:

! Undefined control sequence.
<argument> \c_keys_code_root_tl 
                            fontspec/Ligatures/Historical
l.8 ...tureoption{Ligatures}{Historic}{Historical}

which can be ignored by pressing enter. But then there is the critical error:

(c:\Users\**********\Desktop\Miktex\tex\latex\metalogo\metalogo.sty))Running miktex-makemf.exe...
miktex-makemf: The Charis SIL source file could not be found.

Running hbf2gf.exe...


hbf2gf (CJK ver. 4.8.0)



Couldn't find `Charis S.cfg'

miktex-maketfm: No creation rule for font "Charis SIL".


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
! 
! The font "Charis SIL" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.10 \setmainfont{Charis SIL}
                          % set the main body font (\textrm), assumes Ch...

I've tried several fonts, none of them worked. Googling for the error message did not help either. Does anyone have a suggestion?

Nearly forgot to post the document:

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8

\documentclass[11pt]{scrartcl} 
\usepackage{fontspec} 
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{xltxtra}

\setmainfont{Charis SIL} % set the main body font (\textrm), assumes Charis SIL is installed


\begin{document}
Hello World

\end{document}
share|improve this question
    
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. Also, please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  hpesoj626 Mar 28 '13 at 10:11
    
What fonts did you try? If you really don't have admin rights, it should be impossible for you to install new fonts (as that requires admin rights I believe). Your example runs fine if I use a font that is preinstalled (tried with Times New Roman). –  Mythio Mar 28 '13 at 10:39
4  
Your fontspec version is outdated. \c_keys_code_root_tl has been removed from the l3-code and also from the fontspec code. The rest of your code should work if xetex can find the font. But perhaps you will have to update the font cache first with the command fc-cache. –  Ulrike Fischer Mar 28 '13 at 11:16
    
The documentation of fontspec tells you how to use fonts that aren't installed as system fonts. Check section 4 of the documentation, particularly subsection 4.2. –  egreg Mar 28 '13 at 11:38
    
@mythio: I tried Charis SIL, Times New Roman, Arial. –  pete Mar 28 '13 at 11:43
show 1 more comment

1 Answer 1

Your fontspec version is outdated. \c_keys_code_root_tl has been removed from the l3-code and also from the fontspec code. The rest of your code should work if xetex can find the font. But perhaps you will have to update the font cache first with the command fc-cache.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.