Skip to content

Commit

Permalink
add support for survey in appendix
Browse files Browse the repository at this point in the history
fixes #343.
  • Loading branch information
zepinglee committed Dec 23, 2019
1 parent 9b20a6c commit 330db9d
Show file tree
Hide file tree
Showing 26 changed files with 393 additions and 325 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Added
- 新增 `survey`(调研阅读报告)和 `translation`(书面翻译)环境用于本科生的附录,
其中的参考文献引用独立于论文正文(#343)。

### Changed
- 重新设计 `\thusetup` 的接口。
- 指导教师的姓名和职称用英文逗号分开(#424)。
Expand All @@ -12,8 +16,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- 中英文摘分别用 `abstract``abstract*` 环境生成。
- 处理 `hyperref``unicode-math` 的兼容性问题。
- 修正本科生的文献引用样式。
- 附录使用 `\appendix` 命令开始,不再使用 `appendix` 环境。
- 修改 `shuji``spine`

## Removed
- 移除 `translationbib` 环境。

### Fixed
- 修正本科生目录章标题的字体。

Expand Down
113 changes: 10 additions & 103 deletions data/appendix01.tex → data/appendix-survey.tex
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
% !TeX root = ../main.tex

\chapter{外文资料原文}
\label{cha:engorg}
\begin{survey}
\label{cha:survey}

\title{The title of the English paper}
\title{Title of the Survey}
\maketitle

\textbf{Abstract:} As one of the most widely used techniques in operations
research, \emph{ mathematical programming} is defined as a means of maximizing a
quantity known as \emph{bjective function}, subject to a set of constraints
represented by equations and inequalities. Some known subtopics of mathematical
programming are linear programming, nonlinear programming, multiobjective
programming, goal programming, dynamic programming, and multilevel
programming$^{[1]}$.
写出至少 5000 外文印刷字符的调研阅读报告或者书面翻译 1-2 篇(不少于 2 万外文印刷符)。

It is impossible to cover in a single chapter every concept of mathematical
programming. This chapter introduces only the basic concepts and techniques of
programming.\cite{tex} This chapter introduces only the basic concepts and techniques of
mathematical programming such that readers gain an understanding of them
throughout the book$^{[2,3]}$.
throughout the book\cite{abrahams99tex,salomon1995advanced}.


\section{Single-Objective Programming}
Expand Down Expand Up @@ -171,95 +166,7 @@ \subsection{Integer Programming}

\hfill\textit{Uncertain Programming\/}\quad(\textsl{BaoDing Liu, 2006.2})

\section*{References}
\noindent{\itshape NOTE: These references are only for demonstration. They are
not real citations in the original text.}
\bibliographystyle{IEEEtran}
\bibliography{ref/refs,ref/appendix}

\begin{translationbib}
\item Donald E. Knuth. The \TeX book. Addison-Wesley, 1984. ISBN: 0-201-13448-9
\item Paul W. Abrahams, Karl Berry and Kathryn A. Hargreaves. \TeX\ for the
Impatient. Addison-Wesley, 1990. ISBN: 0-201-51375-7
\item David Salomon. The advanced \TeX book. New York : Springer, 1995. ISBN:0-387-94556-3
\end{translationbib}

\chapter{外文资料的调研阅读报告或书面翻译}

\title{英文资料的中文标题}

{\heiti 摘要:} 本章为外文资料翻译内容。如果有摘要可以直接写上来,这部分好像没有
明确的规定。

\section{单目标规划}
北冥有鱼,其名为鲲。鲲之大,不知其几千里也。化而为鸟,其名为鹏。鹏之背,不知其几
千里也。怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。
\begin{equation}\tag*{(123)}
p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
\frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})}
\end{equation}

吾生也有涯,而知也无涯。以有涯随无涯,殆已!已而为知者,殆而已矣!为善无近名,为
恶无近刑,缘督以为经,可以保身,可以全生,可以养亲,可以尽年。

