天津大学硕士毕业论文LaTeX模板初探

您所在的位置:网站首页 latex设置行间距 天津大学硕士毕业论文LaTeX模板初探

天津大学硕士毕业论文LaTeX模板初探

2022-12-29 14:44| 来源: 网络整理| 查看: 265

做什么事都是东一榔头西一棒槌的我,在时隔一年半之后终于搞了一个《天津大学硕士毕业论文》LaTeX模板出来! 虽然还不算完美,但是还算凑合。主文件

主文件是编译的主入口,导言区(宏的引入、格式设置)、章节内容等都通过include包含进来,这一步大大增加了文件的可读性

\documentclass[twoside,a4paper,AutoFakeBold,12pt]{ctexbook} \include{setup/package.tex} \include{setup/setting.tex} \begin{document} % cover \include{data/cover.tex} % 独创性声明 \include{data/declare.tex} % 摘要 \include{data/Abstract.tex} % 目录 \include{data/Toc.tex} % 设置正文页码 \setcounter{page}{1} \pagenumbering{arabic} % 正文页码从1开始 % 设置页眉页脚 \pagestyle{fancy} % 第一章 \include{Chapter/Chapter1.tex} % 第二章 \include{Chapter/Chapter2.tex} % 第三章 \include{Chapter/Chapter3.tex} % 第四章 \include{Chapter/Chapter4.tex} % 引用 \addcontentsline{toc}{part}{参考文献} % 添加到目录中 \fancyhead[CO]{\wuhao\song 参考文献} \bibliographystyle{unsrt} \bibliography{Bibtex} % 发表论文和参加科研情况说明 \include{data/achievement.tex} % 致谢 \include{data/acknowledgement.tex} \end{document}各部分组成Chapter 指定不同章节的内容data 存放摘要、致谢、成果、cover、声明、TOCfig 用于存放图片setup 用于存放宏文件、设置Bibtex.bib用于存放参考文献tju.tex 主文件TOC\pagestyle{plain} % 摘要有页脚 \tableofcontents \newpage

使用\tableofcontents生成TOC,同时使用\pagestyle{plain}设置该页只有页脚,没有页眉 (empty页脚页眉均为空,plain , headings 页脚为空, myheadings 页眉为页码及\markboth 和\markright 命令手动指定的内容,页脚为空。)

