Latex_download

Latex_download

Charles Lv7

Latex下载指南

什么是Latex?

LaTex是一种基于TEX的排版系统。一般我们希望能够用Latex来写论文。其实就是通过代码控制排版,和前端界面十分相似。关于如何使用,我们先安装个TeX Live,然后在Visual Studio Code里装个插件就可以了,这样使用起来比较方便。

img

如何配置

1. 下载和安装TexLive

清华镜像源 中下载并安装。

2. 安装Latex Workshop

在VSCode的拓展商店中搜索”Latex Workshop“并安装。

3. 修改Late Workshop配置

  1. Ctrl+,打开VSCode设置页面

img

  1. 点击上图红框内图标,自动打开配置文件“settings.json”

  2. 把下面的json加到settings.json中

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
// 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"
]
}

添加完效果如下

img

4. 试用

  1. 新建tex格式文件,注意文件路径名不能包含中文

  2. 输入

1
2
3
4
\documentclass[UTF8]{ctexart}
\begin{document}
你好 world!
\end{document}
  1. Ctrl+Alt+B进行编译,产生PDF文件

  2. Ctrl+Alt+V查看PDF文件

img


如何使用及相关笔记

这是一份用latex编写的latex指导手册:

CTeX-org/lshort-zh-cn: A Chi­nese edi­tion of the Not So Short Introduction to LaTeX2ε (github.com)

具体使用请看专题——Tag: Latex - Charles’s Castle (charles2530.github.io)

简单中文论文模版。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
\documentclass[12pt, a4paper, oneside, fontset=windows]{ctexart}
\usepackage{amsmath, amsthm, amssymb, appendix, bm, graphicx, hyperref, mathrsfs}

\title{\textbf{西洲曲}}
\author{佚名}
\date{\today}
\linespread{1.5}

\newtheorem{theorem}{定理}[section]
\newtheorem{definition}[theorem]{定义}
\newtheorem{lemma}[theorem]{引理}
\newtheorem{corollary}[theorem]{推论}
\newtheorem{example}[theorem]{例}
\newtheorem{proposition}[theorem]{命题}

\renewcommand{\abstractname}{\Large\textbf{摘要}}

\begin{document}
\pagestyle{empty}
\maketitle

\setcounter{page}{0}
\maketitle
\thispagestyle{empty}


\begin{abstract}
忆梅下西洲,折梅寄江北。
\par\textbf{关键词:}爱情; 诗歌.
\end{abstract}


\newpage
% 添加目录
\pagenumbering{Roman}
\setcounter{page}{1}
\tableofcontents
\newpage
\setcounter{page}{1}
\pagenumbering{arabic}

\newpage
\section{一级标题}

\subsection{二级标题}
这里是正文.

% 参考文献
\newpage

\begin{thebibliography}{99}
\bibitem{a}作者. \emph{文献}[M]. 地点:出版社,年份.
\bibitem{b}作者. \emph{文献}[M]. 地点:出版社,年份.
\end{thebibliography}


% 附录
\newpage

\begin{appendices}
\renewcommand{\thesection}{\Alph{section}}
\section{附录标题}
这里是附录.
\end{appendices}

\end{document}

img

img

img

img

img

  • Title: Latex_download
  • Author: Charles
  • Created at : 2023-01-31 16:16:35
  • Updated at : 2023-08-17 09:45:21
  • Link: https://charles2530.github.io/2023/01/31/latex-download/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments