Skip to content

Commit

Permalink
fix: style thesis hnu: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
annProg committed Sep 2, 2019
1 parent 32fc22e commit 816b7e5
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 10 deletions.
27 changes: 17 additions & 10 deletions styles/thesis/hnu/example.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@
\usepackage{lipsum}
\usepackage{hyperref}

\title{论文题目}
\etitle{Thesis Title}
\subtitle{论文副标题}
\esubtitle{Thesis Subtitle}
\author{张\ 三}
\xuehao{20190713021}
\college{计算机学院}
\supervisor{\LaTeX{}~~教授}
\date{2019 年 7 月 12 日}
\hnusetup{
ctitle={论文题目},
etitle={Thesis Title},
cauthor={张\ 三},
cnumber={20190713021},
cdepartment={计算机学院},
cclassname={人工智能1502},
csupervisor={XXX},
cheadmaster={XXX},
cdate={2019 年 6 月},
ckeywords={TeX, LaTeX, CJK, 模版, 论文, 怪学校},
ekeywords={TeX, LaTeX, CJK, template, thesis, weirdschool},
}

\input{style/cover.sty}
\input{style/abstract.sty}

\begin{document}
\frontmatter
\maketitle
\makecover

\begin{abstract}{c}{\LaTeX{},排版,论文}
\zhlipsum[1]
Expand Down
Binary file added styles/thesis/hnu/figures/hnu_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added styles/thesis/hnu/figures/hnu_gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added styles/thesis/hnu/figures/hnu_title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions styles/thesis/hnu/style/abstract.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

\newenvironment{abstract}[2]{
\def\invalue{#1}
\def\english{e}
\def\keyword{#2}
% 论文题目
\begin{center}
\heiti\xiaosan\ctitle \\
\vspace{1em}
\heiti\sanhao
\ifx\invalue\english
{Abstract} \\
\else
{摘~~~~~~要} \\

\fi
\vspace{1em}
\end{center}
\songti\xiaosi
}{
\vspace{1em}\\
\heiti\sihao
\ifx\invalue\english{}
Key Words:
\else
关键词:
\fi
\keyword
\cleardoublepage
}
7 changes: 7 additions & 0 deletions styles/thesis/hnu/style/chapter.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

\newenvironment{mchapter}[1]{
\thispagestyle{fancy}
\chapter{#1}
}{
\clearpage
}
53 changes: 53 additions & 0 deletions styles/thesis/hnu/style/cover.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

% TODO: 湖南大学标题文字错位
% 文本太细

\def\tablecontentwidth{7.5cm}
\def\tablecontentheight{1em}

\newcommand{\biaoti}{\fontsize{48pt}{\baselineskip}\selectfont}

\newcommand\makecover{
\begin{titlepage}
\begin{figure}[thb]
\centering
\includegraphics[width=7cm]{figures/hnu_title}
\end{figure}
\vspace{-0.5cm}

\begin{figure}[hbt]
\centering
\includegraphics[width=11cm]{figures/hnu_gray}
\end{figure}

\centering
\makebox[0pt][c]{
\raisebox{7.3cm}[0pt][0pt]{
\songti\biaoti{毕业设计(论文)}
}
}
% \begin{tabular}[hbt]{rc}
% \xiaoer\heiti\textbf{设计论文题目:}&\sihao\underline{\makebox[\tablecontentwidth][l]{\ctitle}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% &\sihao\underline{\makebox[\tablecontentwidth][l]{\coversectitle}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% \sihao\heiti{学~生~姓~名:}&\sihao\song\underline{\makebox[\tablecontentwidth][l]{\cauthor}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% \sihao\heiti{学~生~学~号:}&\sihao\song\underline{\makebox[\tablecontentwidth][l]{\cnumber}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% \sihao\heiti{专~业~班~级:}&\sihao\song\underline{\makebox[\tablecontentwidth][l]{\cclassname}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% \sihao\heiti{学~院~名~称:}&\sihao\song\underline{\makebox[\tablecontentwidth][l]{\cdapartment}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% \sihao\heiti{指~导~老~师:}&\sihao\song\underline{\makebox[\tablecontentwidth][l]{\csupervisor}} \\
% \specialrule{0em}{\tablecontentheight}{0pt}
% \sihao\heiti{学~院~院~长:}&\sihao\song\underline{\makebox[\tablecontentwidth][l]{\cheadmaster}} \\
% \end{tabular}
% \begin{figure}[b]
% \centering
% \sihao\songti{\makebox[\tablecontentwidth][c]{\cdate}}
% \end{figure}
\cleardoublepage
\thispagestyle{empty}
\end{titlepage}
}

0 comments on commit 816b7e5

Please sign in to comment.