\documentclass[12pt,a4paper]{article} %12pt,即小四号,a4纸
\usepackage[top=1in,bottom=1in,left=1.25in,right=1.15in]{geometry}
%设置页面边距,word中默认上边距=1in(2.54cm),下边距=1in,左边距=1.25in(3.17cm),右边距=1.25in
南京理工大学本科毕业论文Latex模板
我自己的论文还在编辑中,写完后会把用到的代码写在这里,以及制作一份模板上传。
导言区:
\usepackage[BoldFont,SlantFont,CJKnumber,CJKchecksingle]{xeCJK} %中文xeCJK宏包
\setCJKmainfont{Adobe Song Std} %我用的Adobe的宋体,可换成系统自带的微软宋体SimSun
\setCJKfamilyfont{kai}{KaiTi_GB2312} %楷体
\setCJKfamilyfont{hei}{Adobe Heiti Std} %黑体 微软的为SimHei
\setCJKfamilyfont{title}{FZXiaoBiaoSong-B05S} %方正小标宋体,教务处word模板标题使用的字体
%关于字体问题不同的系统可能不同
\usepackage[colorlinks,linkcolor=black,citecolor=black,pdfstartview=FitH]{hyperref} % hyperref宏包,目录等超链接
\usepackage{fancyhdr} %设置页眉页脚
\usepackage{lastpage}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\renewcommand{\subsectionmark}[1]{\markboth{#1}{}}
\fancypagestyle{plain}
\fancyhead{}
%由于教务处的模板中外文摘要与正文的页眉不同,所以具体的内容在相应的部分再写出
\renewcommand{\contentsname}{\centerline{目 \quad 次}} %中文目录标题,教务处模板为“目次”(好奇快)
\usepackage{graphicx} %插图
\usepackage{subfigure} %并排插图
\renewcommand{\figurename}{图}
\renewcommand{\baselinestretch}{1.5} %1.5倍行间距
\setlength{\parindent}{24pt} %段首空两格
\usepackage{titletoc} %定义目录
\titlecontents{section}[0pt]{}{\thecontentslabel \quad}{}{\titlerule*[5pt]{$\cdot$} \contentspage}
\titlecontents{subsection}[0pt]{}{\thecontentslabel \hspace{.5em}}{}{\titlerule*[5pt]{$\cdot$} \contentspage}
\setcounter{tocdepth}{2} %目录级别,只显示2级目录
\usepackage[super,square]{natbib} %参考文献引用
\renewcommand{\refname}{\centerline{参考文献}}
\usepackage{tabu,xcolor}
%表格,我使用tabu宏包制作表格,主要就是在制作封面时用到,话说南理工的本科论文封面好变态,不过更变态的是中外文摘要的格式(吐槽一下~)。
\usepackage[font=small]{caption}
\captionsetup{figurewithin=section}
%论文使用的是article文档类型,这里让图片的编号按照section编号,并且使caption的字体比正文小一点
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}
\newcommand{\xiaosanhao}{\fontsize{15pt}{\baselineskip}\selectfont}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}
%代码来自网上,将pt与word的字号对应,主要也是制作封面时方便与教务处的word模板对应
\newcommand{\sanshihao}{\fontsize{30pt}{\baselineskip}\selectfont}
\newcommand{\sishiwuhao}{\fontsize{45pt}{\baselineskip}\selectfont}
%大标题用的30和45号字,我猜的就是30pt和40pt,效果看来是这样,哈哈。所有字号对照下载页面有下载
\usepackage{textcomp} %摄氏度 正文中使用\textcelsius命令显示摄氏度符号。我写论文时用到了,可能会有用。
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}} %公式编号安section显示为1.1的形式
\usepackage{fancybox}
\usepackage{tikz}
%用来画中外文摘要的那个框的,想不通为什么要用个框框起来,网上可以找到一个南理工前辈的博士Latex模板就很正常,不知是就本科这样还是现在都这样(这个必须吐槽一下)。
\newenvironment{kuang}
{\fancyput(0cm,-25.5cm){
\tikz \draw(0.5,1) rectangle (1.5cm+\textwidth,2.0cm+\textheight);}}
{\thisfancyput(0cm,-25.5cm){
\tikz \draw(0.5,1) rectangle (1.5cm+\textwidth,2.0cm+\textheight);}}
%还是中外文摘要那个框,定义了一个名字为kuang的新环境,这样可以不论摘要有多少页都自动画出那个框来而不影响正文。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 以上是导言区,我写论文所用到的宏包和一些全局性的设置。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\input{section/cover} %封面文件
\pagenumbering{roman} %正文之前采用罗马数字编号页码
\thispagestyle{empty}
\vspace*{2ex} %教务处模板要求目录要空两行
\tableofcontents %生成目录
\include{section/zhaiyao-ch} %中文摘要
\include{section/zhaiyao-en} %外文摘要
\fancyhf{} %设置正文页眉页脚
\fancyhead[EC,OC]{\xiaoerhao{ 本科毕业设计说明书(论文)}}
\fancyhead[ER,OR]{\wuhao{ 第 \thepage 页 \quad 共 \pageref{LastPage} 页}}
\fancyfoot{}
\setlength{\headheight}{20pt}
\renewcommand{\headrulewidth}{1pt}
\pagenumbering{arabic} %正文用阿拉伯数字编号页码
\include{section/1} %第一章
\input{section/2} %第二章
\input{section/3} %第三章
\input{section/4} %第四章
\include{section/jielun} %结论
\include{section/zhixie} %致谢
%参考文献
\bibliographystyle{GBT7714-2005NLang-UTF8} %参考文献样式 下载页面有下载,
\newpage
\vspace*{2ex} %同目录一样的要求,空两行
\bibliography{paper} %参考文献文件
\addcontentsline{toc}{section}{参考文献} %在目录中添加“参考文献”的标记
\nocite{*} %将未引用的文献也列出。你懂的。
\end{document}