当前位置:网站首页>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
边栏推荐
- Tensorrt command line program
- 20210306 reprint how to make TextEdit have background pictures
- 看完有用的blog
- Sublime Text 配置php编译环境
- Sparse array (nonlinear structure)
- Win10桌面图标没有办法拖动(可以选中可以打开可以删除新建等操作但是不能拖动)
- Redis---1. Data structure characteristics and operation
- No process runs when querying GPU, but the video memory is occupied
- AWD学习
- Pytest (3) parameterize
猜你喜欢
AWD学习
Redis——缓存击穿、穿透、雪崩
由於不正常斷電導致的unexpected inconsistency;RUN fsck MANUALLY問題已解决
Pytest (1) case collection rules
Shardingsphere JDBC
Data science [9]: SVD (2)
Win电脑截图黑屏解决办法
20201002 VS 2019 QT5.14 开发的程序打包
Latex参考文献引用失败 报错 LaTeX Warning: Citation “*****” on page y undefined on input line *
Apt command reports certificate error certificate verification failed: the certificate is not trusted
随机推荐
Redis - big key problem
pytest(2) mark功能
20210306转载如何使TextEdit有背景图片
Vector types and variables built in CUDA
2020-9-23 QT的定时器Qtimer类的使用。
记录一次RDS故障排除--RDS容量徒增
apt命令报证书错误 Certificate verification failed: The certificate is NOT trusted
Latest CUDA environment configuration (win10 + CUDA 11.6 + vs2019)
Warp matrix functions in CUDA
Asynchronous data copy in CUDA
Latex参考文献引用失败 报错 LaTeX Warning: Citation “*****” on page y undefined on input line *
Uploading attachments using Win32 in Web Automation
Sentinel rules persist to Nacos
VSCODE 安装LATEX环境,参数配置,常见问题解决
Redis - grande question clé
蚂蚁集团g6初探
IDEA公布全新默认UI,太清爽了(内含申请链接)
Latex 编译报错 I found no \bibstyle & \bibdata & \citation command
virtualenv和pipenv安装
Pytest (2) mark function