编辑器:
- vscode插件
- 在线编辑器overleaf:开箱即用
Latex语法
这个教程好 https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes
注释:%
开头
举例:
\documentclass{article}
\begin{document}
Subscripts(下标) in math mode are written as $a_b$ and superscripts(上标) are written as $a^b$. These can be combined and nested to write expressions such as
\[ T^{i_1 i_2 \dots i_p}_{j_1 j_2 \dots j_q} = T(x^{i_1},\dots,x^{i_p},e_{j_1},\dots,e_{j_q}) \]
We write integrals(积分) using $\int$ and fractions(分数) using $\frac{a}{b}$. Limits are placed on integrals using superscripts and subscripts:
\[ \int_0^1 \frac{dx}{e^x} = \frac{e-1}{e} \]
Lower case Greek letters are written as $\omega$ $\delta$ etc. while upper case Greek letters are written as $\Omega$ $\Delta$.
Mathematical operators are prefixed with a backslash as $\sin(\beta)$, $\cos(\alpha)$, $\log(x)$ etc.
\end{document}
效果:

vscode插件 LaTeX Workshop
安装
https://github.com/James-Yu/LaTeX-Workshop/wiki/Install
- 装支持:
- 装texlive并添加环境变量 https://www.tug.org/texlive
- restart vscode
- 装插件
外加:如果想卸载texlive on windows:
goto texlive installation folder (Default install path isC:\texlive\2019\tlpkg\installer
) and rununinst.bat
file
入门使用
https://github.com/James-Yu/LaTeX-Workshop/wiki/Install#usage
- open a
.tex
file and have a look at the TeX sidebar to access all the extension features - 编译:
ctrl
+alt
+b
or command palatebuild latex
多文件工程
https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#multi-file-projects
While it is fine to write all contents in one .tex file, it is common to split things up for simplicity.
For such LaTeX projects, the file with \begin{document} is considered as the root file, which serves as the entry point to the project.
LaTeX Workshop intelligently finds the root file when a new document is opened, the active editor is changed, or any LaTeX Workshop command is executed.
Once the root file is determined, it is parsed to discover all the files it includes using input, include, InputIfFileExists, subfile, import and subimport and the process goes on recursively. All these files are called dependencies and are considered to define a LaTeX project
在线编辑器overleaf
导入project
点击new project,可以选择导入工程
黑暗模式
打开一个project,编辑界面左上角的menu进去可以设置主题
还有其他设置噢