当前位置:网站首页>Latex compiles Chinese in vscode and solves the problem of using Chinese path
Latex compiles Chinese in vscode and solves the problem of using Chinese path
2022-07-02 06:41:00 【Dull as dull】
latex Compile Chinese and Chinese path
problem 1 Compile Chinese
\documentclass{article}
\usepackage{CTEX}
\begin{document}
This is a CTEX Of utf-8 Coding examples ,{\kaishu Here is the italics display },{\songti Here is the Song typeface display },{\heiti Here is the bold display },{\fangsong Here is the imitation song display }.
\end{document}
The above code needs to use xelatex Compile , Compilation result

If you use latexmk, The following error reports will appear

We should do the following xelatex Configuration of compilation tools
stay VSCODE In the press F1 Choose preferences Environment configuration

Here are some configuration files , If you don't want to modify the file but need to configure it from scratch, you can see that there is a link with the complete configuration code at the end
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOC%"
]
},
// Here is xelatex The definition of tools
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
// Use when setting the compilation chain xelatex As the default first preferred compilation
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "pdflatex -> bibtex",
"tools": [
"pdflatex",
"bibtex"
]
},
// {
// "name": "pdflatex -> bibtex -> pdflatex*2",
// "tools": [
// "pdflatex",
// "bibtex",
// "pdflatex",
// "pdflatex"
// ]
// },
{
"name": "xelatex -> bibtex -> xelatex*2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
}
],
problem 2 Chinese path cannot be compiled
Solution 1
Just use as above xelatex Compile ( It is feasible when there is no reference )

Solution 2
But other tools are used in the tool link such as bibtex etc. You also need to modify the configuration Define the parameters in the middle of the tool "%DOC%" Change to "%DOCFILE%" because bibtex Unable to recognize Chinese path
Modify the previous failure case

After modification, it can pass smoothly

final document
In the following links, I will share all my latex To configure You can copy it directly and put it in
reference
LaTex Three ways to support Chinese _ZHE-CSDN Blog _latex chinese
边栏推荐
- web自动中利用win32上传附件
- Sentinel规则持久化到Nacos
- selenium的web自动化中常用的js-修改元素属性翻页
- 构建学习tensorflow
- 实习生跑路留了一个大坑,搞出2个线上问题,我被坑惨了
- Nodejs - Express middleware modification header: typeerror [err_invalid_char]: invalid character in header content
- NodeJs - Express 中间件修改 Header: TypeError [ERR_INVALID_CHAR]: Invalid character in header content
- 分布式事务 :可靠消息最终一致性方案
- Kotlin - 验证时间格式是否是 yyyy-MM-dd HH:mm:ss
- AWD learning
猜你喜欢

TensorRT的数据格式定义详解

Detailed definition of tensorrt data format

Sentinel规则持久化到Nacos

Blog directory of zzq -- updated on 20210601

apt命令报证书错误 Certificate verification failed: The certificate is NOT trusted

Redis——大Key问题

广告业务Bug复盘总结

Introduce two automatic code generators to help improve work efficiency

Redis - big key problem

20201002 VS 2019 QT5.14 开发的程序打包
随机推荐
2020-9-23 QT的定时器Qtimer类的使用。
Uploading attachments using Win32 in Web Automation
分布式事务 :可靠消息最终一致性方案
Redis - hot key issues
apt命令报证书错误 Certificate verification failed: The certificate is NOT trusted
20201002 vs 2019 qt5.14 developed program packaging
Redis---1. Data structure characteristics and operation
Kotlin - 验证时间格式是否是 yyyy-MM-dd HH:mm:ss
Introduce two automatic code generators to help improve work efficiency
eslint配置代码自动格式化
Functions of tensorrt
FE - weex 开发 之 使用 weex-ui 组件与配置使用
实习生跑路留了一个大坑,搞出2个线上问题,我被坑惨了
20201002 VS 2019 QT5.14 开发的程序打包
Dynamic global memory allocation and operation in CUDA
Shardingsphere JDBC
Summary of advertisement business bug replay
(the 100th blog) written at the end of the second year of doctor's degree -20200818
No process runs when querying GPU, but the video memory is occupied
Eggjs -typeorm 之 TreeEntity 实战