发布网友 发布时间:2022-04-19 13:44
共1个回答
热心网友 时间:2023-10-25 02:56
documentclass[11pt,a4paper]{article}% documentclass[11pt,a4paper]{report}% documentclass[11pt,a4paper]{book}defmathfamilydefault{ mdefault}% 设置页面%==================================================linespread{1} %行距% usepackage[top=1in,bottom=1in,left=1.25in,right=1.25in]{geometry}% headsep=2cm% extwidth=16cm extheight=24.2cm%==================================================% 使用中文xeCJK宏包%==================================================usepackage{fontspec,xltxtra,xunicode}usepackage[slantfont,boldfont,CJKnumber,CJKtextspaces]{xeCJK}%==================================================% 其它需要使用的宏包%==================================================usepackage[colorlinks,linkcolor=blue,anchorcolor=red,citecolor=green,urlcolor=blue]{hyperref} usepackage{tabularx}usepackage{authblk} % 作者信息usepackage{algorithm} % 算法排版usepackage{amsmath} % 数学符号与公式usepackage{amsfonts} % 数学符号与字体usepackage{graphics}usepackage{color}usepackage{fancyhdr} % 设置页眉页脚usepackage{fancyvrb} % 抄录环境usepackage{float} % 管理浮动体usepackage{geometry} % 定制页面格式usepackage{hyperref} % 为PDF文档创建超链接usepackage{lineno} % 生成行号usepackage{listings} % 插入程序源代码usepackage{multicol} % 多栏排版usepackage{natbib} % 管理文献引用usepackage{rotating} % 旋转文字,图形,表格usepackage{subfigure} % 排版子图形usepackage{titlesec} % 改变章节标题格式usepackage{moresize} % 更多字体大小usepackage{anysize}usepackage{indentfirst} % 首段缩进usepackage{booktabs} % 使用multicolumnusepackage{multirow} % 使用multirowusepackage{graphicx} usepackage{wrapfig}usepackage{xcolor}usepackage{titlesec} % 改变标题样式usepackage{enumitem}%==================================================% 将默认的英文目录等改为中文,设置图号和公式号与章节对应,缩进大小%==================================================% itleformat{part}[display]{centeringHuge}{ extbf{第~ hepart~部分}}{0.2cm}{ extbf}% itleformat{chapter}[hang]{huge}{ extbf{第~ hechapter~章}}{0.2cm}{ extbf}% enewcommand{contentsname}{目 quad 录}% enewcommand{abstractname}{摘 quad 要}% enewcommand{appendixname}{附 quad 录}% enewcommand{ heequation}{arabic{section}.arabic{equation}} %公式号与章节对应% enewcommand{figurename}{ ormalsize{图 arabic{section}.arabic{figure}}} %改figure为图% enewcommand{ efname}{参考文献}% enewcommand{ibname}{参考文献}% makeatletter% enewcommand{fnum@figure}[1]{ extbf{figurename~}hspace{10pt} sffamily} %图号与章节对应% makeatothersetlength{parindent}{2em} %设置缩进为两个大写M的宽度,大约为两个汉字的宽度%==================================================% 设置页眉页脚%================================================== enewcommand{headrulewidth}{0.4pt} enewcommand{footrulewidth}{0.4pt}pagestyle{headings}% pagestyle{fancy}% lhead{}% chead{}% head{}% lfoot{}% cfoot{}% foot{}%==================================================% 加入VBA代码高亮%==================================================lstdefinelanguage{VBA}{morekeywords={And, As, Byte, Call, Case, Compare, CDbl, Datebase, Date, Dim, Else, ElseIf, End, Error, Exit, Explicit, False, Function, GoTo, If, IIF, Integer, Not, Nothing, Null, Object, On, Option, Or, Private, Resume, String, Single, Select, Set, Static, Sub, Then, True, To,},sensitive=false,morecomment=[l]Rem,morecomment=[l],morestring=[b]",emph={acFormBar, acEditMenu, acCurrent, acEntire, acMenuVer70, acSaveYes, acViewNormal, acForm, acDataErrAdded, acNewRec, acDataErrContinue, Cancel, CancelEvent, Close, CurrentDb, DefaultValue, DateValue, DAO, Description, DoCmd, DoMenuItem, Err, Error, Error$, $, Execute, FindRecord, Forms, FindFirst, IsNull, Me, MsgBox, GoToControl, GoToRecord, NewData, Nz, Maximize, Number, OpenForm, Parent, Recordset, Requery, Response, SetFocus, stDocName, stLinkCriteria, Value, vbExclamation, vbOK, vbOKCancel, vbInformation, vbYes, vbNo, vbYesNo, vbCancel, vbQuestion, vbYesNoCancel, Visible,},emphstyle=color{blue!100!}}%==================================================lstset{basicstyle= tfamily,breaklines,numberstyle= iny,keywordstyle=color{red}, stringstyle=color{green!100!},commentstyle=color{red!20!green!20!blue!20},frame=single,rulesepcolor=color{red!20!green!20!blue!20},numbers=left, numberstyle= iny} %==================================================% 设置中文字体%==================================================%setCJKmainfont[BoldFont=SimHei,ItalicFont=KaiTi]{SimSun}setCJKmainfont[BoldFont={Adobe Heiti Std}, ItalicFont={Adobe Kaiti Std}]{Adobe Song Std}%setCJKmainfont[BoldFont={STHeiti}, ItalicFont={STKaiti}]{STSong}%setCJKsansfont{SimHei}setCJKsansfont{Adobe Heiti Std}%setCJKsansfont{STHeiti}%setCJKmonofont{FangSong}setCJKmonofont{Adobe Fangsong Std}%setCJKmonofont{STFangsong}%-------------------------------------------------%setCJKfamilyfont{zhsong}{SimSun}setCJKfamilyfont{zhsong}{Adobe Song Std}%setCJKfamilyfont{zhsong}{STSong}%setCJKfamilyfont{zhhei}{SimHei}setCJKfamilyfont{zhhei}{Adobe Heiti Std}%setCJKfamilyfont{zhhei}{STHeiti}%setCJKfamilyfont{zhfs}{FangSong}setCJKfamilyfont{zhfs}{Adobe FangSong Std}%setCJKfamilyfont{zhfs}{STSong}%setCJKfamilyfont{zhkai}{KaiTi}setCJKfamilyfont{zhkai}{Adobe Kaiti Std}%setCJKfamilyfont{zhkai}{STKaiti}%------------------------------------------------- ewcommand*{songti}{CJKfamily{zhsong}} % 宋体 ewcommand*{heiti}{CJKfamily{zhhei}} % 黑体 ewcommand*{kaishu}{CJKfamily{zhkai}} % 楷书 ewcommand*{fangsong}{CJKfamily{zhfs}} % 仿宋% !使用如下命令:{songti 宋体} 可以临时使用宋体(要加大括号)%==================================================% 设置英文字体%==================================================%defaultfontfeatures{Scale=MatchLowercase} % 这个参数保证 serif、sans-serif 和 monospace 字体在小写时大小匹配setmainfont[Mapping=tex-text]{CMU Serif} % 使用 XeTeX 的 text-mapping 方案,正确显示 LaTeX 样式的双引号(`` )% setmainfont[Mapping=tex-text]{Palatino Linotype}setsansfont[Mapping=tex-text]{CMU Sans Serif}% setsansfont[Mapping=tex-text]{DejaVu Sans YuanTi}setmonofont{Courier New}% setmonofont{Monaco}% setmonofont{DejaVu Sans YuanTi}%==================================================% 题目,作者,日期%================================================== itle{}% Style 1% -------------------------------author[*]{author1}affil[*]{affil1}author[**]{author2}affil[**]{affil2}% Style 2% -------------------------------%author{author1}%affil{affil1}%author{author2}%affil{affil2}date{}%==================================================%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 正文%==================================================egin{document}% pagenumbering{Roman} %页码为大写罗马数字% pagenumbering{arabic} %页码为阿拉伯数字maketitle ewpage ableofcontents ewpageend{document}%==================================================%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%