常用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
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
%--coding:UTF-8--
\documentclass{article}
\usepackage[margin=1.25in]{geometry}
\usepackage[UTF8]{ctex}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{extarrows}
\usepackage{verbatim}
\usepackage{multicol}
\usepackage{tabularx}%控制表格长宽
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{authblk}
\usepackage{epstopdf}
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{mathrsfs}
\usepackage{graphicx}%调用图片
\usepackage{fancyhdr}%页眉页脚
\setlength{\belowcaptionskip}{-0cm}
\setcounter{section}{0}%章节计数
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{cor}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{question}{Question}
\newtheorem{problem}{Problem}[section]
\newtheorem*{fact}{Fact}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}{}[section]
\newtheorem*{solution}{Solution}
\newtheorem*{asolution}{Alternative Solution}
\renewcommand{\proofname}{proof}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\bfseries }%字体被加粗
\lfoot{}
\cfoot{}
\rfoot{\thepage}
%\setlength{\parindent}{0pt} 全局无缩进
\begin{document}
\title{\textbf{ } }
\author{ }
\date{ } %不显示日期
%\today 今日日期
%\thanks balabala 来标注通讯作者或者致谢
\maketitle
\end{document}

常用LaTeX语句

1
2
3
4
5
6
7
8
\noindent %这一行不缩进
\hfill %这一行用空格填满 常见的强制空行手段
\hline %一条横线
\hspace{}
\vspace{}
\tableofcontents %目录
\textsc{Key words:}\,\textit{} %英文摘要
% in enumerate we can use[itemindent=1pt] to set the indent

常用代码块

三线表

1
2
3
4
5
6
7
8
9
10
11
12
13
\usepackage
\begin{center}
\begin{tabular}{cccc} % l/c/r
\toprule
& \multicolumn{3}{c}{Numbers} \\
\cmidrule{2-4}
& 1 & 2 & 3 \\
\midrule
Alphabet & A & B & C \\
Roman & I & II& III \\
\bottomrule
\end{tabular}
\end{center}

image-20220217201328669

常规的表格

1
2
3
4
5
6
\begin{tabularx}{14em}%表格的宽度
{|*{4}{>{\centering\arraybackslash}X|}}
\hline
A & B & C & D \\ \hline
a & b & c & d \\ \hline
\end{tabularx}

image-20220217202344415

minipage

1
2
3
4
5
6
\fbox{\begin{minipage}{19.5em}%半栏的宽度
\quad 习得性无助感的实验——对实验室里狗的行为观察:

\quad 研究者首先将狗置于一个完全无法逃脱的情景,然后给予电击。电击引起了狗的惊叫和挣扎,但它无法摆脱电击。然后将狗置于中间有隔板的房间,隔板的一边有电机设备,另一边没有。隔板的高度是狗不费力就能跳过的。然后将狗置于有电击的一边,给予电击。点击开始后,狗只要跳过隔板就可以拜托痛苦。实验结果发现,狗除了在接受电击的最初半分种内有一阵惊恐外,一直就躺在地板上接受电击的痛苦,纵有逃脱的机会也不尝试。
\footnote{——美国心理学家塞利格曼Seligman习得性无助感实验(1967)}
\end{minipage}