各种宏包:
必备宏包:
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{float}
\usepackage{multirow}
\usepackage{array}
设置字号且book类型适合单面打印:
\documentclass[11pt, oneside]{book}
在目录中显示chapter:
\usepackage{titletoc}
\titlecontents*{chapter}% <section-type>
[0pt]% <left>
{\addvspace{1em}}% <above-code>
{\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
{}% <numberless-entry-format>
{\bfseries\hfill\contentspage}% <filler-page-format>
页边距:
\usepackage{geometry}
\geometry{left=3.8cm, right=2.5cm, top=2.5cm, bottom=2.5cm}
取消段前空格:
\setlength{\parindent}{0pt}
显示section标号为x.x:
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
设置字体:
\usepackage{fontspec}
\setmainfont{Arial}
设置全局行间距为1.5倍:
\renewcommand{\baselinestretch}{1.5}
引用的格式:
\bibliographystyle{IEEEtran}
chapter的格式:
\usepackage[Sonny]{fncychap}
页码置于最底部
扫描二维码关注公众号,回复:
8669081 查看本文章
\usepackage{fancyhdr}
\pagestyle{plain} % 此处为fancy时有页眉
\lfoot{}
插入图片路径:
\usepackage{graphicx}
\graphicspath{{figures/}, {pics/}}
设置图片、表格等标题的大小:
\usepackage{caption}
\captionsetup{font={scriptsize}}
关于标题:
\usepackage{titlesec}
\titleformat{\chapter}[block]{\LARGE \bfseries}{Chapter \arabic{chapter}}{1em}{}[]
\titlespacing{\chapter}{0pt}{-2pt}{2pt}
\titleformat{章节命令}[形状]{格式}{标题序号}{序号与标题间距}{标题前命令}[标题后命令]
\titlespacing*{章节命令}{左边距}{上文距}{下文距}[右边距]
将Book类型中的Bibliography改成Reference:
\renewcommand{\bibname}{Reference}
改变文献引用行距和字体大小:
\usepackage{setspace}
\begin{spacing}{1.00}
\small
\bibliographystyle{IEEEtran}
\bibliography{cite}
\end{spacing}
插入左右排列的两张子图片:
\usepackage{subfigure}
\begin{figure}[H]
\centering
\subfigure[Accuracy rate without AE]{\includegraphics[width=2in]{convergence}}
\subfigure[Accuracy rate with AE]{\includegraphics[width=2in]{convergence_AE}}
\caption{Accuracy rate}
\label{accuracy_rate}
\end{figure}
插入附录:
\begin{appendices}
\renewcommand{\thechapter}{\Alph{chapter}.}
\chapter*{Appendix A - Calculation process in CONV layer}
\begin{figure}[H]
\centering
\includegraphics[scale=0.5]{CONV}
\caption{Calculation in CONV}\label{CONV}
\end{figure}
\chapter*{Secondappendix}
somemoretext
\end{appendices}
让参考文献出现在目录栏:
\begin{spacing}{1.00}
\small
\bibliographystyle{IEEEtran}
\clearpage
\bibliography{cite}
\end{spacing}
\addcontentsline{toc}{chapter}{Reference} % 必须在spacing环境外