Skip to content

Commit

Permalink
Added support for more pro tables and inline list strcuture and fixed…
Browse files Browse the repository at this point in the history
… little typoes.
  • Loading branch information
CptGit committed Jun 7, 2018
1 parent 8147191 commit e249932
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 23 deletions.
34 changes: 28 additions & 6 deletions BUPTthesisbachelor.sty
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
\newcommand{\coverdatefont}{\songti\sanhao\bf} % 封面上的日期的字体
\newcommand{\statetitlefirst}{\songti\xiaosanhao\bf} %诚信声明标题第一行的字体
\newcommand{\statetitlesecond}{\songti\xiaosanhao\bf} %诚信声明标题第二行的字体
\newcommand{\abscnname}{\heiti\xiaosanhao\textbf} % 中文“摘要”字样的字体
\newcommand{\abscnkey}{\heiti\xiaosihao\textbf} % 中文摘要“关键字”字样的字体
\newcommand{\abscnkeys}{\songti\xiaosihao\normalfont} % 中文摘要关键字的字体
\newcommand{\abszhname}{\heiti\xiaosanhao\textbf} % 中文“摘要”字样的字体
\newcommand{\abszhkey}{\heiti\xiaosihao\textbf} % 中文摘要“关键字”字样的字体
\newcommand{\abszhkeys}{\songti\xiaosihao\normalfont} % 中文摘要关键字的字体
\newcommand{\absenname}{\xiaosanhao\textbf} % 英文``Abstract''字样的字体
\newcommand{\absenkey}{\xiaosihao\textbf} % 英文``KEY WORDS''字样的字体
\newcommand{\absenkeys}{\xiaosihao\normalfont} % 英文关键字的字体
Expand Down Expand Up @@ -106,7 +106,22 @@
\usepackage[xetex, pdfstartview=FitH,
bookmarksnumbered=true, bookmarksopen=true, colorlinks=true,
pdfborder=001, linkcolor=black, citecolor=black, urlcolor=black]{hyperref}
\pdfstringdefDisableCommands{ % eliminate warnings about non-string commands not supported in PDF bookmarks. If you use more commands in section titles or chapter titles, you can add them here.
% Deal with line breaking in url
\makeatletter
\def\UrlAlphabet{%
\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j%
\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t%
\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D%
\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N%
\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%
\do\Y\do\Z}
\def\UrlDigits{\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\g@addto@macro{\UrlBreaks}{\UrlAlphabet}
\g@addto@macro{\UrlBreaks}{\UrlDigits}
\makeatother
% Eliminate warnings about non-string commands not shown in PDF bookmarks. If you use more commands in section titles or chapter titles, you can add the commands here.
\pdfstringdefDisableCommands{
\def \quad{}
\def \qquad{}
}
Expand Down Expand Up @@ -239,7 +254,8 @@ pdfborder=001, linkcolor=black, citecolor=black, urlcolor=black]{hyperref}
% Usage: \begin{bupttable}{caption}{label}
% <normal table>
% \end{bupttable}
\usepackage{multirow} % multirow and multicolumn
\usepackage{array,booktabs,multirow} % multirow, multicolumn and more professional format support
\usepackage{tabularx} % deal with text wrapping in tables
\newenvironment{bupttable}[2]{%
\begin{table}[!htbp]%
\centering%
Expand Down Expand Up @@ -319,4 +335,10 @@ pdfborder=001, linkcolor=black, citecolor=black, urlcolor=black]{hyperref}
\if@openright\cleardoublepage\else\clearpage\fi%
\@mainmatterfalse%
\pagestyle{empty}}%
\makeatother%
\makeatother%

% List environment config
\usepackage[inline]{enumitem}
% Uncomment the two lines below if you want an list environment to share the same indent with a paragraph and no extra blank before, in or after the list.
%\setlist[itemize]{labelindent=\parindent,leftmargin=*,noitemsep,topsep=0pt}
%\setlist[enumerate]{labelindent=\parindent,leftmargin=*,noitemsep,topsep=0pt,label={\arabic*)}} % Modify the label format by yourself if you do not like 1), 2), ... here.
12 changes: 6 additions & 6 deletions abstract.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
% 如果你足够聪明,不具有LaTeX基础也可以完成。

