Previously I complied my file using Xelatex in window 7 using Miktex and it works fine. Now I install TexLive 2009 in Ubuntu 12.04 and compile the same file again, but the following error occurs after compilation (xelatex myfile.tex
):
kpathsea: Running mktexmf SimSun
! I can't find file `SimSun'.
<*> ...:=ljfour; mag:=1; nonstopmode; input SimSun
Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input SimSun
Transcript written on mfput.log.
grep: SimSun.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input SimSun' failed to make SimSun.tfm.
kpathsea: Appending font creation commands to missfont.log.
! Font \zf@basefont=SimSun at 10.0pt not loadable: Metric (TFM) file or install
ed font not found.
<to be read again>
\let
l.30 \setCJKmainfont{SimSun}
Set Chinese font, complusory
?
Is there any way I can use the font available for MikTex in Window 7 from Ubuntu? or any other way to deal with it?
MWE:
\documentclass[a4paper]{article}
\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\xeCJKsetup{PunctStyle=kaiming,CJKspace=true,CheckSingle=true}
\begin{document}
宋體中文字
\end{document}
$HOME/.fonts
directory.XeLaTeX
will find any fonts in there.fc-cache -fsv
? Note that in the future if you want everything taken care of automatically and are installing from scratch, you can runsudo ./install-tl-ubuntu --usr-fonts-dir <DIR>
where <DIR> contains the files simhei.ttf and simsun.ttc. For more information, see github.com/scottkosty/install-tl-ubuntudocuemnt
->document
, and your example has been typeset successfully with XeLaTeX (Windows XP, TeXLive 2013).SimSun.ttf
with the windows explorer (is this how it is called?). Or, alternatively, download the file from the internet as Malipivo says. The$HOME/.fonts
part refers to the Ubuntu installation. In Ubuntu, open the folder explorer, go to your home folder, and on theView
menu check theShow hidden files
option. Then you can acces the.fonts
directory and copySimSun.ttf
here.