用TexStudio编辑文档时,不知是多加了空格还是啥,总是提示如下错误:

Package inputenc Error: Unicode char \u8:  not set up for use with LaTeX.

删除掉一些内容(code)之后可以成功编译,不过添加(code)之后,又反复出现了。如此几次,真是抓狂。

遂到tex.stackchange.com上找寻到:戳这里。说是有Non-Breaking Space。

依照其添加了:

\DeclareUnicodeCharacter{00A0}{~}

不过问题依旧啊。

阅读文档:

This is due to the utf8 definition not necessarily having a mapping of all the character glyphs you are able to enter on your keyboard. 

后面还提到:

With XeTeX and LuaTeX the inputenc package is no longer needed. Both engines support UTF-8 directly and allow the use of TTF and OpenType fonts to support Unicode characters. See the Fonts7 section for more information.

将编译环境换成XeLatex,不过汉字完全不见了!!

继续搜索'XeLatex 中文',原来是缺少宏包,引入宏包(注释掉原来的CJK宏包引用,貌似会造成冲突):

\usepackage{xeCJK}

成功编译。相信这次是从根源上解决了这个问题。

Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.的更多相关文章

  1. 全志TinaLinux编译错误fatal error: unicode/ucnv.h: No such file or directory

    今天开始正式干活了 拿到一个全志Tina的板子还有一个SDK压缩包,要求我这周(只剩一天半...)就要把sdk编译通过并且把板子跑起来. 还特别跟我说他们试了下这个sdk编译没法通过,会报错... 竟 ...

  2. Reading package lists... Error! 解决方案

    ubuntu 下安装python开发包,执行命令 sudo apt-get install python-dev,报错: Reading package lists... Error! E: Enco ...

  3. vxworks一个超级奇怪的错误(parse error before `char')

    void tserver(int id) { if(debug){ useResource(,id);} char msgBuf[MAX_MSG_LEN]; if (msgQReceive(myMsg ...

  4. R安装package报ERROR: a 'NAMESPACE' file is required

    R安装package报错: [root@Hadoop-NN-01 mysofts]# R CMD INSTALL trimcluster_0.1-1.tar.gz * installing to li ...

  5. 导入Unity插件时出现Failed to import package with error: Couldn't decompress package

    导入Unity插件时出现Failed to import package with error: Couldn't decompress package 一开始以为压缩包本身有问题,坏了 后来发现在父 ...

  6. Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换

    Package CJK Error: Invalid character code. 问题解决方法--xelatex和pdflatex编译的转换 解决方法:添加格式说明信息 将下面语句: \docum ...

  7. sudo apt install libreadline-dev Reading package lists... Error!

    luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ ...

  8. ubuntu 安装时出错 sudo apt-get update Reading package lists… Error

    安装过程出错 首先出现问题sudo apt-get updateReading package lists… Error!E: Encountered a section with no Packag ...

  9. Failed to import package with error: Couldn't decompress package

    解压unitypackage的时候出错.原因是路径中包括中文字符,更改成英文路径就可以. 參考 Error while importing package: Couldn't decompress p ...

随机推荐

  1. Scala模式匹配和类型系统

    1.模式匹配比java中的switch case强大很多,除了值,类型,集合等进行匹配,最常见的Case class进行匹配,Master.scala有大量的模式匹配. Case "_&qu ...

  2. AE 栅格处理

    由RasterDataset得到RasterLayer RasterDataset->RasterLayer IRasterLayer pRasterLayer = new RasterLaye ...

  3. C# 将字符串转化成流,将流转换成字符串

    using System; using System.IO; using System.Text; namespace CSharpConvertString2Stream { class Progr ...

  4. Python得到前面12个月的数据,Python得到现在时间 前一年的数据,

    #Python 实现得到现在时间12个月前的每个月 # 假设现在的时间是2016年9月25日 #得到现在的时间 得到now等于2016年9月25日 now = datetime.datetime.no ...

  5. python 统计文本文件的行数

    num_lines = sum(1 for line in open(input_file_name))

  6. Hadoop集群(第3期)_VSFTP安装配置

    1.VSFTP简介 VSFTP是一个基于GPL发布的类Unix系统上使用的FTP服务器软件,它的全称是Very Secure FTP 从此名称可以看出来,编制者的初衷是代码的安全. 安全性是编写VSF ...

  7. Unable to locate package update

    碰到这个问题后找到这个帖子就转了过来 当用apt-get更新软件包时常出现错误提示Unable to locate package update, 尤其是在ubuntu server上,解决方法是: ...

  8. 51nod1122 机器人走方格 V4

    矩阵快速幂求出每个点走n步后到某个点的方案数.然后暴力枚举即可 #include<cstdio> #include<cstring> #include<cctype> ...

  9. C语言之宏

    所谓的宏就是一种预处理命令,什么是与处理呢?即在编译过程之前先对程序代码做出的必要的转换处理.宏有两个作用: 1.当遇到需要将程序某个特定的数量在程序中出现的所有实例通通加以修改时,程序只需改动一处即 ...

  10. Java笔记之数组

    1.int flags[] = new int[10];数组中的每个元素初始化为0. Arrays.fill(flags, 0);将数组中每个元素置为0.