latex各個模塊範例模板以及各種使用技巧

一、導包

\documentclass{article}

\usepackage{geometry}
\geometry{a4paper}
%\usepackage[UTF8, heading = false, scheme = plain]{ctex}%格式
\usepackage{ctex}
%\usepackage{authblk} %添加機構,需要安裝preprint包
\usepackage{graphicx} %添加圖片
\usepackage{amsthm}
\usepackage{amsmath}
\renewcommand{\vec}[1]{\boldsymbol{#1}} % 生產粗體向量,而不是帶箭頭的向量
\usepackage{amssymb}
\usepackage{booktabs} % excel導出的大表格
\usepackage{booktabs}
\usepackage{amsthm,amsmath,amssymb}
\usepackage{mathrsfs}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{amssymb}

二、各塊函數的作用

(1)文章標題

\title{文章名}
\author{作者 \\ 機構}
並在 \begin{document}  後加上\maketitle

(2)目錄

\tableofcontents

(3)開始結束文檔塊

\begin{document}
\maketitle
\end{document}

(4)三線表格

\begin{center}
\begin{spacing}{1.1}
%longtable的意思是 這個表格可以跨頁
\begin{longtable}{p{.1\textwidth}p{.7\textwidth}m{.3\textwidth}}
\caption{description}
\label{table1}
    \toprule   %第一行線
    %表示第一列佔1.5cm 第二列佔6cm 第三列佔2cm 的距離 並且這幾個字都是居中對齊
    \multicolumn{1}{m{1.5cm}}{\centering Symbol} & \multicolumn{1}{m{6cm}}{\centering Definition} & \multicolumn{1}{m{2cm}}{ Unit} \\
    \midrule   %第二行線
     $V$ & index & -- \\
     $X$ & The  & -- \\
     $Y$ & The & -- \\
     $Z$ & The  & -- \\
    \bottomrule   %第三行線
\end{longtable}
\end{spacing}
\end{center}

(5)公式

\begin{equation}
	f_{\theta}(x)=\left\{
	\begin{array}{ccc}
	\theta x^{\theta -1} & & 0 < x < 1\\
	0 &	& else \\
	\end{array}
	\right.
\end{equation} 

在這裏插入圖片描述

(6)因爲所以

因爲所以:在導言區包含宏包\usepackage{amssymb}才能使用\because和\therefore命令

(7)代碼

\begin{lstlisting}
# 代碼位置
\end{lstlisting}

(8)算法

\autoref{alg:A} 算法
		
\begin{algorithm}[htb]
	\caption{算法名稱} %算法的名字
	\label{alg:A}
	\hspace*{0.02in} {\bf Input:} %算法的輸入, 
	input parameters A, B, C\\
	\hspace*{0.02in} {\bf Output:} %算法的結果輸出
	output result
	\begin{algorithmic}[1]
		\State some description % \State 後寫一般語句
		\For{condition} % For 語句,需要和EndFor對應
		\State ...
		\If{condition} % If 語句,需要和EndIf對應
		\State ...
		\Else
		\State ...
		\EndIf
		\EndFor
		\While{condition} % While語句,需要和EndWhile對應
		\State ...
		\EndWhile
		\State \Return result
	\end{algorithmic}
\end{algorithm}

(9)大於等於,小於等於,因爲,所以

\leq
\le
\req
\re
因爲所以:在導言區包含宏包\usepackage{amssymb}才能使用\because和\therefore命令

(10)Latex中輸入矩陣:

\begin{equation}       %開始數學環境
D = \left[                 %左括號
\begin{array}{cccc}   %該矩陣一共3列,每一列都居中放置
d(a_1,b_1) & d(a_1,b_2) & ... & d(a_1,b_m)\\  %第一行元素
d(a_2,b_1) & d(a_2,b_2) & ... & d(a_2,b_m)\\  %第二行元素
... 	   & ...        & ... & ...\\  %第二行元素
d(a_n,b_1) & d(a_n,b_2) & ... & d(a_n,b_m)\\  %第二行元素
\end{array}
\right]                 %右括號
\end{equation}

在這裏插入圖片描述

三、參考博客

LaTeX中文模版代碼
LaTeX 中表格的用法總結(四)——三線表和複雜的表格
latex如何輸入三種花體字母
LaTeX 特殊符號、加帽子符號、橫線和波浪線
在LaTex中插入代碼塊
LaTeX大括號公式和一般括號總結
LaTeX輸入帶圈數字
LaTeX一行排兩個圖片示例
LaTeX輸入極限下標,輸入目標函數中的max下標約束條件
latex中的希臘字母
MathJax 支持的 Latex 符號總結(微積分常用符號)
Latex中定理、引理、證明、假設
用Latex排版論文(2)《自動化學報》Latex模版使用時需要注意的問題

四、範例

(1)r語言作業模板

\documentclass{article}

\usepackage{geometry}
\geometry{a4paper}
%\usepackage[UTF8, heading = false, scheme = plain]{ctex}%格式
\usepackage{ctex}
%\usepackage{authblk} %添加機構,需要安裝preprint包
\usepackage{graphicx} %添加圖片
\usepackage{amsthm}
\usepackage{amsmath}
\renewcommand{\vec}[1]{\boldsymbol{#1}} % 生產粗體向量,而不是帶箭頭的向量
\usepackage{amssymb}
\usepackage{booktabs} % excel導出的大表格
\usepackage{booktabs}
\usepackage{amsthm,amsmath,amssymb}
\usepackage{mathrsfs}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{amssymb}


%\newtheorem{definition}{Definition} %英文
%\newtheorem{theorem}{Theorem}
\newtheorem{definition}{定義} %中文
\newtheorem{lemma}{引理}
\newtheorem{theorem}{定理}
%\newenvironment{proof}{{\noindent\it 證明}\quad}{\hfill $\square$\par}

\DeclareMathOperator{\Ima}{Im}%定義新符號
\DeclareMathOperator{\Rank}{rank}%定義求秩算子

\title{數理統計作業}
\author{}

%date{2019年10月30日} %註釋後顯示爲編譯時日期



\begin{document}
\maketitle

\tableofcontents
\newpage
% 生成目錄,請刪除上面兩行註釋

%\listoffigures
%\newpage
% 生成圖片列表,請刪除上面兩行註釋

%\begin{table}[htbp] 
%	\caption{\label{tab:test}示例表格} 
%	\begin{tabular}{lcl} 
%		\toprule 
%		。。 & 。。 & 。。 \\ 
%		\midrule 
%		。。 & 。。 & 。。 \\ 
%		。。 & 。。 & 。。 \\ 
%		。。 & 。。 & 。。 \\ 
%		\bottomrule 
%	\end{tabular} 
%\end{table}

\section{29題}

%\begin{figure}[ht] %htbp
%\centering
%\includegraphics[scale=0.6]{gradient.png}
%\caption{this is a figure demo}
%\label{fig:label}
%\end{figure}	

\begin{equation}
	f_{\theta}(x)=\left\{
	\begin{array}{ccc}
	\theta x^{\theta -1} & & 0 < x < 1\\
	0 &	& else \\
	\end{array}
	\right.
\end{equation} 


\subsection{求參數$\theta$ 的等尾置信區間}


\newpage


\section{36題}
\begin{table}[htbp] 
	\centering
	\caption{\label{tab:test}粉塵含量檢測數據} 
	\begin{tabular}{lcccccccccc} 
		\hline 
		粉塵含量 & 5.0 & 4.5 & 7.0 & 6.5 & 5.5 & 6.0 & 3.5 & 5.2 & 3.0 & 4.0 \\ 
		\hline 
	\end{tabular} 
\end{table}

r語言代碼:
\lstset{numbers=left, %設置行號位置
	numberstyle=\tiny, %設置行號大小
	keywordstyle=\color{blue}, %設置關鍵字顏色
	commentstyle=\color[cmyk]{1,0,1,0}, %設置註釋顏色
	frame=single, %設置邊框格式
	escapeinside=``, %逃逸字符(1左面的鍵),用於顯示中文
	%breaklines, %自動折行
	extendedchars=false, %解決代碼跨頁時,章節標題,頁眉等漢字不顯示的問題
	xleftmargin=2em,xrightmargin=2em, aboveskip=1em, %設置邊距
	tabsize=4, %設置tab空格數
	showspaces=false %不顯示空格
}
\begin{lstlisting}{language=R}
a <- c(5.0,4.5,7.0,6.5,5.5,6.0,3.5,5.2,3.0,4.0)
mean(a)	# 求均值
sd(a)  	# 求方差
qt(0.975, 9)  	# 求t分佈的0.025分位數
\end{lstlisting}

結果:
\begin{lstlisting}{language=R}
> a <- c(5.0,4.5,7.0,6.5,5.5,6.0,3.5,5.2,3.0,4.0)
> mean(a)	# 求均值
[1] 5.02
> sd(a)  # 求方差
[1] 1.292543
> qt(0.975, 9)  # 求t分佈的0.025分位數
[1] 2.262157
\end{lstlisting}

\subsection{對城區空氣粉塵含量的平均值作出估計}
$\because$由題可知,總體服從正態分佈。

$\therefore$樣本均值爲$\overline{X}=5.02$,樣本標準差s=1.292543,對城區空氣粉塵的平均值的估計爲5.02

$\because$由於樣本均值是總體均值的無偏估計

$\therefore$城市空氣粉塵含量的平均值估計爲5.02


\subsection{計算平均值的估計精度}
$\because$平均值的估計精度: $A(\hat{\theta}) = \big[1-\frac{\Delta(\hat{\theta})}{\theta}\big]\times100\%$。由於$\overline{X}$服從自由度爲9的學生氏t分佈,關於$\alpha$的雙側分位數$t_{0.0025}=2.2622$
,樣本標準差爲s=1.292543

$\therefore$粉塵含量平均值的95\%置信水平下的置信區間爲$[5.02-2.2622*\dfrac{1.2925}{\sqrt{10}},5.02+2.2622*\dfrac{1.2925}{\sqrt{10}}]$,即[4.0954,5.9446],其誤差限爲$\Delta(\hat{\theta}) = \dfrac{5.9446-4.0954}{2}=0.9246$

$\therefore$ 估計精度爲$A(\hat{\theta}) = \big[1 - \frac{0.9246}{5.9446}\big]\times100\% = 0.8445$

\newpage



\section{48題}	

\begin{equation}
W^{*} = \frac{\overline{X}^{*} - \overline{X}}{S^{*} / \sqrt{n}}
\end{equation}

\subsection{構建總體均值$\mu$置信度爲$1-\alpha$置信區間的原理}	
若總體X的分佈是非正態分佈,同時總體均值$\mu$和總體方差$\sigma^{2}$未知。$X_{1},X_{2},X_{3},\dots X_{n}$是取自總體X的樣本,當樣本容量足夠大時,考慮樣本函數
$\frac{\sqrt{n}(\overline{X}-\mu)}{\sigma}$,以樣本標準差S的實現s估計總體標準差$\sigma$,即$\dfrac{\overline{X}-\mu}{s/\sqrt{n}}\sim N(0,1)$(近似)

\subsection{構建總體均值$\mu$置信度爲$1-\alpha$置信區間的方法}	
通過bootstrap 抽樣的方法,實現大樣本。具體過程爲:將樣本實現$X_{1},X_{2},X_{3},\dots X_{n}$作爲
已經獲得的數據,現在從這組樣本實現中以等可能重複抽樣的方式再抽取樣本,樣本的容量
也爲n,這樣建立一次bootstrap 樣本的方式重複B 次(B=1000),每個bootstrap 樣本分別記
作:$X_{11},X_{12},X_{13},\dots X_{1n};X_{21},X_{22},X_{23},\dots X_{2n};\dots X_{B1},X_{B2},X_{3},\dots X_{Bn}$。通過每個bootstrap 樣本可以求的對應樣本的$W_{i}^{*}(i\in[1,B])$,
通過 bootstrap 建立的所有樣本的均值$\overline{X}^{*}$,方差爲$S^{*}$。當n 很大時,自由度爲n 的學生氏t 分佈趨近標準正態分佈N(0,1),因此用$w^{*}$的近似分位數$W_{\alpha}^{*}(n)$代替標準正態分佈的分位數,$\overline{X}_{i}^{*}$的0.5 的分位數爲$\overline{X}_{0.5}^{*}$。

置信度爲1-$\alpha$的置信區間爲$[\overline{X}^{*}-W^{*}_{\frac{\alpha}{2}}\frac{S^{*}}{\sqrt{n}},\overline{X}^{*}+W^{*}_{\frac{\alpha}{2}}\frac{S^{*}}{\sqrt{n}}]$
\newpage

\section{50題}



\subsection{應用核密度估計法求X分佈概率密度函數的估計}
核函數選用高斯核:$K(x) = \dfrac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^{2}} , x\in R$

核密度估計的窗寬選用最大平滑法進行優化選擇:
\begin{equation}
\label{equ:50-1}
	h_{n}^{(op)} = 3\big(\frac{R(K)\sigma^{5}}{35n}\big)^{1/5} = 3\big(\frac{\sigma^{5}}{\sqrt{2\pi}\times35n}\big)^{1/5}
\end{equation}

由於標準差爲:$\sigma = 656.9043$,$R(K) = \frac{1}{\sqrt{2\pi}}$,代入公式(\ref{equ:50-1})的到優化窗寬:

$\hat{f}_{100}(x) = 3\times\big(\frac{656.9043^{5}}{\sqrt{2\pi}\times35\times100}\big)^{1/5} =  320.6208$

若用$x_{1} , x_{2} , x_{3} \dots x_{n}$表示樣本實現,則總體X 的概率密度函數的核密度估計爲:

$\hat{f}_{100}(x) = \frac{1}{32062.08\times\sqrt{2\pi}} \sum\limits_{i=1}^{100} e^{-\dfrac{1}{2}\big(\frac{x - x_{i}}{320.6208}\big)}$


\subsection{繪製X分佈概率密度函數的估計曲線}
r語言代碼:
\lstset{numbers=left, %設置行號位置
	numberstyle=\tiny, %設置行號大小
	keywordstyle=\color{blue}, %設置關鍵字顏色
	commentstyle=\color[cmyk]{1,0,1,0}, %設置註釋顏色
	frame=single, %設置邊框格式
	escapeinside=``, %逃逸字符(1左面的鍵),用於顯示中文
	%breaklines, %自動折行
	extendedchars=false, %解決代碼跨頁時,章節標題,頁眉等漢字不顯示的問題
	xleftmargin=2em,xrightmargin=2em, aboveskip=1em, %設置邊距
	tabsize=4, %設置tab空格數
	showspaces=false %不顯示空格
}
\begin{lstlisting}{language=R}
x <- c(4.5,866.7,643.7,23.7,816.0,611.1,520.9,31.1,183.8,+
837.4,101.5,50.9,48.5,22.2,673.8,1678.5,129.3,1426.5,346.1,+
2973.3,375.3,108.7,1046.5,99.4,369.1,1637.3,2.6,258.5,693.2,+
39.5,455.5,16.8,296.8,608.4,410.0,74.6,125.2,189.3,484.9,+
1227.5,45.9,1621.7,328.1,1761.5,667.6,55.9,68.1,45.8,199.5,+
24.4,3028.6,1102.6,1053.6,47.9,1430.6,1546.4,899.2,210.4,+
1017.2,638.7,1418.8,681.7,822.6,83.3,820.3,1378.6,317.4,2.2,+
1113.9,1402.6,851.2,906.6,796.6,148.2,358.6,54.0,489.7,+
397.7,1923.3,113.4,1053.5,799.6,2571.2,1677.4,406.8,54.8,+
699.4,1954.7,491.5,1701.8,820.5,423.3,1091.5,117.8,192.7,+
448.3,156.3,449.9,143.2,385.4)
b <- max(x)
s <- sd(x)
print(s)
h = 3*(s^5/sqrt(2*pi)/35/100)^(1/5)
print(h)
fun <- density(x,bw=h,kernel="gauss")
hist(x, prob=T)
lines(fun)
\end{lstlisting}


X分佈概率密度函數的估計曲線如圖(\ref{fig:50-1})所示:
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{50-1}
\caption{X分佈概率密度函數的估計曲線}
\label{fig:50-1}
\end{figure}


\subsection{求概率P\{X > 700\}}
r語言代碼:
\begin{lstlisting}{language=R}
#定義被積函數R代碼
f<-function(t,a,b,h,y){ 
k<-(b-a)*t+a+b-2*y 
z<-exp(-k*k/(8*h^2)) 
return(z)} 
#Gauss-Legendre積分計算的R代碼 
I<-function(a,b,h,y) { 
xx<-c(0.0000,0.5384693,0.9061799) 
A<-c(0.5688889,0.4786287,0.2369269) 
q<-A[1]*f(xx[1],a,b,h,y)+A[2]*(f(xx[2],a,b,h,y)+
f(xx[2],a,b,h,y))+A[3]*(f(xx[3],a,b,h,y)+ 
f(-xx[3],a,b,h,y)) 
return(q)}
#計算概率的R代碼
P<-function(a,b,h,x) { 
y<-rep(0,length(x))
s<-0 
for (i in 1:length(x)) y[i]<-I(a,b,h,x[i]) 
for (i in 1:length(x)) s<-s+y[i] 
m<-2*sqrt(2*pi)*h*length(x) 
p<-(b-a)*s/m 
return(p) }
P(700,b,h,x) 
\end{lstlisting}

結果:
\begin{lstlisting}
	[1] 0.2519053
\end{lstlisting}
\end{document}

(2)課程論文模板

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  LaTeX 模板,主要針對 A4 紙的中文Paper。
%%  配合教程食用 https://mp.csdn.net/mdeditor/86517934#
%%
%%  Ver 1.0  By Tstar 
%%
%%  You can mofify it and distribute it freely :)
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  文章模板:utf-8編碼,A4 紙,10磅,文章類型爲article,
%  這裏設置UTF8後,下面只需要使用ctex包就能直接用中文
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[UTF8,a4paper,10pt]{article}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  packages
%  這部分聲明需要用到的包
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{ctex}         % 中文支持
\usepackage{fancyhdr}
\usepackage{multicol}    % 正文單雙欄混排
\usepackage{lastpage}    % 用於獲得最大頁數,頁眉顯示用
\usepackage{geometry}    % 用於設置頁邊距
\usepackage[subfigure,AllowH]{graphfig}    %圖片相關


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%定義頁邊距
%geometry使用手冊
%http://www.ctex.org/documents/packages/layout/geometry.htm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\geometry{left=3cm,right=3.8cm,top=2.5cm,bottom=2.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%定義行間距爲1.1倍行距
\renewcommand{\baselinestretch}{1.1}
%重新定義縮進長度  pt是字號
\parindent 22pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 頁眉頁腳定義
% 因爲首頁會自動定義成plain格式 http://www.ctex.org/documents/packages/layout/fancyhdr.htm
% but我喜歡每一頁都有頁眉,so重定義plain型,
% 後面就全設置成plain型好了orz,其實應該改成fancy型再設置fancy的屬性
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancypagestyle{plain}{
\fancyhf{}
\lhead{Month, Year}
\chead{\centering{chinese latex template}}
\rhead{Page \thepage\ of \pageref{LastPage}}
\lfoot{}
\cfoot{}
\rfoot{}}
\pagestyle{plain}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 標題,作者,通信地址定義
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   texbf{...}爲加粗
%   huge{...}等等調節字體的
\title{\textbf{\huge{Latex中文模板}}}
\author{author1,author2\\
(西北農林科技大學)}
\date{}  % 這一行用來去掉默認的日期顯示


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  文章正文
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 此行使文獻引用以上標形式顯示
\newcommand{\supercite}[1]{\textsuperscript{\cite{#1}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  顯示title
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  中文摘要
%  調整摘要、關鍵詞,中圖分類號的頁邊距
%  中英文同時調整
%  因爲geometry命令不能用在正文區只能用這看起來很麻煩的方法了orz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\oddsidemargin}{ 1cm}  % 3.17cm - 1 inch
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{13.50cm}
%添加標題和摘要的距離
%vspace{...}是豎直距離
%hspace{...}是水平距離
\vspace{-0.2cm}
%center是居中用的
\begin{center}
%在這裏寫中文摘要
%heiti表示....黑體,kaishu是楷書,還有songti宋體,lishu隸書,fangsong仿宋
\parbox{\textwidth}{
{\heiti 摘~~~}\quad {\kaishu 這是一個菜菜的latex中文模板,課程論文、大作業的時候可以用用吧。}\\
{\heiti 關鍵詞} \quad {\kaishu latex,菜菜的,中文模板,課程論文}}
\end{center}
\vspace{0.5cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  英文摘要
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  \\爲換行,可以附加行間距;\par是結束並開始下一段,多一個首行縮進
\begin{center}
\large{\textbf{chinese latex template}}\\

%writer and communication address
\textbf{author1, author2}\\[2pt]
\small{\textit{(Nanjing University, School of Management and Engineering, Department of Automation)}}\\[14pt]
\parbox{\textwidth}{
%English abstract
\small{\textbf{Abstract}\quad This is a basic chinese latex template for novice,could be used for course eassy\\
%English key word
\textbf{Key Words}\quad latex, basic, chinese template, course eassy}}
\end {center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  目錄頁-------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\tableofcontents
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  正文由此開始-------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  恢復正文頁邊距
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\oddsidemargin}{-.5cm}  % 3.17cm - 1 inch
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{17.00cm}

\section{引用文獻}
%\indent 爲首行縮進
%引用文獻
\indent 文獻\supercite{ref1,ref2}中提到:南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\subsection{列表}
\begin{itemize}
    \item 身是菩提樹,心如明鏡臺
    \item 時時勤拂拭,勿使惹塵埃.
    \item 菩提本無樹,明鏡亦非臺
    \item 本來無一物,何處惹塵埃.
\end{itemize}
南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\section{插入圖片}
\begin{Figure}[H]{aaa}[qwad]
%pic和tex文件保存在同一路徑下
\graphfile[30]{1.png}[picture]
%相對路徑(推薦),可以在tex所在路徑建立一個fig 文件夾放圖片
%\graphfile[60]{fig//1.png}[picture]
%絕對路徑,從電腦任意位置尋找圖片
%\graphfile[30]{C://Users//TstarYSY//Desktop//fig//1.png}[picture]
\end{Figure}
% \noindent 取消首行縮進
\noindent 南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛\par
南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\par
\begin{Figure}[H]{asdf}[111]
\graphfile[34]{1.png}[picture1]
\graphfile[36]{1.png}[picture2]
\par
\end{Figure}
\section{表格}
南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\par
\vspace{3ex}
\begin{table}[h]
    \centering
    %{|l|c|c|}指明有3列而且對其方式是左中中,|表示要加豎線
    %\hline表示添加橫線
    \begin{tabular}{|l|c|c|}\hline
        %&表示一個單元格內容結束
        %multicolumn{n}{...}{...}表示合併n個單元格,指明對齊方式和內容
        Setting&\multicolumn{2}{c|}{A4 size paper}\\\hline
        &mm&inches\\
        Top&25&1.0\\
        Bottom&25&1.0\\
        Left&20&0.8\\
        Right&20&0.8\\
        Column Width&82&3.2\\
        Column Spacing&6&0.25\\\hline
    \end{tabular}
    \caption{a table}
    \label{tab:table1}
\end{table}
\vspace{3ex}
\noindent 南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\section{公式}
南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\noindent
\begin{figure}[h]
\begin{minipage}[h]{0.48\linewidth}
\[\alpha  \ge \delta {\rm{ + }}\overline {\eta  * \beta } \]
\end{minipage}
\begin{minipage}[h]{0.48\linewidth}
\[\left[ {\begin{array}{*{20}{c}}
{{a_1}}&{{a_2}}&\alpha &\beta \\
\chi &\varphi &\gamma &\eta \\
\theta &{{\zeta _3}}&\xi &\omega
\end{array}} \right]\]
\end{minipage}
\vspace{3ex}
\caption{aaa}
\end {figure}
\par\noindent
南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛南無阿彌陀佛
\section{結束}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  參考文獻
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\small
\begin{thebibliography}{99}
    \setlength{\parskip}{0pt}  %段落之間的豎直距離
    \bibitem{ref1}吳承恩. 西遊記~[M], 明14XX年.
    \bibitem{ref2} 玄奘. 大唐西域記學報~[J],~6XX~, 1(2): 23-55.
\end{thebibliography}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  文章結束
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\end{document}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章