Skip to content

Commit

Permalink
支持自动添加PDF元数据
Browse files Browse the repository at this point in the history
  • Loading branch information
note286 committed Jan 1, 2022
1 parent 4dc635b commit 764cfcf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -77,6 +77,7 @@ xdupgtp-Xidian University Postgraduate Thesis Proposal

# 版本记录

- `2022-01-01` [`v0.5.0`](https://github.com/note286/xdupgtp/releases/tag/v0.5.0) 支持自动添加PDF元数据。
- `2022-01-01` [`v0.4.1`](https://github.com/note286/xdupgtp/releases/tag/v0.4.1) 配置\subsubsection{}样式。
- `2022-01-01` [`v0.4.0`](https://github.com/note286/xdupgtp/releases/tag/v0.4.0) 支持国内外研究现状引用参考文献。
- `2022-01-01` [`v0.3.0`](https://github.com/note286/xdupgtp/releases/tag/v0.3.0) 新增专业学位硕士研究生模板。
Expand Down
44 changes: 26 additions & 18 deletions xdupgtp.cls
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{xdupgtp}[2022/01/01 Xidian University Postgraduate Thesis Proposal class, v0.4.1, created by @note286, published in https://note286.github.io/xdupgtp/]
\ProvidesClass{xdupgtp}[2022/01/01 Xidian University Postgraduate Thesis Proposal class, v0.5.0, created by @note286, published in https://note286.github.io/xdupgtp/]

% 学术学位博士研究生 Doctor of Academic
\newif\ifda\datrue
Expand Down Expand Up @@ -59,6 +59,30 @@
\RequirePackage[sort&compress,square,super,comma]{natbib}
\setlength{\bibsep}{0pt}

% 设置PDF元数据
\ifda
\newcommand\xdupgtptitle{博士学位论文开题报告表}
\else
\ifdp
\newcommand\xdupgtptitle{专业学位博士学位论文开题报告表}
\else
\ifma
\newcommand\xdupgtptitle{硕士学位论文开题报告表}
\else
\ifmp
\newcommand\xdupgtptitle{专业学位硕士学位论文开题报告表}
\fi
\fi
\fi
\fi
\BeforeBeginEnvironment{document}{
\hypersetup{
pdftitle={\thesisTitleOne\thesisTitleTwo},
pdfauthor={\authorName},
pdfsubject={西安电子科技大学\xdupgtptitle}
}
}

% 设置页面样式为空
\pagestyle{empty}

Expand Down Expand Up @@ -132,23 +156,7 @@
\zihao{3}
\bfseries
\makebox[11em][s]{西安电子科技大学}\\
{\zihao{-2}\heiti
\ifda
博士学位论文开题报告表
\else
\ifdp
专业学位博士学位论文开题报告表
\else
\ifma
硕士学位论文开题报告表
\else
\ifmp
专业学位硕士学位论文开题报告表
\fi
\fi
\fi
\fi
}
{\zihao{-2}\heiti\xdupgtptitle}
\end{center}
\vspace{65pt}
% 论文题目
Expand Down

0 comments on commit 764cfcf

Please sign in to comment.