Ubuntu14.04系统下VSCode+Latex遇到问题及相应解决方法

Ubuntu14.04系统下VSCode+Latex遇到问题及相应解决方法

问题1:

LaTeX Error: File `fontspec.sty' not found.

解决方法

sudo apt-get install texlive-latex-extra texlive-latex-recommended texlive-science

问题2

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

解决方法

问题在于Texlive里面找不到Simsun这种字体.
具体解决方法如下:
a.将windows系统下的字体库拷贝出来,位置在:C:/windows/Fonts
b.接下来新建一个目录:

sudo mkdir /usr/share/fonts/winfonts

c.将windows系统下的字体拷贝到winfonts目录下:

sudo cp path/to/windows/Fonts/* /usr/share/fonts/winfonts

d.修改字体权限:

sudo chmod 644 /usr/share/fonts/winfonts/*

e.刷新缓存字体:

sudo mkfontscale
sudo mkfontdir
sudo fc-cache -fsv

f.查看系统安装的中文字体:

fc-list :lang=zh | sort

参考文章

1.http://blog.csdn.net/qq_20480611/article/details/78117536
2.http://blog.csdn.net/ustc_dylan/article/details/6196129
3.http://forum.ubuntu.org.cn/viewtopic.php?p=2741115
4.http://blog.csdn.net/qq_34369618/article/details/77568184

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值