\subsection{线性规划}
庖丁为文惠君解牛,手之所触,肩之所倚,足之所履,膝之所倚,砉然响然,奏刀騞然,莫
不中音,合于桑林之舞,乃中经首之会。
\begin{table}[ht]
\centering
\centering
\caption*{表~1\hskip1em 这是手动编号但不出现在索引中的一个表格例子}
\label{tab:badtabular3}
\begin{tabular}[c]{|m{1.5cm}|c|c|c|c|c|c|}\hline
\multicolumn{2}{|c|}{Network Topology} & \# of nodes &
\multicolumn{3}{c|}{\# of clients} & Server \\\hline
GT-ITM & Waxman Transit-Stub & 600 &
\multirow{2}{2em}{2\%}&
\multirow{2}{2em}{10\%}&
\multirow{2}{2em}{50\%}&
\multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3}
\multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline
\multirow{2}{1.5cm}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
& \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline
\end{tabular}
\end{table}

文惠君曰:“嘻,善哉!技盖至此乎?”庖丁释刀对曰:“臣之所好者道也,进乎技矣。始臣之
解牛之时,所见无非全牛者;三年之后,未尝见全牛也;方今之时,臣以神遇而不以目视,
官知止而神欲行。依乎天理,批大郤,导大窾,因其固然。技经肯綮之未尝,而况大坬乎!
良庖岁更刀,割也;族庖月更刀,折也;今臣之刀十九年矣,所解数千牛矣,而刀刃若新发
于硎。彼节者有间而刀刃者无厚,以无厚入有间,恢恢乎其于游刃必有余地矣。是以十九年
而刀刃若新发于硎。虽然,每至于族,吾见其难为,怵然为戒,视为止,行为迟,动刀甚微,
謋然已解,如土委地。提刀而立,为之而四顾,为之踌躇满志,善刀而藏之。”

文惠君曰:“善哉!吾闻庖丁之言,得养生焉。”


\subsection{非线性规划}
孔子与柳下季为友,柳下季之弟名曰盗跖。盗跖从卒九千人,横行天下,侵暴诸侯。穴室枢
户,驱人牛马,取人妇女。贪得忘亲,不顾父母兄弟,不祭先祖。所过之邑,大国守城,小
国入保,万民苦之。孔子谓柳下季曰:“夫为人父者,必能诏其子;为人兄者,必能教其弟。
若父不能诏其子,兄不能教其弟,则无贵父子兄弟之亲矣。今先生,世之才士也,弟为盗
跖,为天下害,而弗能教也,丘窃为先生羞之。丘请为先生往说之。”
\begin{figure}[h]
\centering
\includegraphics{thu-whole-logo.pdf}
\caption*{图~1\hskip1em 这是手动编号但不出现索引中的图片的例子}
\label{tab:badfigure3}
\end{figure}

柳下季曰:“先生言为人父者必能诏其子,为人兄者必能教其弟,若子不听父之诏,弟不受
兄之教,虽今先生之辩,将奈之何哉?且跖之为人也,心如涌泉,意如飘风,强足以距敌,
辩足以饰非。顺其心则喜,逆其心则怒,易辱人以言。先生必无往。”

孔子不听,颜回为驭,子贡为右,往见盗跖。

\subsection{整数规划}
盗跖乃方休卒徒大山之阳,脍人肝而餔之。孔子下车而前,见谒者曰:“鲁人孔丘,闻将军
高义,敬再拜谒者。”谒者入通。盗跖闻之大怒,目如明星,发上指冠,曰:“此夫鲁国之
巧伪人孔丘非邪?为我告之:尔作言造语,妄称文、武,冠枝木之冠,带死牛之胁,多辞缪
说,不耕而食,不织而衣,摇唇鼓舌,擅生是非,以迷天下之主,使天下学士不反其本,妄
作孝弟,而侥幸于封侯富贵者也。子之罪大极重,疾走归!不然,我将以子肝益昼餔之膳。”


\chapter{其它附录}
前面两个附录主要是给本科生做例子。其它附录的内容可以放到这里,当然如果你愿意,可
以把这部分也放到独立的文件中,然后将其 \cs{input} 到主文件中。
\end{survey}
96 changes: 96 additions & 0 deletions data/appendix-translation.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
% !TeX root = ../main.tex

\begin{translation}
\label{cha:translation}

\title{书面翻译题目}
\maketitle

\section{单目标规划}
北冥有鱼,其名为鲲。鲲之大,不知其几千里也。化而为鸟,其名为鹏。鹏之背,不知其几
千里也。怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。
\begin{equation}\tag*{(123)}
p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
\frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})}
\end{equation}

