表格在线工具:Create LaTeX tables online
公式在线工具:Online LaTeX Equation Editor
latex公式字符:Typora中利用LaTeX 插入数学公式
latex论文模板和其它:
学术指导:资源|最新国内大学毕业论文LaTex模板集合zhuanlan.zhihu.com![222c488bd4823cf9d05cdc3d0792c64c.png](https://img-blog.csdnimg.cn/img_convert/222c488bd4823cf9d05cdc3d0792c64c.png)
![8b65b372e1bbde7129875edc84932b2d.png](https://img-blog.csdnimg.cn/img_convert/8b65b372e1bbde7129875edc84932b2d.png)
- 基本布局和操作
- 页眉页脚
- 图片、表格、算法
- 字体、标题字体大小、颜色
- 公式
- 文献引用和链接
基本布局和操作
中文
documentclass[UTF8]{article}
usepackage{ctex}
包
usepackage{*}
title{。。}
author{。。}
date{today}
begin{document} %本文内容在这里面
maketitle %添加这一句才能够显示标题等信息
begin{abstract} %摘要
。。。
end{abstract}
%newpage %目录
%renewcommand{contentsname}{目录} %将content转为目录
%tableofcontents
section{..} %标题段落
subsection{..}
subsubsection{..}
end{document}
页面边距
usepackage{geometry}
geometry{a4paper,left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm}
renewcommand{abstractname}{LARGE 摘要} 摘要标题字体和边距
makeatletter
renewenvironment{abstract}{%
if@twocolumn
section*{abstractname}%
else
small
begin{center}%
{bfseries abstractnamevspace{-.5em}vspace{z@}}%
end{center}%
fi}{}
makeatother
par %段落结束
noindent %无缩进
换行
notag 公式无编号
页眉页脚
usepackage{fancyhdr}
thispagestyle{empty} %本页页码不显示
newpage %新页
setcounter{page}{1} %本页页码
% 设置页眉 (head)
fancyhead[RE]{leftmark} % 在偶数页的右侧显示章名
fancyhead[LO]{rightmark} % 在奇数页的左侧显示小节名
fancyhead[LE,RO]{~thepage~} % 在偶数页的左侧,奇数页的右侧显示页码
% 设置页脚:在每页的右下脚以斜体显示书名
fancyfoot[RO,RE]{it Typesetting with LaTeX}
renewcommand{headrulewidth}{0.7pt} % 页眉与正文之间的水平线粗细
renewcommand{footrulewidth}{0pt}
pagestyle{fancy} % 选用 fancy style
图片、表格、算法
图片
usepackage{graphicx}
begin{figure}%[h]代表图片就在当前位置
centering
includegraphics[width=.8textwidth]{./image/img_3.png}
caption{整体检测框架。}
label{fig3}%s表示用于引用
end{figure}
%多图usepackage{subfigure}
begin{figure}[htbp]
centering
subfigure[]{
begin{minipage}[t]{0.33linewidth}
centering
includegraphics[width=2in]{./image/img_71.eps}
%caption{fig1}
end{minipage}%
}%
subfigure[]{
begin{minipage}[t]{0.33linewidth}
centering
includegraphics[width=2in]{./image/img_72.eps}
end{minipage}%
}%
subfigure[]{
begin{minipage}[t]{0.33linewidth}
centering
includegraphics[width=2in]{./image/img_73.eps}
end{minipage}
}%
subfigure[]{
begin{minipage}[t]{0.33linewidth}
centering
includegraphics[width=2in]{./image/img_74.eps}
%caption{fig1}
end{minipage}%
}%
subfigure[]{
begin{minipage}[t]{0.33linewidth}
centering
includegraphics[width=2in]{./image/img_75.eps}
end{minipage}%
}%
subfigure[]{
begin{minipage}[t]{0.33linewidth}
centering
includegraphics[width=2in]{./image/img_76.eps}
end{minipage}
}%
caption{检测方法在实验数据上的ROC曲线}
label{fig7}
end{figure}
三线表格usepackage{booktabs}
newcommand{tabincell}[2]{begin{tabular}{@{}#1@{}}#2end{tabular}} %一格多行命令
begin{table*}
centering
caption{基准方法详细参数设置}
begin{tabular}{ccc} % 控制表格的格式
toprule
检测方法 & 简写 & 参数设置
midrule
bottomrule
end{tabular}
label{table2}
end{table*}
ADMM算法
usepackage{algorithm}
usepackage{algorithmic}
floatname{algorithm}{算法}
renewcommand{algorithmicrequire}{textbf{输入:}}
renewcommand{algorithmicensure}{textbf{输出:}}
begin{algorithm}
caption{ADMM}
begin{algorithmic}[1]
% 输入
REQUIRE $matrix enspace D,Win R^{mtimes n},lambda>0.$
STATE $B_0=D;T_0=0;Y_0=0;rho_0>0;,mugeq1; k=0.$
WHILE{not converged}
STATE $(U,S,V)=svd(D-T_k-frac{1}{rho_k}Y_k).$
STATE $B_{k+1}=U mathcal{S}_{rho_k^{-1}}(S)V^{T}.$
STATE $T_{k+1}=mathcal{S}_{lambdarho_k^{-1}bigodot W}(D-B_{k+1}-frac{1}{rho_k}Y_k).$
STATE$Y_{k+1}=Y_k+rho_k(B_{k+1}+T_{k+1}-D).$
STATE$rho_{k+1}=murho_k.$
STATE$k=k+1.$
ENDWHILE
ENSURE $B=B_k;T=T_k.$
end{algorithmic}
end{algorithm}
普通字体、改变原来的section和subsection字体大小
%latex 内部
%{normalsize } 五号 {large } 小四 {Large }四号 {LARGE } 三号 Latex默认字体为五号
CJKfamily{song}%CJKfamily{hei} 个别字用{CJKfamily{song}宋体}
newcommand{song}{CJKfamily{song}} % 宋体
newcommand{xiaosi}{fontsize{12pt}{18pt}selectfont}% 小四, 1.5倍行距
%newcommand{xiaosi}{fontsize{12pt}{12pt}selectfont}% 小四, 1倍行距
%需要使用的时候加上 songxiaosi 命令 songfontsize{12pt}{18pt}
改变原来的section和subsection字体大小
titleformat*{subsubsection}{largebfseries}
titleformat*{subsection}{Largebfseries}
titleformat*{section}{LARGEbfseries}
颜色
usepackage{color}
{color{red} text}
或者 textcolor[rgb]{1,0,0}{text}
公式
行内
$...$
普通公式
begin{equation}
||D_i-B_i-T_i||_Fleqslant delta_i,i=1,2,..k
end{equation}
多行公式
begin{gather}
A = g(I_xodot I_x,mu) notag
B = g(I_yodot I_y,mu) notag
end{gather}
换行公式
begin{equation}begin{split}
。&。。。
&...
end{split}end{equation}
文献引用和链接
第一种方式
begin{thebibliography}{50}
bibitem{ref1}Rogalski A. Recent progress in inf
bibitem{ref2}Jinxiang F, Jianyu Y. Development trends of inf
end{thebibliography}
cite{} %引用文献
ref{} %引用表格图片
usepackage{hyperref} %s显示颜色并转为超链接
hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=blue,
citecolor=cyan,
}
第二种方式
1 创建BibTex文件:ref.bib
2 添加引用文章的内容:
@Inbook{Wille1982,author="Wille, Rudolf",editor="Rival, Ivas of Concepts",bookTitl}
3 在Latex文档里面添加cite包
4 添加引用配置 %显示位置处
bibliographystyle{plain}
bibliography{ref}
5 Step5:添加引用 cite{}
6 生成PDF的过程;
用Latex编译Latex文档;
用BibTex编译bib文档;
在用Latex编译Latex文档;
通过dviPDF查看PDF。
href{http://v.youku.com/}{Youku video} %链接