% 中文摘要
\def\abstractcn{
\def\abstractzh{
%从这里开始写你的摘要,分段需要空一行。
这是中文摘要的部分。

Expand All @@ -38,11 +38,11 @@

% 中文关键字
% TODO: 改成可变长度的
\def\abscnkeyone{北京邮电大学}
\def\abscnkeytwo{本科生}
\def\abscnkeythree{毕业设计}
\def\abscnkeyfour{模板}
\def\abscnkeyfive{示例}
\def\abszhkeyone{北京邮电大学}
\def\abszhkeytwo{本科生}
\def\abszhkeythree{毕业设计}
\def\abszhkeyfour{模板}
\def\abszhkeyfive{示例}

% ABSTRACT
\def\abstracten{
Expand Down
18 changes: 9 additions & 9 deletions abstract.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
\begin{spacing}{1.5}
\centering
\sanhao\quad{} \\
\abscnname{摘\quad{}要} \\
\abszhname{摘\quad{}要} \\
\end{spacing}
\xiaosanhao\quad{}

\normalsize

\abstractcn
\abstractzh


\quad{}

\abscnkey{关键词}\quad{}%
\abscnkeys{\abscnkeyone\quad{}%
\abscnkeytwo\quad{}%
\abscnkeythree\quad{}%
\abscnkeyfour\quad{}%
\abscnkeyfive}%
\abszhkey{关键词}\quad{}%
\abszhkeys{\abszhkeyone\quad{}%
\abszhkeytwo\quad{}%
\abszhkeythree\quad{}%
\abszhkeyfour\quad{}%
\abszhkeyfive}%
\end{titlepage}

\thispagestyle{empty}
Expand All @@ -68,7 +68,7 @@
\begin{spacing}{1.5}
\centering
\sanhao\quad{} \\
\abscnname{ABSTRACT} \\
\abszhname{ABSTRACT} \\
\end{spacing}
\xiaosanhao\quad{}
\normalsize
Expand Down
Binary file modified main.pdf
Binary file not shown.
25 changes: 23 additions & 2 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ \section{图表及其引用}
\end{tabular}
\end{bupttable}

此处展示了更专业的表\ref{tab:abbr_table},一个好的表格没有竖线。
% 请注意1)tabularx环境对多行文本的处理;2)booktabs宏包中支持的更粗的顶端和底端表格边界线,边界线与文本间更大的间距。
\begin{bupttable}{红警2名词解释}{tab:abbr_table}
\begin{tabularx}{\textwidth}{llX}
\toprule
\textbf{术语类别} & \textbf{缩略语} & \textbf{解释} \\ \midrule
& 兵营 & 兵营(Barracks),《命令与征服\ 红色警戒2:尤里的复仇》游戏中的一种生产建筑,用以生产步兵单位 \\ \cmidrule(l){2-3}
& 建造场 & 建造场(Construction Yard),《命令与征服\ 红色警戒2:尤里的复仇》游戏中的一种基础建筑,用以支持其他建筑的建造 \\ \cmidrule(l){2-3}
& 矿厂 & 矿石精炼厂(Ore Refinery),《命令与征服\ 红色警戒2:尤里的复仇》游戏中的一种资源建筑,用以将矿车采集的矿石转化为游戏资金 \\ \cmidrule(l){2-3}
游戏 & 空指 & 空指部(Airforce Command Headquarters),《命令与征服\ 红色警戒2:尤里的复仇》游戏中的一种资源建筑,用以提供雷达功能和T2科技及生产部分空军单位 \\ \cmidrule(l){2-3}
& 相机 & 游戏术语,特指游戏内的观察区域和视角 \\ \cmidrule(l){2-3}
& 重工 & 战车工厂(War Factory),《命令与征服\ 红色警戒2:尤里的复仇》游戏中的一种生产建筑,用以生产载具单位 \\ \cmidrule(l){2-3}
& 战争迷雾 & 游戏术语,《命令与征服\ 红色警戒2:尤里的复仇》中指黑色的未探索区域 \\ \bottomrule
\end{tabularx}
\end{bupttable}

此处引用了一张图。图\ref{autoencoder}表示的是一个由含有4个神经元的输入层、含有3个神经元的隐藏层和含有4个神经元的输出层组成的自编码器,$+1$代表偏置项。

Expand Down Expand Up @@ -257,6 +272,12 @@ \section{列表样式}
\item \textbf{第二章为不存在},是的,其实它不存在。
\end{enumerate}

以下是句中列表样式。
\begin{enumerate*}
\item \textbf{第一章为基础模块示例},是的,就是本章;
\item \textbf{第二章为不存在},是的,其实它不存在。
\end{enumerate*}

以下是无项目符号(实际是可以自定义一些符号,但我懒得加了)的列表样式,它会顶格书写。

\begin{description}
Expand Down Expand Up @@ -397,7 +418,7 @@ \section*{1.1\quad{}概述}
新的社交网络技术在使信息的传播速度变快和规模变大的同时,也便利了不实信息(即不准确或有误导性的信息)的传播。然而,尽管我们对信息和新闻的获取越来越多地收到这些新技术的引导,但我们仍然对他们在虚假信息传播上的作用知之甚少。尽管媒体对假新闻传播的轶事分析给予了相当多的关注,但仍然几乎没有针对不实信息扩散或其发布源头的大规模实证调查。目前,虚假信息传播的研究仅仅局限于小的、局部的样本的分析上,而这些分析忽略了两个最重要的科学问题:真实信息和虚假信息的传播有什么不同?哪些人类判断中的因素可以解释这些不同?

\begin{equation}
\label{PCA_goal}
\label{PCA_goal_appx1}
\begin{aligned}
\max_{\substack{\bm{W}}} & tr(\bm{W}^\mathrm{T}\bm{X}\bm{X}^ \mathrm{T}\bm{W})
\end{aligned}
Expand All @@ -415,7 +436,7 @@ \chapter*{第二章\quad{}我也不知道是什么}
新的社交网络技术在使信息的传播速度变快和规模变大的同时,也便利了不实信息(即不准确或有误导性的信息)的传播。然而,尽管我们对信息和新闻的获取越来越多地收到这些新技术的引导,但我们仍然对他们在虚假信息传播上的作用知之甚少。尽管媒体对假新闻传播的轶事分析给予了相当多的关注,但仍然几乎没有针对不实信息扩散或其发布源头的大规模实证调查。目前,虚假信息传播的研究仅仅局限于小的、局部的样本的分析上,而这些分析忽略了两个最重要的科学问题:真实信息和虚假信息的传播有什么不同?哪些人类判断中的因素可以解释这些不同?

\begin{equation}
\label{PCA_goal}
\label{PCA_goal_appx2}
\begin{aligned}
\max_{\substack{\bm{W}}} & tr(\bm{W}^\mathrm{T}\bm{X}\bm{X}^ \mathrm{T}\bm{W})
\end{aligned}
Expand Down

0 comments on commit e249932

Please sign in to comment.