吾生也有涯,而知也无涯。以有涯随无涯,殆已!已而为知者,殆而已矣!为善无近名,为
恶无近刑,缘督以为经,可以保身,可以全生,可以养亲,可以尽年。

\subsection{线性规划}
庖丁为文惠君解牛,手之所触,肩之所倚,足之所履,膝之所倚,砉然响然,奏刀騞然,莫
不中音,合于桑林之舞,乃中经首之会。
\begin{table}[ht]
\centering
\centering
\caption*{表~1\hskip1em 这是手动编号但不出现在索引中的一个表格例子}
\label{tab:badtabular3}
\begin{tabular}[c]{|m{1.5cm}|c|c|c|c|c|c|}\hline
\multicolumn{2}{|c|}{Network Topology} & \# of nodes &
\multicolumn{3}{c|}{\# of clients} & Server \\\hline
GT-ITM & Waxman Transit-Stub & 600 &
\multirow{2}{2em}{2\%}&
\multirow{2}{2em}{10\%}&
\multirow{2}{2em}{50\%}&
\multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3}
\multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline
\multirow{2}{1.5cm}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
& \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline
\end{tabular}
\end{table}

文惠君曰:“嘻,善哉!技盖至此乎?”庖丁释刀对曰:“臣之所好者道也,进乎技矣。始臣之
解牛之时,所见无非全牛者;三年之后,未尝见全牛也;方今之时,臣以神遇而不以目视,
官知止而神欲行。依乎天理,批大郤,导大窾,因其固然。技经肯綮之未尝,而况大坬乎!
良庖岁更刀,割也;族庖月更刀,折也;今臣之刀十九年矣,所解数千牛矣,而刀刃若新发
于硎。彼节者有间而刀刃者无厚,以无厚入有间,恢恢乎其于游刃必有余地矣。是以十九年
而刀刃若新发于硎。虽然,每至于族,吾见其难为,怵然为戒,视为止,行为迟,动刀甚微,
謋然已解,如土委地。提刀而立,为之而四顾,为之踌躇满志,善刀而藏之。”

文惠君曰:“善哉!吾闻庖丁之言,得养生焉。”


\subsection{非线性规划}
孔子与柳下季为友,柳下季之弟名曰盗跖。盗跖从卒九千人,横行天下,侵暴诸侯。穴室枢
户,驱人牛马,取人妇女。贪得忘亲,不顾父母兄弟,不祭先祖。所过之邑,大国守城,小
国入保,万民苦之。孔子谓柳下季曰:“夫为人父者,必能诏其子;为人兄者,必能教其弟。
若父不能诏其子,兄不能教其弟,则无贵父子兄弟之亲矣。今先生,世之才士也,弟为盗
跖,为天下害,而弗能教也,丘窃为先生羞之。丘请为先生往说之。”
\begin{figure}[h]
\centering
\includegraphics{thu-whole-logo.pdf}
\caption*{图~1\hskip1em 这是手动编号但不出现索引中的图片的例子}
\label{tab:badfigure3}
\end{figure}

柳下季曰:“先生言为人父者必能诏其子,为人兄者必能教其弟,若子不听父之诏,弟不受
兄之教,虽今先生之辩,将奈之何哉?且跖之为人也,心如涌泉,意如飘风,强足以距敌,
辩足以饰非。顺其心则喜,逆其心则怒,易辱人以言。先生必无往。”

孔子不听,颜回为驭,子贡为右,往见盗跖。

\subsection{整数规划}
盗跖乃方休卒徒大山之阳,脍人肝而餔之。孔子下车而前,见谒者曰:“鲁人孔丘,闻将军
高义,敬再拜谒者。”谒者入通。盗跖闻之大怒,目如明星,发上指冠,曰:“此夫鲁国之
巧伪人孔丘非邪?为我告之:尔作言造语,妄称文、武,冠枝木之冠,带死牛之胁,多辞缪
说,不耕而食,不织而衣,摇唇鼓舌,擅生是非,以迷天下之主,使天下学士不反其本,妄
作孝弟,而侥幸于封侯富贵者也。子之罪大极重,疾走归!不然,我将以子肝益昼餔之膳。”


\nocite{abrahams99tex,salomon1995advanced}
\bibliographystyle{IEEEtran}
\bibliography{ref/appendix}

