Requirement
- VSCode
- TexLive + TextStudio
- Some useful
Extension for VScode:
- Code Spell Checker
- LaTex Utilities
- LaTex Workshop
1. Edit setting.json , append the content below.
// Latex workshop
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOC%"
]
},
{
"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%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "pdflatex -> bibtex -> pdflatex*2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk"
],
"cSpell.languageSettings": [
],
2. Example in Chinese
%!TEX program = pdflatex
\documentclass{article}
\usepackage[UTF8]{ctex}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}
\title{Example of LaTex and VSCode in 中文 }
\author{你好 world!}
\begin{document}
\maketitle
% -----------------------------------------------------------
\section{MOT研究现状}
%
基于目标跟踪的初始化方法,我们将现有的MOT方法分为两类。
\begin{figure}
\centerline{\includegraphics[scale=.8]{./fig/mot_3_types.png}}
\label{mot-type}
\caption{Comparison of processing steps between (a) DFT, (b) Two-Step TBD, and (c) One-Shot TBD methods}
\end{figure}
\end{document}
% 这里是导言区
% \begin{document}
% Hello, world !
% fuck you latex
% 你好
% 中文呢
% \end{document}
|