LaTeX

安装

打开这个网页

image-20201016171058010

安装这个即可

然后安装个 TexMaker

1
winget install texmaker

然后可以配置一下,在选项里面配置,可以把编译器改一下来支持中文

image-20201016171147980

LaTeX文档

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
\documentclass{article}

\usepackage{ctex}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow}

\title{Use \LaTeX to make presentation}
\author{Fyind}
\date{\today}

\begin{document}
\maketitle
\tableofcontents
\section{create a beamer}
\subsection{title}
\subsection{chapters}
\section{what is in a beamer}
\subsection{inser a picture}
\begin{equation}
a+b+c+d = e
\end{equation}
\subsection{insert formula}
This is my text;
\end{document}

Document

图片

1
2
3
4
5
6
7
8
9
10
11
12
13
\documentclass{article}
\usepackage{graphicx} % Include the graphicx package

\begin{document}

\begin{figure}[h] % 'h' stands for 'here'
\centering
\includegraphics[width=0.8\textwidth]{path/to/your/image.png} % Adjust the path and file name
\caption{This is a sample figure caption.}
\label{fig:sample-figure}
\end{figure}

\end{document}

公式

表格

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
 \begin{tabular}{|c|c|c|c|c|c|c|}
\hline \multirow{2}{*}{ Base } & \multicolumn{5}{|c|}{ Coefficients } & \multirow{2}{*}{ Res. } \\
\cline{2-6} & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $x_5$ & \\
\hline$z$ & & -1/2 & 1/2 & & &2 \\
\hline $x_1$ &1 &1/2 & 1/2 & & & 2 \\
\hline $x_4$ & & 3/2 &-1/2 &1 & & 2 \\
\hline $x_5$ & & 1 & -1 & & 1 & 1\\
\hline
\end{tabular}


\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline \multirow{2}{*}{ Base } & \multicolumn{6}{|c|}{ Coefficients } & \multirow{2}{*}{ Res. } \\
\cline{2-7} & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $x_5$ & $x_6$ & \\
\hline$z$ & -1 & -2 & 1 & & & & 0\\
\hline $x_1$ &-1 & 2 & 1 &1 & & &3 \\
\hline $x_4$ & 2& 4 & 4 & & 1 & & 4\\
\hline $x_5$ & -1& 0 & 2 & & & 1 & 6\\
\hline
\end{tabular}


\begin{aligned}
\max \quad -x_1 - 2 x_2 &\\
\text{s.t.} \quad 2 x_1+ x_2 - 4 x_3& = -4 \\
4 x_1+x_2 + 2x_3 & = 4 \\
x_1, x_2, x_3 & \ge 0
\end{aligned}


revised simplex:

\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline \multirow{2}{*}{ Base } & \multicolumn{7}{|c|}{ Coefficients } & \multirow{2}{*}{ Res. } \\
\cline{2-8} & $z$ & $x_{B_1}$ & ... & $x_{B_m}$ & $x_{N_1}$ & .. & $x_{N_{n-m}}$ & \\
\hline $z$ & 1 & 0 & &0 & \multicolumn{3}{|c|}{ ${c'}_{N}^{T}=-(c_N-N'^{T}c_{B})^T$ } & $c_{B}^{T}B^{-1}b$\\
\hline $x_{B_1}$ & & 1 & & & \multicolumn{3}{|c|}{\multirow{3}{*}{ $N'=B^{-1}N$ } } & \multirow{3}{*}{ $b'=B^{-1}b$ } \\
\cline{1-5} ... & & & 1 & & \multicolumn{3}{|c|}{} & \\
\cline{1-5} $x_{B_m}$ & & & & 1 & \multicolumn{3}{|c|}{} & \\
\hline
\end{tabular}

Beamer

第一个beamer演示文稿

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
\documentclass{beamer}

\usepackage{ctex}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow}

\title{Use \LaTeX to make presentation}
\subtitle{tutorial}
\author{Fyind}
\date{\today}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\tableofcontents
\end{frame}

\section{create a beamer}
\begin{frame}
\subsection{title}
\subsection{chapters}
\end{frame}

\section{what is in a beamer}
\begin{frame}
\subsection{insert a picture}
\begin{equation}
a+b+c+d = e
\end{equation}

\subsection{insert formula}
\begin{table}
\caption{an example}
\begin{tabular}{cccc}
\toprule
a & b & c & d \\
\midrule
1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\
\bottomrule
\end{tabular}
\end{table}
\end{frame}

This is my text;
\end{document}

在beamer下,每一页ppt都是要放在 \frame 框架下的,除了用 \begin \end来包裹外,还可以使用

1
\framer{\titlepage}

自定义headline

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\usepackage{ctex}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow}

\setbeamercolor{huibai}{bg=gray, fg=white}

\setbeamertemplate{headline}{
\hbox{

\begin{beamercolorbox}[wd=0.5\paperwidth,ht=0.5cm,dp=2ex]{huibai}
\insertsection \insertsubsection \quad
\end{beamercolorbox}

\begin{beamercolorbox}[wd=0.5\paperwidth,ht=0.5cm,dp=2ex]{huibai}
作者: \insertshortauthor
\end{beamercolorbox}
}
}
image-20201016174008182

使用主体

1
2
\usetheme{Madrid}   % Comilerbau的主题