主文件:
1 documentclass[12pt,a4paper]{report} 2 usepackage{amsmath} 3 usepackage{amsfonts} 4 usepackage{amssymb} 5 usepackage{makeidx} 6 usepackage[dvipdfmx]{graphicx} 7 usepackage{titlesec} 8 usepackage{float} 9 usepackage[dvipsnames,prologue,table]{pstricks} 10 usepackage{pstricks-add} 11 usepackage{pst-all} 12 usepackage{pst-grad} 13 usepackage{lipsum} 14 usepackage{xcolor} 15 %-------------------------------------------------------------------- 16 % 超链接 17 %-------------------------------------------------------------------- 18 usepackage[colorlinks,linkcolor=blue,anchorcolor=green,citecolor=red]{hyperref} 19 %-------------------------------------------------------------------- 20 % 重定义 21 %-------------------------------------------------------------------- 22 itleformat{chapter}{huge center f}{第\, hechapter\,章}{1em}{}[vspace{-1cm}] 23 enewcommandcontentsname{目录} 24 enewcommandlistfigurename{图形目录} 25 enewcommandlisttablename{表格目录} 26 enewcommandindexname{索引} 27 enewcommandfigurename{图} 28 enewcommandtablename{表} 29 enewcommandabstractname{摘要} 30 enewcommandpartname{部分} 31 enewcommandappendixname{附录} 32 enewcommandbibname{参考文献} 33 34 %-------------------------------------------------------------------- 35 % 代码插入 36 %-------------------------------------------------------------------- 37 38 usepackage{listings} 39 lstset{ %Settings for listings package. 40 language={C++}, 41 backgroundcolor=color{white}, 42 basicstyle=footnotesize, 43 breakatwhitespace=false, 44 breaklines=true, 45 captionpos=b, 46 commentstyle=color{red}, 47 directivestyle=color{blue}, 48 extendedchars=false, 49 frame=single,%shadowbox,% 50 framerule=1pt, 51 keywordstyle=color{blue}fseries, 52 morekeywords={*,define,*,include...}, 53 numbersep=5pt, 54 rulesepcolor=color{red!20!green!20!blue!20}, 55 showspaces=false, 56 showstringspaces=false, 57 showtabs=false, 58 stepnumber=1, 59 stringstyle=color{brown}, 60 tabsize=4, 61 title=lstname 62 } 63 ewtheorem{definition}{hspace{2em} textbf 定义}[chapter] 64 65 %-------------------------------------------------------------------- 66 % 页边距设置 67 %-------------------------------------------------------------------- 68 usepackage[left=2cm,right=2cm,top=2cm,bottom=2.7cm]{geometry} 69 70 %-------------------------------------------------------------------- 71 % 参考文献风格 72 %-------------------------------------------------------------------- 73 74 bibliographystyle{unsrt} 75 %-------------------------------------------------------------------- 76 % 中文支持 77 %-------------------------------------------------------------------- 78 usepackage[AutoFakeBold=true]{xeCJK} 79 setCJKmainfont{新宋体} 80 %-------------------------------------------------------------------- 81 % 1.5倍行距 82 %-------------------------------------------------------------------- 83 linespread{1.5} 84 %-------------------------------------------------------------------- 85 % 文档基本信息 86 %-------------------------------------------------------------------- 87 author{zhangcheng} 88 itle{ extbf huge XXXX} 89 90 begin{document} 91 %-------------------------------------------------------------------- 92 % 封面 93 %-------------------------------------------------------------------- 94 maketitle 95 %-------------------------------------------------------------------- 96 % 目录 97 %-------------------------------------------------------------------- 98 tableofcontents 99 %-------------------------------------------------------------------- 100 % 图形目录 101 %-------------------------------------------------------------------- 102 listoffigures 103 %-------------------------------------------------------------------- 104 % 表格列表 105 %-------------------------------------------------------------------- 106 listoftables 107 %-------------------------------------------------------------------- 108 % 内容 109 %-------------------------------------------------------------------- 110 input{content.tex} 111 %-------------------------------------------------------------------- 112 % 参考文献 113 %-------------------------------------------------------------------- 114 bibliography{regbib} 115 116 end{document}
参考文献:
使用JabRef 管理文献索引,JabRef可以导入常用格式的引文,如常用的EndNote,JabRef可以导出BibTex格式。对中文文献而言,有多个作者时,格式不正确,使用python脚本进行转换,脚本点击此处下载。
文件的编译过程为:xelatex bibtex xelatex python xelatex.
使用Makefile文件进行编译:(主文件名为Reg.tex)
1 Reg.pdf:Reg.aux 2 echo -------------------------------------------------------------- 3 bibtex Reg.aux 4 echo -------------------------------------------------------------- 5 xelatex Reg.tex 6 python3 bib2zh.py Reg.bbl 7 echo -------------------------------------------------------------- 8 xelatex Reg.tex 9 evince Reg.pdf 10 Reg.aux: 11 echo -------------------------------------------------------------- 12 xelatex Reg.tex 13 14 clean: 15 rm *.aux 16 rm *.bbl 17 rm *.blg 18 rm *.lof 19 rm *.lot 20 rm *.out 21 rm Reg.pdf 22 rm *.toc
插入列表:
1 %有编号列表 2 begin{enumerate} 3 item 1 4 item 2 5 end{enumerate} 6 7 %无编号列表 8 begin{itemize} 9 item 1 10 item 2 11 end{itemize}