% 也可以使用 thebiliography 环境手写
% \begin{thebibliography}{2}
% \bibitem{abrahams99tex}
% P.~W. Abrahams, K.~Berry, and K.~A. Hargreaves, \emph{{\TeX} for the
% Impatient}.\hskip 1em plus 0.5em minus 0.4em\relax Addison-Wesley, 1990.

% \bibitem{salomon1995advanced}
% D.~Salomon, ``The advanced {\TeX}book.''\hskip 1em plus 0.5em minus 0.4em\relax
% New York: Springer, 1995.
% \end{thebibliography}


\end{translation}
15 changes: 8 additions & 7 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@

%% 本科生要这几个索引,研究生不要。选择性留下。
% 插图索引
\listoffigures
% \listoffigures
% 表格索引
\listoftables
% \listoftables
% 公式索引
\listofequations
% \listofequations


%% 参考文献
Expand All @@ -56,16 +56,17 @@
\statement

%% 附录
\begin{appendix}
\appendix
% 目录中只出现附录的章标题
\thusetup{toc-depth=0}
\input{data/appendix01}
\end{appendix}
\input{data/appendix-survey}
% \input{data/appendix-translation}

%% 个人简历
\input{data/resume}

%% 本科生进行格式审查是需要下面这个表格,答辩可能不需要。选择性留下。
% 综合论文训练记录表
\includepdf[pages=-]{scan-record.pdf}
% \includepdf[pages=-]{scan-record.pdf}

\end{document}
14 changes: 14 additions & 0 deletions ref/appendix.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@book{abrahams99tex,
author = {Paul W. Abrahams and Karl Berry and Kathryn A. Hargreaves},
title = {{\TeX} for the Impatient},
publisher = {Addison-Wesley},
year = {1990},
}

@incollection{salomon1995advanced,
author = {David Salomon},
title = {The advanced {\TeX}book},
address = {New York},
publisher = {Springer},
year = {1995},
}
2 changes: 1 addition & 1 deletion testfiles/03-abstract-bachelor.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Completed box being shipped out [1]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write3{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\116\055\145\207\144\ETC.}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\116\055\145\207\144\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
2 changes: 1 addition & 1 deletion testfiles/03-abstract.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Completed box being shipped out [1]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write3{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\144\130\211\201}{}%\ETC.}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\144\130\211\201}{}%\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
2 changes: 1 addition & 1 deletion testfiles/04-abstract-bachelor-en.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Completed box being shipped out [2]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write3{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\000A\000B\000S\000T\ETC.}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\000A\000B\000S\000T\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
2 changes: 1 addition & 1 deletion testfiles/04-abstract-en.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Completed box being shipped out [2]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write3{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\000A\000b\000s\000t\ETC.}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\000A\000b\000s\000t\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
2 changes: 1 addition & 1 deletion testfiles/05-toc.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Completed box being shipped out [3]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write3{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\166\356\137\125}{}%\ETC.}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\166\356\137\125}{}%\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
2 changes: 1 addition & 1 deletion testfiles/06-notation-nomencl/06-notation-nomencl.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Completed box being shipped out [8]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\116\073\211\201\173\ETC.}
....\write5{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\116\073\211\201\173\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
2 changes: 1 addition & 1 deletion testfiles/06-notation.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Completed box being shipped out [8]
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
....\special{pdf:dest (section*.1) [@thispage /XYZ @xpos @ypos null]}
....\write3{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\116\073\211\201\173\ETC.}
....\write4{\protect \BOOKMARK [0][]{thuchapter.1.0}{\376\377\116\073\211\201\173\ETC.}
....\special{pdf:dest (thuchapter.1.0) [@thispage /XYZ @xpos @ypos null]}
....\write1{\protect \FN@pp@footnotehinttrue }
....\write-{}
Expand Down
8 changes: 4 additions & 4 deletions testfiles/07-main-bachelor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ \section{原料结构变化趋势}
\appendix
\thusetup{toc-depth=0}

\chapter{外文资料的调研阅读报告}
\begin{survey}

\begin{center}
调研阅读报告题目
\end{center}
\title{调研阅读报告题目}
\maketitle

写出至少 5000 外文印刷字符的调研阅读报告或者书面翻译 1-2 篇(不少于 2 万外文印刷符)。

\end{survey}


\clearpage
Expand Down
Loading

0 comments on commit 330db9d

Please sign in to comment.