Skip to content

Commit

Permalink
支持插入手写日期图像
Browse files Browse the repository at this point in the history
  • Loading branch information
note286 committed Jan 10, 2022
1 parent 1fafdb2 commit e49c9f0
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 17 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,24 @@ Texmaker内置了PDF查看器,支持正向同步和反向同步功能,具体

由于部分用户线上进行开题,教师无法现场手写签名,故支持签名图像替代手写签名。

用户需要自行制作好签名图像,推荐处理成字迹全黑且背景透明,并以`.png`格式存储。此外需要将图片四周的空白裁掉,尽量减小字迹与四周的间距。用户在主目录新建`figures`文件夹,将准备好的签名图像放入其中
用户需要自行制作好签名图像,推荐处理成字迹全黑且背景透明,并以`.png`格式存储。此外需要将图片四周的空白裁掉,尽量减小字迹与四周的间距。将准备好的签名图像放入`figures/sign/`

用户在`xdupgtp.tex`中将签名图像相关的以`\renewcommand`开头的语句取消注释,现场手写签名的保持注释状态即可。每个签名图像使用`\sign{}`添加,其中分组内为签名图像文件名,无需扩展名且无需路径。此外,对于线上线下相结合的开题形式,支持使用`\emptysign`来留出现场手写签名的位置。

---

此外,如果需要打印好再线下填写日期,保持日期相关语句注释状态不变即可。如果需要插入日期手写图像,将对应的日期插入语句取消注释即可,如

```latex
\renewcommand\cyqmrq{\sign{lisidate}}
```

如果需要插入电子版的日期,将对应的日期插入语句取消注释即可,如

```latex
\renewcommand\cyqmrq{2022年1月10日}
```

# 模板来源

所有模板均参照[西安电子科技大学研究生院/研究生工作部](https://gr.xidian.edu.cn/xwsy/zlxz.htm)提供的Microsoft Word模板进行开发,建议用户使用前下载最新的Microsoft Word模板,对比MD5是否有变化,如有变化可以提issue请求更新模板,如无变化,可以检查下XeLaTeX模板与Microsoft Word模板是否一致。
Expand All @@ -474,6 +488,7 @@ Texmaker内置了PDF查看器,支持正向同步和反向同步功能,具体

# 版本记录

- `2022-01-10` [`v0.9.0`](https://github.com/note286/xdupgtp/releases/tag/v0.9.0) 支持插入手写日期图像。
- `2022-01-09` [`v0.8.0`](https://github.com/note286/xdupgtp/releases/tag/v0.8.0) 支持插入图表。
- `2022-01-03` [`v0.7.4`](https://github.com/note286/xdupgtp/releases/tag/v0.7.4) 适配旧版gbt7714。
- `2022-01-03` [`v0.7.3`](https://github.com/note286/xdupgtp/releases/tag/v0.7.3) 支持URL自动断行。
Expand Down
Binary file added figures/sign/lisi.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 figures/sign/lisidate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 11 additions & 6 deletions xdupgtp.cls
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{xdupgtp}[2022/01/09 Xidian University Postgraduate Thesis Proposal class, v0.8.0, created by @note286, published in https://note286.github.io/xdupgtp/]
\ProvidesClass{xdupgtp}[2022/01/10 Xidian University Postgraduate Thesis Proposal class, v0.9.0, created by @note286, published in https://note286.github.io/xdupgtp/]

% 学术学位博士研究生 Doctor of Academic
\newif\ifda\datrue
Expand Down Expand Up @@ -78,7 +78,7 @@
\setlength{\bibsep}{0pt}
% 签名图片
\RequirePackage{graphicx}
\graphicspath{{figures/}}
\graphicspath{{figures/}{figures/sign/}}
% 浮动标题
\RequirePackage[labelsep=quad]{caption}
\setlength{\abovecaptionskip}{6bp}
Expand Down Expand Up @@ -145,6 +145,11 @@
\newcommand\zdjsqm{}
\newcommand\xnjsqm{}
\newcommand\xyjsqm{}
% 定义手写日期命令
\newcommand\cyqmrq{年\qquad\qquad 日}
\newcommand\zdjsqmrq{年\qquad\qquad 日}
\newcommand\xnjsqmrq{年\qquad\qquad 日}
\newcommand\xyjsqmrq{年\qquad\qquad 日}

% 设置页面样式为空
\pagestyle{empty}
Expand Down Expand Up @@ -663,7 +668,7 @@
\addtolength{\zzcyqmWidth}{-1em}
组长签名:\makebox[\zzcyqmWidth][l]{\zzqm}\\
成员签名:\makebox[\zzcyqmWidth][l]{\cyqm}\\
\qquad\qquad
\cyqmrq
\end{mybox2}}

\ifadegree
Expand All @@ -678,7 +683,7 @@
\par}
{\tcblower\linespread{1}\fontsize{12}{30}\selectfont
指导教师签名:\makebox[6em][l]{\zdjsqm}\\
\qquad\qquad
\zdjsqmrq
\end{mybox2}}
\else
\NewEnviron{jsyj}{}
Expand All @@ -698,7 +703,7 @@
\par}
{\tcblower\linespread{1}\fontsize{12}{30}\selectfont
校内导师签名:\makebox[6em][l]{\xnjsqm}\\
\qquad\qquad
\xnjsqmrq
\end{mybox4}}
\fi

Expand All @@ -716,6 +721,6 @@
\par}
{\tcblower\linespread{1}\fontsize{12}{30}\selectfont
校外导师签名:\makebox[6em][l]{\xyjsqm}\\
\qquad\qquad
\xyjsqmrq
\end{mybox4}}
\fi
27 changes: 17 additions & 10 deletions xdupgtp.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,23 @@
% 技术论文
\newcommand\thesisType{技术报告}
% 签名图像
% 组长签名
% \renewcommand\zzqm{\sign{sign1}}
% 成员签名
% \renewcommand\cyqm{\sign{sign2}\sign{sign3}\emptysign\sign{sign4}}
% 指导教师签名 学术学位研究生
% \renewcommand\zdjsqm{\sign{sign1}}
% 校内导师签名 专业学位研究生
% \renewcommand\xnjsqm{\sign{sign2}}
% 校外导师签名 专业学位研究生
% \renewcommand\xyjsqm{\sign{sign3}}
% 组长成员签名及日期
% \renewcommand\zzqm{\sign{lisi}}
% \renewcommand\cyqm{\sign{lisi}\sign{lisi}\emptysign\sign{lisi}}
% \renewcommand\cyqmrq{\sign{lisidate}}
% \renewcommand\cyqmrq{2022年1月10日}
% 指导教师签名及日期 学术学位研究生
% \renewcommand\zdjsqm{\sign{lisi}}
% \renewcommand\zdjsqmrq{\sign{lisidate}}
% \renewcommand\zdjsqmrq{2022年1月10日}
% 校内导师签名及日期 专业学位研究生
% \renewcommand\xnjsqm{\sign{lisi}}
% \renewcommand\xnjsqmrq{\sign{lisidate}}
% \renewcommand\xnjsqmrq{2022年1月10日}
% 校外导师签名及日期 专业学位研究生
% \renewcommand\xyjsqm{\sign{lisi}}
% \renewcommand\xyjsqmrq{\sign{lisidate}}
% \renewcommand\xyjsqmrq{2022年1月10日}

\begin{document}

Expand Down

0 comments on commit e49c9f0

Please sign in to comment.