以下是我的个人论文模板,运行环境为Xelatex(在线ide:Sharelatex.com)
鉴于本人常有插入程序的需求,故引用了lstlisting
RequirePackage{ifxetex} ifxetex documentclass[hyperref, UTF8, c5size, no-math, winfonts,a4paper]{ctexart} punctstyle{quanjiao} defaultfontfeatures{Mapping=tex-text} setCJKmainfont[AutoFakeBold=false, ItalicFont=FandolKai]{FandolSong} setCJKsansfont[AutoFakeBold=false]{FandolHei} setCJKmonofont{FandolFang} else documentclass[hyperref, UTF8, c5size, winfonts]{ctexart} usepackage[colorlinks,linkcolor=black]{hyperref} fi %documentclass[bachelor,openany,oneside,color]{buaathesis} usepackage{CJKspace} usepackage{CJKutf8} usepackage{amssymb} usepackage{amsmath} usepackage{listings} usepackage{xcolor} usepackage{graphicx} usepackage{geometry} usepackage{cite} itle{ \ \ \ \ 我的论文} author{\ \ 北京航空航天大学计算机学院 黄铎 \ 学号 : XXXXXXXX \ \ 指导教师:XXX} %date{2016 年 11 月 %sharelatex Version usepackage[left=2.4cm,right=2.4cm,top=2.9cm,bottom=2.4cm]{geometry} %texide Version %geometry{left=2.4cm,right=2.4cm,top=2.9cm,bottom=2.4cm} lstset{ numbers=left, basicstyle=small, numberstyle= small, keywordstyle= color{ blue!70},commentstyle=color{red!50!green!50!blue!50}, frame=shadowbox, rulesepcolor= color{ red!20!green!20!blue!20} } egin{document} %标题绘制 includegraphics[scale=0.55]{favicon_large_black.png} maketitle ewpage pagestyle{plain} %摘要 enewcommand{abstractname}{LARGE 中文摘要} egin{abstract} large XXXX 是 XXXX。 ormalsize end{abstract} extbf{large 关键词: 词1} \ \ \ enewcommand{abstractname}{LARGE English Abstract} egin{abstract} large XXXX is XXXX. ormalsize end{abstract} extbf{large Keywords : kwd1} clearpage %目录 ableofcontents clearpage %内容 section{第一章} ewpage %参考文献 egin{thebibliography}{0} ibitem{e-wiki} ext{维基百科, href{https://en.wikipedia.org/wiki/E\_(mathematical\_constant)}{e(mathematical constant) - Wikipedia}} ibitem{pi-wiki} ext{维基百科, href{https://en.wikipedia.org/wiki/Pi}{pi - Wikipedia}} end{thebibliography} ewpage ewpage end{document}