格式设置% 设置字体 \setmainfont{Times New Roman} \setCJKmainfont{SimSun} % 设置段落行间距 \renewcommand{\baselinestretch}{1.67} %两倍行距 \setlength{\parindent}{2em} % 首行缩进 \setlength{\parskip}{0pt} % 段落前后间距0 % 设置页面、页边距 \geometry{paperwidth=210mm, paperheight=297mm} \geometry{top=27.5mm,bottom=25.4mm, left=35.7mm, right=37.7mm} \newcommand{\song}{\songti} % 宋体 \newcommand{\fs}{\fangsong} % 仿宋体 \newcommand{\kai}{\kaishu} % 楷体 \newcommand{\hei}{\heiti} % 黑体 \newcommand{\li}{\lishu} % 隶书 \newcommand{\yihao}{\fontsize{26pt}{26pt}\selectfont} % 一号, 单倍行距 \newcommand{\xiaoyi}{\fontsize{24pt}{24pt}\selectfont} % 小一, 单倍行距 \newcommand{\erhao}{\fontsize{22pt}{1.25\baselineskip}\selectfont} % 二号, 1.25倍行距 \newcommand{\xiaoer}{\fontsize{18pt}{18pt}\selectfont} % 小二, 单倍行距 \newcommand{\sanhao}{\fontsize{16pt}{16pt}\selectfont} % 三号, 单倍行距 \newcommand{\xiaosan}{\fontsize{15pt}{15pt}\selectfont} % 小三, 单倍行距 \newcommand{\sihao}{\fontsize{14pt}{14pt}\selectfont} % 四号, 单倍行距 \newcommand{\xiaosi}{\fontsize{12pt}{12pt}\selectfont} % 小四, 单倍行距 \newcommand{\wuhao}{\fontsize{10.5pt}{10.5pt}\selectfont} % 五号, 单倍行距 \newcommand{\xiaowu}{\fontsize{9pt}{9pt}\selectfont} % 小五, 单倍行距 \newcommand{\Chapter}[1]{\fancypagestyle{plain}{\pagestyle{fancy}}\chapter{#1}} % 使用\Chapter代替\chapter 用以显示页眉 \makeatletter \newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt} %设置下划线长度 \makeatother \renewcommand{\chaptermark}[1]{\markboth{第\,\thechapter\,章\,#1}{}} % 设置中文页眉样式 \renewcommand\arraystretch{1.3} % 表格两倍行高 % 设置标题深度 \setcounter{secnumdepth}{4} % 章标题设置(一级标题) \titleformat{\chapter}{\centering\xiaosan\hei}{第\,\thechapter\,章}{1em}{} \titlespacing{\chapter}{0pt}{30pt plus 6pt}{30pt plus 6pt} % 二级标题 \titleformat{\section}{\sihao\hei}{\thesection}{1em}{} \titlespacing{\section}{0pt}{18pt plus 6pt}{18pt plus 6pt} % 三级标题 \titleformat{\subsection}{\sihao\hei}{\thesubsection}{1em}{} \titlespacing{\subsection}{0pt}{12pt plus 3 pt}{12pt plus 3pt} % 四级标题 \titleformat{\subsubsection}{\xiaosi\hei}{\thesubsubsection}{1em}{} \titlespacing{\subsubsection}{0pt}{9pt plus 3pt}{9pt plus 3pt} % 设置目录 \titlecontents{part}[0em] {\song\xiaosi} {\contentslabel{0em}} {} {~\titlerule*[0.6pc]{$.$}~\contentspage} \titlecontents{chapter}[3em] {\song\xiaosi} % 标题格式 {\contentslabel{3.5em}} % 标题标志 (设置标题标志的格式,如序号格式、序号宽度、序号与标题内容之间的间距等,不可空置) {} % 无序号标题 (设置无序号标题的格式,如字体、字体尺寸、位置等。该参数可以空置) {~\titlerule*[0.6pc]{$.$}~\contentspage} % 指引线与页码 (设置标题与页码之间的指引线样式以及页码的格式,该参数如果空置,标题将无指引线和页码) \titlecontents{section}[3em] {\song\xiaosi} {\contentslabel{1.5em}} {\hspace*{-4em}} {~\titlerule*[0.6pc]{$.$}~\contentspage} \titlecontents{subsection}[5em] {\song\xiaosi} {\contentslabel{2.3em}} {\hspace*{-4em}} {~\titlerule*[0.6pc]{$.$}~\contentspage} \titlecontents{subsubsection}[7em] {\song\xiaosi} {\contentslabel{3.1em}} {\hspace*{-4em}} {~\titlerule*[0.6pc]{$.$}~\contentspage} % 设置目录章标题 \ctexset{ chapter={ number=\arabic{chapter}, tocline=\CTEXifname{\protect\numberline{第 \thechapter 章}}{}#2 } } % 设置目录显示深度 \setcounter{tocdepth}{4} % 设置页眉 \pagestyle{fancy} \fancyhf{} % 偶数页页眉 \fancyhead[CO]{\leftmark} \fancyhead[CE]{\wuhao\song 天津大学硕士学位论文} \renewcommand{\headrulewidth}{0.1mm} % 设置页眉线粗细 % 页脚 \fancyfoot[C]{\color{gray}\xiaowu \thepage} % 设置图编号 \renewcommand{\thefigure}{\thechapter-\arabic{figure}} \captionsetup[figure]{labelsep=space} % 设置caption格式 \captionsetup{font={normalsize,stretch=2}, justification=raggedright} % 设置表 \captionsetup[table]{labelsep=space,position=above} \renewcommand{\thetable}{\thechapter-\arabic{table}} % 表标题命令 \newcommand{\ctable}[2]{ \vspace{-2em} \caption{#1} \vspace{-1.5em} \addtocounter{table}{-1} \renewcommand{\tablename}{Table.} \caption{#2} \vspace*{-1em} } % 图标题命令 \newcommand{\cfigure}[2]{ \vspace{-2em} \caption{#1} \vspace{-1em} \addtocounter{figure}{-1} \renewcommand{\figurename}{Fig.} \caption{#2} } % 重命名参考文献上标 % \biboptions{sort&compress} % 连续引用多篇文献,压缩排序 \newcommand{\ccite}[1]{\textsuperscript{\cite{#1}}}缺点

目前楷体的加粗问题还没有解决

参考链接

https://blog.csdn.net/qq_36758914/article/details/104496650

https://blog.csdn.net/yq_forever/article/details/113827837

https://blog.csdn.net/songyuc/article/details/80197006

https://mathpretty.com/13753.html

https://zhuanlan.zhihu.com/p/360188228

https://blog.csdn.net/gsgbgxp/article/details/124510269

https://blog.csdn.net/lovehuishouzan/article/details/127072670

https://blog.csdn.net/moonlightwin/article/details/124671548

https://zhuanlan.zhihu.com/p/111368138

https://blog.csdn.net/programchangesworld/article/details/51582271

https://www.cnblogs.com/picassooo/p/16339274.html



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3