论文初稿模板,包含基本的设置小节,公式,插入图片,表格,文献,方便以后使用
环境:TeXlive + TeXstudio
TeXstudio的设置为:
Tex的目录内包含的东西:Tex文件本身,sample.bib(用于引文献),pic文件夹(用于存放图片)
\documentclass[a4paper]{article}
%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
%
%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage[numbers,sort&compress]{natbib}
\newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}}
\newcommand{\topcaption}{%
\setlength{\abovecaptionskip}{0pt}%
\setlength{\belowcaptionskip}{10pt}%
\caption} % 表格上标题修改
%_____________________________________________
\title{Your Paper}
\author{You}
\begin{document}
\maketitle
%_____________________________________________
\begin{abstract}
This is an abstract.
\end{abstract}
%_____________________________________________
\section{Introduction}
\autoref{eq.2} is a equation example.
\begin{equation}
RMSE(k)=RMSE(k)=\sqrt{\frac{\Sigma^{100}_{i=1}(\hat{x}+1)^2+(\hat{x_2}+1)^3}{k}}
\end{equation}\label{eq.2}
An other example about equation.
Let $f(x)$ be defined by the formula$$f(x)=3x^2+x-1$$ which is a polynomial of 2.
%_____________________________________________
\section{Methods}
%次标题
\subsection{AAA}
%更次标题
\subsubsection{BBB}
This is an example about how to insert \autoref{fig:rain}.
%插入图片
\begin{figure}
%图片剧中
\centering
%设置图片大小、位置
\includegraphics[width=8cm]{pic/1.png}
%设置图片lable、图片名称
\caption{\label{fig:rain}This frog was uploaded via the project menu.}
\end{figure}
%_____________________________________________
\section{byebye}
%插入文献
CN DOTA, BEST DOTA!\upcite{Menard2002Applied,Peduzzi1996A,Compton2002HABITAT}
%插入表格
\begin{table}[http]
%调整行距
\renewcommand{\arraystretch}{2}
%表格剧中
\centering
%设置表标题在上面
\topcaption{imlulation}
%设置label
\label{tab}
%表格具体内容
\begin{tabular}{cccll}
\hline \hline
good & bad & total \\ \hline
26 & 26 & 2559 \\
3 & d & dd \\ \hline \hline
\end{tabular}
\end{table}
%_____________________________________________
%插入文献,IEEEtran为格式,sample为.bib文件名
\bibliographystyle{IEEEtran}
\bibliography{sample}
\end{document}
LaTeX快速入门可看这里:【LaTeX】基本使用