latex各个模块范例模板以及各种使用技巧
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                latex各个模块范例模板以及各种使用技巧
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                文章目錄
- 
- 一、導包
- 二、各塊函數(shù)的作用
- 
- 1、文章標題
- 2、目錄
- 3、開始結束文檔塊
- 4、三線表格
- 5、公式
- 5、因為所以
- 5、代碼
- 8、算法
- 9、大于等于,小于等于,因為,所以
- 10、Latex中輸入矩陣:
- 11、公式括號總結
- 
- (1)單邊大括號
- (2)array,后面帶大于號小于號
- (3)case,不同情形
- (4)括號的左右邊界. \left\{和\right
- (5)控制括號的大小
- (6)使用\big, \Big, \bigg, \Bigg控制括號的大小
- (7)各種括號
 
 
- 三、參考博客
- 四、范例
- 
- 1、r語言作業(yè)模板
- 2、課程論文模板
 
- 五、sci論文模板
 
一、導包
\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}
二、各塊函數(shù)的作用
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} 
5、因為所以
因為所以:在導言區(qū)包含宏包\usepackage{amssymb}才能使用\because和\therefore命令
5、代碼
\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
因為所以:在導言區(qū)包含宏包\usepackage{amssymb}才能使用\because和\therefore命令
10、Latex中輸入矩陣:
\begin{equation}       %開始數(shù)學環(huán)境
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}
11、公式括號總結
(1)單邊大括號
$$ f(x)=\left\{
\begin{aligned}
x & =  \cos(t) \\
y & =  \sin(t) \\
z & =  \frac xy
\end{aligned}
\right.
$$
- 效果
 
(2)array,后面帶大于號小于號
$$ F^{HLLC}=\left\{
\begin{array}{rcl}
F_L       &      & {0      <      S_L}\\
F^*_L     &      & {S_L \leq 0 < S_M}\\
F^*_R     &      & {S_M \leq 0 < S_R}\\
F_R       &      & {S_R \leq 0}
\end{array} \right. $$
- 效果
 
(3)case,不同情形
$$f(x)=
\begin{cases}
0& \text{x=0}\\
1& \text{x!=0}
\end{cases}$$
- 效果
 
(4)括號的左右邊界. \left{和\right
- 此方法可解決多行公式的括號匹配問題
$$\left\{ a \right.$$
- 效果
 
(5)控制括號的大小
- 使用\left 和 \right
 可以自動控制不同層次括號的大小,\left 放在左邊括號前面,\right 放在右邊括號前面,需要配對使用。(但是和別的括號匹配也行,和\right.匹配也行)
(6)使用\big, \Big, \bigg, \Bigg控制括號的大小
不需要成對使用
\Bigg ( \bigg [ \Big \{ \big \langle \left | \| x \| \right | \big \rangle \Big \} \bigg ] \Bigg )
- 效果
 
(7)各種括號
三、參考博客
LaTeX中文模版代碼
 LaTeX 中表格的用法總結(四)——三線表和復雜的表格
 latex如何輸入三種花體字母
 LaTeX 特殊符號、加帽子符號、橫線和波浪線
 在LaTex中插入代碼塊
 LaTeX大括號公式和一般括號總結
 LaTeX輸入帶圈數(shù)字
 LaTeX一行排兩個圖片示例
 LaTeX輸入極限下標,輸入目標函數(shù)中的max下標約束條件
 latex中的希臘字母
 MathJax 支持的 Latex 符號總結(微積分常用符號)
 Latex中定理、引理、證明、假設
 用Latex排版論文(2)《自動化學報》Latex模版使用時需要注意的問題
四、范例
1、r語言作業(yè)模板
\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{數(shù)理統(tǒng)計作業(yè)}
\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{求參數(shù)$\theta$ 的等尾置信區(qū)間}\newpage\section{36題}
\begin{table}[htbp] \centering\caption{\label{tab:test}粉塵含量檢測數(shù)據} \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, %解決代碼跨頁時,章節(jié)標題,頁眉等漢字不顯示的問題xleftmargin=2em,xrightmargin=2em, aboveskip=1em, %設置邊距tabsize=4, %設置tab空格數(shù)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分位數(shù)
\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分位數(shù)
[1] 2.262157
\end{lstlisting}\subsection{對城區(qū)空氣粉塵含量的平均值作出估計}
$\because$由題可知,總體服從正態(tài)分布。$\therefore$樣本均值為$\overline{X}=5.02$,樣本標準差s=1.292543,對城區(qū)空氣粉塵的平均值的估計為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$的雙側分位數(shù)$t_{0.0025}=2.2622$
,樣本標準差為s=1.292543$\therefore$粉塵含量平均值的95\%置信水平下的置信區(qū)間為$[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$置信區(qū)間的原理}	
若總體X的分布是非正態(tài)分布,同時總體均值$\mu$和總體方差$\sigma^{2}$未知。$X_{1},X_{2},X_{3},\dots X_{n}$是取自總體X的樣本,當樣本容量足夠大時,考慮樣本函數(shù)
$\frac{\sqrt{n}(\overline{X}-\mu)}{\sigma}$,以樣本標準差S的實現(xiàn)s估計總體標準差$\sigma$,即$\dfrac{\overline{X}-\mu}{s/\sqrt{n}}\sim N(0,1)$(近似)\subsection{構建總體均值$\mu$置信度為$1-\alpha$置信區(qū)間的方法}	
通過bootstrap 抽樣的方法,實現(xiàn)大樣本。具體過程為:將樣本實現(xiàn)$X_{1},X_{2},X_{3},\dots X_{n}$作為
已經獲得的數(shù)據,現(xiàn)在從這組樣本實現(xià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 分布趨近標準正態(tài)分布N(0,1),因此用$w^{*}$的近似分位數(shù)$W_{\alpha}^{*}(n)$代替標準正態(tài)分布的分位數(shù),$\overline{X}_{i}^{*}$的0.5 的分位數(shù)為$\overline{X}_{0.5}^{*}$。置信度為1-$\alpha$的置信區(qū)間為$[\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分布概率密度函數(shù)的估計}
核函數(shù)選用高斯核:$K(x) = \dfrac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^{2}} , x\in R$核密度估計的窗寬選用最大平滑法進行優(yōu)化選擇:
\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})的到優(yōu)化窗寬:$\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}$表示樣本實現(xiàn),則總體X 的概率密度函數(shù)的核密度估計為:$\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分布概率密度函數(shù)的估計曲線}
r語言代碼:
\lstset{numbers=left, %設置行號位置numberstyle=\tiny, %設置行號大小keywordstyle=\color{blue}, %設置關鍵字顏色commentstyle=\color[cmyk]{1,0,1,0}, %設置注釋顏色frame=single, %設置邊框格式escapeinside=``, %逃逸字符(1左面的鍵),用于顯示中文%breaklines, %自動折行extendedchars=false, %解決代碼跨頁時,章節(jié)標題,頁眉等漢字不顯示的問題xleftmargin=2em,xrightmargin=2em, aboveskip=1em, %設置邊距tabsize=4, %設置tab空格數(shù)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分布概率密度函數(shù)的估計曲線如圖(\ref{fig:50-1})所示:
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{50-1}
\caption{X分布概率密度函數(shù)的估計曲線}
\label{fig:50-1}
\end{figure}\subsection{求概率P\{X > 700\}}
r語言代碼:
\begin{lstlisting}{language=R}
#定義被積函數(shù)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}    % 用于獲得最大頁數(shù),頁眉顯示用
\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{...}等等調節(jié)字體的
\title{\textbf{\huge{Latex中文模板}}}
\author{author1,author2\\
(西北農林科技大學)}
\date{}  % 這一行用來去掉默認的日期顯示%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  文章正文
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 此行使文獻引用以上標形式顯示
\newcommand{\supercite}[1]{\textsuperscript{\cite{#1}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  顯示title
\maketitle%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  中文摘要
%  調整摘要、關鍵詞,中圖分類號的頁邊距
%  中英文同時調整
%  因為geometry命令不能用在正文區(qū)只能用這看起來很麻煩的方法了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中文模板,課程論文、大作業(yè)的時候可以用用吧。}\\
{\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}
五、sci論文模板
%% 
%% Copyright 2007, 2008, 2009 Elsevier Ltd
%% 
%% This file is part of the 'Elsarticle Bundle'.
%% --------------------------------------------- 
\documentclass[preprint,12pt]{elsarticle} 
\usepackage{lineno,hyperref}
\modulolinenumbers[5]
%% The amssymb package provides various useful mathematical symbols
\usepackage{amssymb}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{multirow}
\usepackage{float}
\usepackage{amsmath}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{color}
\usepackage{subfigure}
\usepackage{fancyhdr}
\usepackage{epstopdf}
\pagestyle{fancy}
\usepackage{ulem}
\usepackage{bm}
\usepackage{amsopn}
\usepackage{amssymb,amsmath,color,times}
\usepackage{lineno}
\linespread{1.6}\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\renewcommand{\algorithmicrequire}{\textbf{Input:}} 
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\newcommand \argmin{\operatorname{arg\,min}} 
\newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}\newcommand\R{\mathbb{R}}
\newcommand{\llambda}{\boldsymbol{\lambda}}
\newcommand{\sign}{{\mbox{\rm sign}}}
\fancyhead[R]{\footnotesize\it\leftmark}
\fancyhead[L]{\footnotesize\it\rightmark} 
\bibliographystyle{model5-names} \journal{Computers \& Geosciences}
\begin{document}
\modulolinenumbers[1]
\linenumbers
\begin{frontmatter}%% Title, authors and addresses\title{Elsevier \LaTeX\ template\tnoteref{mytitlenote}}%% Group authors per affiliation:
\author{Elsevier\fnref{myfootnote}}
\address{Radarweg 29, Amsterdam}%% or include affiliations in footnotes:
\author[mymainaddress,mysecondaryaddress]{Elsevier Inc}\author[mysecondaryaddress]{Global Customer Service\corref{mycorrespondingauthor}}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{support@elsevier.com}\address[mymainaddress]{1600 John F Kennedy Boulevard, Philadelphia}
\address[mysecondaryaddress]{360 Park Avenue South, New York}\begin{abstract}
This template helps you to create a properly formatted \LaTeX\ manuscript.
\end{abstract}\begin{keyword}
\texttt{elsarticle.cls}\sep \LaTeX\sep Elsevier \sep template
\MSC[2010] 00-01\sep  99-00
\end{keyword}\end{frontmatter}%% \linenumbers %% main text
\section{Introduction}\section{Background}\section{Methodologies}\section{Evaluation and discussion}\section{Related work}\section{Conclusions}\section*{Acknowledgment}The research was funded by ministry of land and resources industry public welfare projects (No: 201511010-06).\section*{References}
\begin{thebibliography}{33} 
\bibitem{Kitchin2014}
Kitchin, R., 2014. Big Data, new epistemologies and paradigm shifts. Big Data and Society 1, 1-12.\end{thebibliography}%\begin{thebibliography}{00}%% \bibitem{label}
%% Text of bibliographic item%\bibitem{}%\end{thebibliography}
\end{document}
\endinput
%%
%% End of file `elsarticle-template-num.tex'.
- 展示
 
總結
以上是生活随笔為你收集整理的latex各个模块范例模板以及各种使用技巧的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 海边放松心情的说说句子101个
- 下一篇: Vmware 和 Windows 代理设
