diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7da40b --- /dev/null +++ b/.gitignore @@ -0,0 +1,310 @@ +xdyy-usermanual.cls +*-usermanual.pdf +*-test.pdf +*-example.pdf +*-v* +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb +*.hd +*.zip +*.tmp + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib +师姐开题报告/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c564ca2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# 更新日志 + +## 仓库地址 + +Github:https://github.com/whutug/whu-proposal +Gitee:https://gitee.com/xkwxdyy/whu-proposal + + +## [v0.1] - 2023-05-21 + +### Added + +- 新增硕博开题报告模版 +- 合并本科生模版 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2244313 --- /dev/null +++ b/LICENSE @@ -0,0 +1,416 @@ +The LaTeX Project Public License +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +LPPL Version 1.3c 2008-05-04 + +Copyright 1999 2002-2008 LaTeX3 Project + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + + +PREAMBLE +======== + +The LaTeX Project Public License (LPPL) is the primary license under +which the LaTeX kernel and the base LaTeX packages are distributed. + +You may use this license for any work of which you hold the copyright +and which you wish to distribute. This license may be particularly +suitable if your work is TeX-related (such as a LaTeX package), but +it is written in such a way that you can use it even if your work is +unrelated to TeX. + +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', +below, gives instructions, examples, and recommendations for authors +who are considering distributing their works under this license. + +This license gives conditions under which a work may be distributed +and modified, as well as conditions under which modified versions of +that work may be distributed. + +We, the LaTeX3 Project, believe that the conditions below give you +the freedom to make and distribute modified versions of your work +that conform with whatever technical specifications you wish while +maintaining the availability, integrity, and reliability of +that work. If you do not see how to achieve your goal while +meeting these conditions, then read the document `cfgguide.tex' +and `modguide.tex' in the base LaTeX distribution for suggestions. + + +DEFINITIONS +=========== + +In this license document the following terms are used: + + `Work' + Any work being distributed under this License. + + `Derived Work' + Any work that under any applicable law is derived from the Work. + + `Modification' + Any procedure that produces a Derived Work under any applicable + law -- for example, the production of a file containing an + original file associated with the Work or a significant portion of + such a file, either verbatim or with modifications and/or + translated into another language. + + `Modify' + To apply any procedure that produces a Derived Work under any + applicable law. + + `Distribution' + Making copies of the Work available from one person to another, in + whole or in part. Distribution includes (but is not limited to) + making any electronic components of the Work accessible by + file transfer protocols such as FTP or HTTP or by shared file + systems such as Sun's Network File System (NFS). + + `Compiled Work' + A version of the Work that has been processed into a form where it + is directly usable on a computer system. This processing may + include using installation facilities provided by the Work, + transformations of the Work, copying of components of the Work, or + other activities. Note that modification of any installation + facilities provided by the Work constitutes modification of the Work. + + `Current Maintainer' + A person or persons nominated as such within the Work. If there is + no such explicit nomination then it is the `Copyright Holder' under + any applicable law. + + `Base Interpreter' + A program or process that is normally needed for running or + interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these + are not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `LaTeX-Format' or in the case of files belonging to the + `LaTeX-format' a program implementing the `TeX language'. + + + +CONDITIONS ON DISTRIBUTION AND MODIFICATION +=========================================== + +1. Activities other than distribution and/or modification of the Work +are not covered by this license; they are outside its scope. In +particular, the act of running the Work is not restricted and no +requirements are made concerning any offers of support for the Work. + +2. You may distribute a complete, unmodified copy of the Work as you +received it. Distribution of only part of the Work is considered +modification of the Work, and no right to distribute such a Derived +Work may be assumed under the terms of this clause. + +3. You may distribute a Compiled Work that has been generated from a +complete, unmodified copy of the Work as distributed under Clause 2 +above, as long as that Compiled Work is distributed in such a way that +the recipients may install the Compiled Work on their system exactly +as it would have been installed if they generated a Compiled Work +directly from the Work. + +4. If you are the Current Maintainer of the Work, you may, without +restriction, modify the Work, thus creating a Derived Work. You may +also distribute the Derived Work without restriction, including +Compiled Works generated from the Derived Work. Derived Works +distributed in this manner by the Current Maintainer are considered to +be updated versions of the Work. + +5. If you are not the Current Maintainer of the Work, you may modify +your copy of the Work, thus creating a Derived Work based on the Work, +and compile this Derived Work, thus creating a Compiled Work based on +the Derived Work. + +6. If you are not the Current Maintainer of the Work, you may +distribute a Derived Work provided the following conditions are met +for every component of the Work unless that component clearly states +in the copyright notice that it is exempt from that condition. Only +the Current Maintainer is allowed to add such statements of exemption +to a component of the Work. + + a. If a component of this Derived Work can be a direct replacement + for a component of the Work when that component is used with the + Base Interpreter, then, wherever this component of the Work + identifies itself to the user when used interactively with that + Base Interpreter, the replacement component of this Derived Work + clearly and unambiguously identifies itself as a modified version + of this component to the user when used interactively with that + Base Interpreter. + + b. Every component of the Derived Work contains prominent notices + detailing the nature of the changes to that component, or a + prominent reference to another file that is distributed as part + of the Derived Work and that contains a complete and accurate log + of the changes. + + c. No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original version + of the Work, provide any support, including (but not limited to) + the reporting and handling of errors, to recipients of the + Derived Work unless those persons have stated explicitly that + they do provide such support for the Derived Work. + + d. You distribute at least one of the following with the Derived Work: + + 1. A complete, unmodified copy of the Work; + if your distribution of a modified component is made by + offering access to copy the modified component from a + designated place, then offering equivalent access to copy + the Work from the same or some similar place meets this + condition, even though third parties are not compelled to + copy the Work along with the modified component; + + 2. Information that is sufficient to obtain a complete, + unmodified copy of the Work. + +7. If you are not the Current Maintainer of the Work, you may +distribute a Compiled Work generated from a Derived Work, as long as +the Derived Work is distributed to all recipients of the Compiled +Work, and as long as the conditions of Clause 6, above, are met with +regard to the Derived Work. + +8. The conditions above are not intended to prohibit, and hence do not +apply to, the modification, by any method, of any component so that it +becomes identical to an updated version of that component of the Work as +it is distributed by the Current Maintainer under Clause 4, above. + +9. Distribution of the Work or any Derived Work in an alternative +format, where the Work or that Derived Work (in whole or in part) is +then produced by applying some process to that format, does not relax or +nullify any sections of this license as they pertain to the results of +applying that process. + +10. a. A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause 6 above, in regard to the Work, though it does not have + to honor the rest of the conditions in this license. + + b. If a Derived Work is distributed under a different license, that + Derived Work must provide sufficient documentation as part of + itself to allow each recipient of that Derived Work to honor the + restrictions in Clause 6 above, concerning changes from the Work. + +11. This license places no restrictions on works that are unrelated to +the Work, nor does this license place any restrictions on aggregating +such works with the Work by any means. + +12. Nothing in this license is intended to, or may be used to, prevent +complete compliance by all parties with all applicable laws. + + +NO WARRANTY +=========== + +There is no warranty for the Work. Except when otherwise stated in +writing, the Copyright Holder provides the Work `as is', without +warranty of any kind, either expressed or implied, including, but not +limited to, the implied warranties of merchantability and fitness for a +particular purpose. The entire risk as to the quality and performance +of the Work is with you. Should the Work prove defective, you assume +the cost of all necessary servicing, repair, or correction. + +In no event unless required by applicable law or agreed to in writing +will The Copyright Holder, or any author named in the components of the +Work, or any other party who may distribute and/or modify the Work as +permitted above, be liable to you for damages, including any general, +special, incidental or consequential damages arising out of any use of +the Work or out of inability to use the Work (including, but not limited +to, loss of data, data being rendered inaccurate, or losses sustained by +anyone as a result of any failure of the Work to operate with any other +programs), even if the Copyright Holder or said author or said other +party has been advised of the possibility of such damages. + + +MAINTENANCE OF THE WORK +======================= + +The Work has the status `author-maintained' if the Copyright Holder +explicitly and prominently states near the primary copyright notice in +the Work that the Work can only be maintained by the Copyright Holder +or simply that it is `author-maintained'. + +The Work has the status `maintained' if there is a Current Maintainer +who has indicated in the Work that they are willing to receive error +reports for the Work (for example, by supplying a valid e-mail +address). It is not required for the Current Maintainer to acknowledge +or act upon these error reports. + +The Work changes from status `maintained' to `unmaintained' if there +is no Current Maintainer, or the person stated to be Current +Maintainer of the work cannot be reached through the indicated means +of communication for a period of six months, and there are no other +significant signs of active maintenance. + +You can become the Current Maintainer of the Work by agreement with +any existing Current Maintainer to take over this role. + +If the Work is unmaintained, you can become the Current Maintainer of +the Work through the following steps: + + 1. Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of + an Internet or similar search. + + 2. If this search is successful, then enquire whether the Work + is still maintained. + + a. If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + b. If the search is unsuccessful or no action to resume active + maintenance is taken by the Current Maintainer, then announce + within the pertinent community your intention to take over + maintenance. (If the Work is a LaTeX work, this could be + done, for example, by posting to comp.text.tex.) + + 3a. If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + b. If the Current Maintainer is not reachable and the Copyright + Holder agrees that maintenance of the Work be passed to you, + then this takes effect immediately upon announcement. + + 4. If you make an `intention announcement' as described in 2b. above + and after three months your intention is challenged neither by + the Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as + to name you as the (new) Current Maintainer. + + 5. If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of 3b) or 4), then that Current Maintainer must + become or remain the Current Maintainer upon request provided + they then update their communication data within one month. + +A change in the Current Maintainer does not, of itself, alter the fact +that the Work is distributed under the LPPL license. + +If you become the Current Maintainer of the Work, you should +immediately provide, within the Work, a prominent and unambiguous +statement of your status as Current Maintainer. You should also +announce your new status to the same pertinent community as +in 2b) above. + + +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE +====================================================== + +This section contains important instructions, examples, and +recommendations for authors who are considering distributing their +works under this license. These authors are addressed as `you' in +this section. + +Choosing This License or Another License +---------------------------------------- + +If for any part of your work you want or need to use *distribution* +conditions that differ significantly from those in this license, then +do not refer to this license anywhere in your work but, instead, +distribute your work under a different license. You may use the text +of this license as a model for your own license, but your license +should not refer to the LPPL or otherwise give the impression that +your work is distributed under the LPPL. + +The document `modguide.tex' in the base LaTeX distribution explains +the motivation behind the conditions of this license. It explains, +for example, why distributing LaTeX under the GNU General Public +License (GPL) was considered inappropriate. Even if your work is +unrelated to LaTeX, the discussion in `modguide.tex' may still be +relevant, and authors intending to distribute their works under any +license are encouraged to read it. + +A Recommendation on Modification Without Distribution +----------------------------------------------------- + +It is wise never to modify a component of the Work, even for your own +personal use, without also meeting the above conditions for +distributing the modified component. While you might intend that such +modifications will never be distributed, often this will happen by +accident -- you may forget that you have modified that component; or +it may not occur to you when allowing others to access the modified +version that you are thus distributing it and violating the conditions +of this license in ways that could have legal implications and, worse, +cause problems for the community. It is therefore usually in your +best interest to keep your copy of the Work identical with the public +one. Many works provide ways to control the behavior of that work +without altering any of its licensed components. + +How to Use This License +----------------------- + +To use this license, place in each of the components of your work both +an explicit copyright notice including your name and the year the work +was authored and/or last substantially modified. Include also a +statement that the distribution and/or modification of that +component is constrained by the conditions in this license. + +Here is an example of such a notice and statement: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +Given such a notice and statement in a file, the conditions +given in this license document would apply, with the `Work' referring +to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being +generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' +referring to any `LaTeX-Format', and both `Copyright Holder' and +`Current Maintainer' referring to the person `M. Y. Name'. + +If you do not want the Maintenance section of LPPL to apply to your +Work, change `maintained' above into `author-maintained'. +However, we recommend that you use `maintained', as the Maintenance +section was added in order to ensure that your Work remains useful to +the community even when you can no longer maintain and support it +yourself. + +Derived Works That Are Not Replacements +--------------------------------------- + +Several clauses of the LPPL specify means to provide reliability and +stability for the user community. They therefore concern themselves +with the case that a Derived Work is intended to be used as a +(compatible or incompatible) replacement of the original Work. If +this is not the case (e.g., if a few lines of code are reused for a +completely different task), then clauses 6b and 6d shall not apply. + + +Important Recommendations +------------------------- + + Defining What Constitutes the Work + + The LPPL requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a + way for the licensee to determine which files constitute the Work. + This could, for example, be achieved by explicitly listing all the + files of the Work near the copyright notice of each file or by + using a line such as: + + % This work consists of all files listed in manifest.txt. + + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..e2a8f3e --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +# whu-proposal + +## 主要内容 + +武汉大学本科生的开题报告模版已经[由 whu-tug 开发](https://github.com/whutug/whu-thesis),但是研究生的模版仍然只有 word 版本,对于数学系的同学来说,相较于 LaTeX 来说,使用 word 进行排版数学公式并不是一件容易的事情。而且 LaTeX 使用 bib 数据库进行参考文献的管理,可以很方便地实现参考文献的引用。 + +于是我基于《附件1:研究生学位论文开题报告登记表》开发了此模版,希望能够让同学们更方便、高效地完成开题报告的撰写。 + +下面是示例文件: + +```latex +% \documentclass[type = bachelor]{whu-proposal} % 本科生 +% \documentclass[type = master]{whu-proposal} % 硕士生 +\documentclass[type = doctor]{whu-proposal} % 博士生 + + +% 个人信息 +\ProposalSetup{ + title = { 论文题目 } , + department = { 数学与统计学院 } , + student_id = { 2021202012345 } , + author = { 作者姓名 } , + % 下面的内容只有【硕|博】需要填写 + major = { 基础数学 } , + research_area = { 算子理论 } , + supervisor = { 导师姓名 } , + supervisor_title = { 教授 } , + year = { 2023 }, % 年份不填写时默认为编译时的年份 + month = { 5 }, % 月份不填写时默认为编译时的月份 + day = { 21 }, % 日期不填写时默认为编译时的日期 +} + + +% 载入所需宏包,下面的仅为示例文件中需要,实际使用时可根据需要增减 + +% 参考文献 +\usepackage[ + backend = biber, + bibstyle = gb7714-2015, + citestyle = gb7714-2015 +]{biblatex} +\addbibresource{whu-proposal.bib} % 参考文献数据库 + + + +% 自定义命令,下面的仅为示例文件中需要,实际使用时可根据需要增减 +\newcommand\tool{\texttt} +\newcommand\tn[1]{\texttt{\textbackslash#1}} +\newcommand\file{\nolinkurl} + + + +\begin{document} + +% 目录,不需要的话可去除 +\tableofcontents + + +% 正文内容 +\input{body/motivation.tex} +\input{body/usage.tex} +\input{body/reference.tex} + + + +% 参考文献 + +% \printbibliography % “参考文献”一节标题不编号 +\printbibliography[heading = bibnumbered] % “参考文献”一节标题编号 + + +\end{document} +``` + +## 参与贡献 + +### 仓库地址 +Github:https://github.com/whutug/whu-proposal +Gitee:https://gitee.com/xkwxdyy/whu-proposal + +### 提issues +#### Github +issues: https://github.com/whutug/whu-proposal/issues + +#### Gitee +issues: https://gitee.com/xkwxdyy/whu-proposal/issues + diff --git a/body/motivation.tex b/body/motivation.tex new file mode 100644 index 0000000..5194aaf --- /dev/null +++ b/body/motivation.tex @@ -0,0 +1,7 @@ +% !TeX root = ../whu-proposal-main.tex + +\section{为什么会开发此模版} + +武汉大学本科生的开题报告模版已经\href{https://github.com/whutug/whu-thesis}{由 whu-tug 开发},但是研究生的模版仍然只有 word 版本,对于数学系的同学来说,相较于 \LaTeX{} 来说,使用 word 进行排版数学公式并不是一件容易的事情。而且 \LaTeX{} 使用 bib 数据库进行参考文献的管理,可以很方便地实现参考文献的引用。 + +于是我基于《附件1:研究生学位论文开题报告登记表》\cite{研究生学位论文开题报告登记表} 开发了此模版,希望能够让同学们更方便、高效地完成开题报告的撰写。 \ No newline at end of file diff --git a/body/reference.tex b/body/reference.tex new file mode 100644 index 0000000..20d340f --- /dev/null +++ b/body/reference.tex @@ -0,0 +1,39 @@ +% !TeX root = ../whu-proposal-main.tex + +\section{可供用户参考的内容} + +\subsection{2023年硕博开题报告的时间安排} + +(以下来自班级群班长转发内容\cite{2024届硕博开题报告QQ通知}) + +各位同学,学位论文开题报告会预计在下学期9月开展,请大家做好开题准备: +\begin{enumerate} + \item 开题报告会时间:2023年9中下旬(暂定),确切日期等各系通知; + \item 开题前与导师及时、充分沟通论文选题及研究计划,确保选题合理,研究计划可行;开题需征得导师同意; + \item 请将开题报告初稿于7月31日前发给导师审核,根据导师意见修改和完善; + \item 硕士研究生开题报告不少于3千字,博士研究生开题报告不少于5千字,开题报告内容包括论文选题意义、国内外研究现状、论文研究计划、主要参考问题。行文主要篇幅用于写“论文研究计划”; + \item 参加此次开题报告的学生名单见下表,如有遗漏,请告知教学办; + \item 开题是进行学位论文撰写的必经环节,请大家认真对待。 +\end{enumerate} + + + +\subsection{硕博开题报告的内容组成} + +下面内容来自《2023 年 3 月学位论文开题报告的通知》\cite{2023届硕博学位论文开题报告通知}: + +开题报告的内容一般由以下几部分组成: +\begin{enumerate} + \item 论文选题的价值与意义; + \item 与论文选题相关的国内外研究现状及趋势; + \item 论文研究计划,包括 + \begin{enumerate} + \item 研究目标、研究思路、研究方法、技术路线; + \item 研究的重难点、可能的创新点与不足之处; + \item 研究的主要内容及初步框架; + \item 研究的进度安排; + \end{enumerate} + \item 主要参考文献。 +\end{enumerate} + +硕士研究生开题报告正文部分不得少于 3000 字,博士研究生开题报告正文部分不得少于 5000 字。 \ No newline at end of file diff --git a/body/usage.tex b/body/usage.tex new file mode 100644 index 0000000..42eb71a --- /dev/null +++ b/body/usage.tex @@ -0,0 +1,38 @@ +% !TeX root = ../whu-proposal-main.tex + +\section{如何使用此模版} + +此文件既是示例文件,也是模版的说明文档。本模版的使用方法如下: + +\subsection{如何选择本科或硕博的版本} + +在 \file{whu-proposal-main.tex} 的 \tn{documentclass} 命令中,type 选择 bachelor 或 master 或 doctor 选项,即可选择本科或硕博的版本。 + + +\subsection{个人信息} + +在 \file{whu-proposal-main.tex} 的 \tn{ProposalSetup} 命令中填写个人信息,包括姓名、学号、专业、研究方向、导师姓名、日期等信息。其中,题目、学院、学号和姓名为本科生必填信息,其他信息为研究生必填信息。 + + +\subsection{正文内容} + +个人推荐使用 \tn{input} 命令实现分章节编译,使得主文件(即本文件)结构更清晰(就像 \file{whu-proposal-main.tex} 文件的处理一样)。 + +章节是三级结构,即 \tn{section}、\tn{subsection} 和 \tn{subsubsection}。 + +如果不需要目录,可以将 \file{whu-proposal-main.tex} 文件的 \tn{tableofcontents} 命令注释掉。 + + + +\subsection{参考文献} + +\subsubsection{如何引用参考文献} + +上标引用一篇文献\cite{xdyy}。 + +行内引用一篇文献\parencite{xdyy}。 + + +\subsubsection{参考文献的编译方式} + +使用 \tool{biber} 编译参考文献,编译顺序为 \tool{xelatex} $\to$ \tool{biber} $\to$ \tool{xelatex} $\to$ \tool{xelatex},或者使用 \tool{latexmk -xelatex whu-proposal-main} 编译。 \ No newline at end of file diff --git a/figures/proposal_master_doctor-comment1.pdf b/figures/proposal_master_doctor-comment1.pdf new file mode 100644 index 0000000..9bb2d2f Binary files /dev/null and b/figures/proposal_master_doctor-comment1.pdf differ diff --git a/figures/proposal_master_doctor-comment2.pdf b/figures/proposal_master_doctor-comment2.pdf new file mode 100644 index 0000000..4a81a80 Binary files /dev/null and b/figures/proposal_master_doctor-comment2.pdf differ diff --git a/figures/whu-logo.png b/figures/whu-logo.png new file mode 100644 index 0000000..9d6527d Binary files /dev/null and b/figures/whu-logo.png differ diff --git "a/references/2023\345\271\2643\346\234\210\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\232\204\351\200\232\347\237\245.docx" "b/references/2023\345\271\2643\346\234\210\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\232\204\351\200\232\347\237\245.docx" new file mode 100644 index 0000000..300c49a Binary files /dev/null and "b/references/2023\345\271\2643\346\234\210\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\232\204\351\200\232\347\237\245.docx" differ diff --git a/references/all.pdf b/references/all.pdf new file mode 100644 index 0000000..072c6c6 Binary files /dev/null and b/references/all.pdf differ diff --git a/references/cover.pdf b/references/cover.pdf new file mode 100644 index 0000000..e7abf1a Binary files /dev/null and b/references/cover.pdf differ diff --git a/references/main.pdf b/references/main.pdf new file mode 100644 index 0000000..6f3b274 Binary files /dev/null and b/references/main.pdf differ diff --git "a/references/\351\231\204\344\273\2661\357\274\232\347\240\224\347\251\266\347\224\237\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\231\273\350\256\260\350\241\250.doc" "b/references/\351\231\204\344\273\2661\357\274\232\347\240\224\347\251\266\347\224\237\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\231\273\350\256\260\350\241\250.doc" new file mode 100644 index 0000000..a4cc735 Binary files /dev/null and "b/references/\351\231\204\344\273\2661\357\274\232\347\240\224\347\251\266\347\224\237\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\231\273\350\256\260\350\241\250.doc" differ diff --git "a/references/\351\231\204\344\273\2661\357\274\232\347\240\224\347\251\266\347\224\237\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\231\273\350\256\260\350\241\250.pdf" "b/references/\351\231\204\344\273\2661\357\274\232\347\240\224\347\251\266\347\224\237\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\231\273\350\256\260\350\241\250.pdf" new file mode 100644 index 0000000..072c6c6 Binary files /dev/null and "b/references/\351\231\204\344\273\2661\357\274\232\347\240\224\347\251\266\347\224\237\345\255\246\344\275\215\350\256\272\346\226\207\345\274\200\351\242\230\346\212\245\345\221\212\347\231\273\350\256\260\350\241\250.pdf" differ diff --git a/whu-proposal-main.pdf b/whu-proposal-main.pdf new file mode 100644 index 0000000..0864db8 Binary files /dev/null and b/whu-proposal-main.pdf differ diff --git a/whu-proposal-main.tex b/whu-proposal-main.tex new file mode 100644 index 0000000..48cbd74 --- /dev/null +++ b/whu-proposal-main.tex @@ -0,0 +1,77 @@ +% !TeX encoding = UTF-8 +% !TeX program = xelatex +% !TeX spellcheck = en_US + +%******************************************** +% whu-proposal: 武汉大学开题报告模版 + +% Github:https://github.com/whutug/whu-proposal +% Gitee:https://gitee.com/xkwxdyy/whu-proposal +% Update date: 2023-05-21 +% Version: v0.1 +% Author: Kangwei Xia, kangweixia_xdyy@163.com, School of Mathematics and Statistics, Wuhan University +% QQ group: 681965476 +%******************************************** + + +% \documentclass[type = bachelor]{whu-proposal} % 本科生 +% \documentclass[type = master]{whu-proposal} % 硕士生 +\documentclass[type = doctor]{whu-proposal} % 博士生 + + +% 个人信息 +\ProposalSetup{ + title = { 论文题目 } , + department = { 数学与统计学院 } , + student_id = { 2021202012345 } , + author = { 作者姓名 } , + % 下面的内容只有【硕|博】需要填写 + major = { 基础数学 } , + research_area = { 算子理论 } , + supervisor = { 导师姓名 } , + supervisor_title = { 教授 } , + year = { 2023 }, % 年份不填写时默认为编译时的年份 + month = { 5 }, % 月份不填写时默认为编译时的月份 + day = { 21 }, % 日期不填写时默认为编译时的日期 +} + + +% 载入所需宏包,下面的仅为示例文件中需要,实际使用时可根据需要增减 + +% 参考文献 +\usepackage[ + backend = biber, + bibstyle = gb7714-2015, + citestyle = gb7714-2015 +]{biblatex} +\addbibresource{whu-proposal.bib} % 参考文献数据库 + + + +% 自定义命令,下面的仅为示例文件中需要,实际使用时可根据需要增减 +\newcommand\tool{\texttt} +\newcommand\tn[1]{\texttt{\textbackslash#1}} +\newcommand\file{\nolinkurl} + + + +\begin{document} + +% 目录,不需要的话可去除 +\tableofcontents + + +% 正文内容 +\input{body/motivation.tex} +\input{body/usage.tex} +\input{body/reference.tex} + + + +% 参考文献 + +% \printbibliography % “参考文献”一节标题不编号 +\printbibliography[heading = bibnumbered] % “参考文献”一节标题编号 + + +\end{document} \ No newline at end of file diff --git a/whu-proposal.bib b/whu-proposal.bib new file mode 100644 index 0000000..5d5f0fb --- /dev/null +++ b/whu-proposal.bib @@ -0,0 +1,24 @@ +@article{xdyy, + author = {夏大鱼羊}, + journal = {我是期刊}, + number = {6666}, + title = {如何写一个 \LaTeX 模板}, + volume = {88}, + year = {2023} +} + +@manual{研究生学位论文开题报告登记表, + author = {武汉大学数学与统计学院}, + title = {附件1:研究生学位论文开题报告登记表} +} + +@manual{2023届硕博学位论文开题报告通知, + author = {武汉大学数学与统计学院}, + title = {2023年3月学位论文开题报告的通知} +} +@misc{2024届硕博开题报告QQ通知, + author = {武汉大学数学与统计学院}, + title = {2024届毕业生学位论文开题报告的通知}, + howpublished = {各专业班级QQ群}, + year = {2023} +} \ No newline at end of file diff --git a/whu-proposal.cls b/whu-proposal.cls new file mode 100644 index 0000000..99b198a --- /dev/null +++ b/whu-proposal.cls @@ -0,0 +1,757 @@ +% +% Copyright (c) 2023 Kangwei Xia +% Released under the LaTeX Project Public License v1.3c License. +% Repository: https://gitee.com/xkwxdyy/whu-proposal +% + +\NeedsTeXFormat{LaTeX2e}[2017/04/15] +\RequirePackage { expl3 } +\RequirePackage { xparse } +\RequirePackage { l3keys2e } +\ProvidesExplClass {whu-proposal} {2023-05-21} {v0.1} {LaTeX template for thesis proposal for students in Wuhan University} + + +\bool_new:N \g__whuproposal_bachelor_type_bool % 判断开题报告类型 +\box_new:N \l__whuproposal_tmp_box +\box_new:N \l__whuproposal_tmpa_box +\box_new:N \l__whuproposal_tmpb_box +\dim_new:N \l__whuproposal_tmp_dim +\dim_new:N\l__whuproposal_tmpa_dim +\dim_new:N\l__whuproposal_tmpb_dim +\int_new:N \l__whuproposal_tmp_int +\tl_new:N \l__whuproposal_tmpa_tl +\tl_new:N \l__whuproposal_tmpb_tl +\clist_new:N \l__whuproposal_tmpa_clist +\clist_new:N \l__whuproposal_tmpb_clist +\bool_new:N \g__whuproposal_if_title_multiline_bool % 判断加入标题后是否变成多行 + +% % 检查 LaTeX2e kernel 版本 +% \msg_new:nnn { whu-proposal } { latex-too-old } +% { TeX~ Live~ 2020~ or~ later~ version~ is~ required~ to~ compile~ this~ document. } +% \@ifl@t@r \fmtversion { 2020/02/02 } +% { } +% { \msg_fatal:nn { whu-proposal } { latex-too-old } } + +% % 检查编译引擎,要求使用 XeLaTeX。 +% \msg_new:nnn { whu-proposal } { incompatible-engine } +% { XeLaTeX~ is~ required~ to~ compile~ this~ document. } + +% \sys_if_engine_xetex:F +% { \msg_fatal:nn { whu-proposal } { incompatible-engine } } + + +% 使用 l3keys 定义 \ProposalSetup 配置命令 +\NewDocumentCommand \ProposalSetup { m } + { \keys_set:nn { whu-proposal } {#1} } + + + +% 加载文档类和宏包 + +% 处理文档类选项 +\keys_define:nn { whu-proposal / option } + { + type .choice:, + type .value_required:n = true, + type / bachelor .code:n = + { + \bool_gset_true:N \g__whuproposal_bachelor_type_bool + } , + type / master .code:n = + { + \bool_gset_false:N \g__whuproposal_bachelor_type_bool + } , + type / doctor .code:n = + { + \bool_gset_false:N \g__whuproposal_bachelor_type_bool + }, + type .initial:n = bachelor + } +\ProcessKeysOptions { whu-proposal / option } + + +\PassOptionsToClass { UTF8 , a4paper , scheme = chinese } { ctexart } +\bool_if:NT \g__whuproposal_bachelor_type_bool + { + \PassOptionsToClass { zihao = -4 } { ctexart } + } +\RequirePackage { filehook } +\AtEndOfPackageFile* { fontspec } + { \msg_redirect_name:nnn { fontspec } { no-script } { none } } +\AtEndOfPackageFile* { xeCJK } + { + \msg_redirect_name:nnn { xeCJK } { CJKfamily-redef } { none } + \defaultCJKfontfeatures + { + Script = CJK, + % Mapping = fullwidth-stop , + } + } + +% 载入 \cls{ctexart} 文档类。 +\LoadClass { ctexart } + +% 要求 ctex v2.4.9 2017-04-01 或更高的版本。 +\msg_new:nnn { whu-proposal } { require-package-version } + { The~ package~ "#1"~ is~ required. } + +\@ifclasslater { ctexart } { 2017/04/01 } + { } + { + \msg_fatal:nnn { whu-proposal } { require-package-version } + { ctex~ v2.4.9~ 2017-04-01 } + } + +% 建议在模板开始处载入全部宏包,不要轻易改变加载顺序。 +\RequirePackage { etoolbox } +\RequirePackage { geometry } +\RequirePackage { graphicx } +\RequirePackage { fontspec } +\RequirePackage { xeCJK } +\RequirePackage { xeCJKfntef } +\RequirePackage { fancyhdr } +\RequirePackage { lastpage } +\RequirePackage { needspace } +\RequirePackage { tikzpagenodes } + +\AtEndPreamble + { + \RequirePackage [ hidelinks ] { hyperref } + } + + + + +% 对冲突的宏包报错。 +\msg_new:nnn { whu-proposal } { package-conflict } + { The~ "#2"~ package~ is~ incompatible~ with~ "#1". } + +\cs_new:Npn \gradingreference_package_conflict:nn #1#2 + { + \AtEndOfPackageFile* {#1} + { + \AtBeginOfPackageFile* {#2} + { \msg_error:nnnn { whu-proposal } { package-conflict } {#1} {#2} } + } + } + +\gradingreference_package_conflict:nn { unicode-math } { amscd } +\gradingreference_package_conflict:nn { unicode-math } { amsfonts } +\gradingreference_package_conflict:nn { unicode-math } { amssymb } +\gradingreference_package_conflict:nn { unicode-math } { bbm } +\gradingreference_package_conflict:nn { unicode-math } { bm } +\gradingreference_package_conflict:nn { unicode-math } { eucal } +\gradingreference_package_conflict:nn { unicode-math } { eufrak } +\gradingreference_package_conflict:nn { unicode-math } { mathrsfs } +\gradingreference_package_conflict:nn { unicode-math } { newtxmath } +\gradingreference_package_conflict:nn { unicode-math } { upgreek } + +\gradingreference_package_conflict:nn { enumitem } { paralist } + + +% 纸张和页面布局 +\bool_if:NTF \g__whuproposal_bachelor_type_bool + { + \geometry + { + hmargin = 3 cm , top = 2.5 cm , bottom = 2 cm , ignoreall + } + } + { + \geometry + { + % showframe, + paper = a4paper, + papersize = { 210mm , 297mm } , + top = 2.54cm, + % bottom = 2.54cm, + % left = 3.18cm, + left = 3.28cm, % 为了要对齐字,往右移动了一点 + right = 3.18cm, + footskip = 0.96cm, % 2.54-1.75 = 0.79,但是还是不重合,所以要微调 + headsep = 1.04cm, % 2.54-1.5 + % 因为框的底部往上提了一点,所以版心的底部也要往上提一点 + bottom = 2.7cm, % 本来是 2.54 cm + } + } + + + + +% 章节标题格式设置 +\bool_if:NTF \g__whuproposal_bachelor_type_bool + { + \ctexset + { + section = + { + number = \chinese { section } , + format = \zihao { 4 } \bfseries, + name = {,、}, + aftername = {}, + beforeskip = 3.5ex plus 1ex minus .5ex, + afterskip = 1ex plus .2ex minus 1ex, + tocline = \chinese{#1}、#2 + } , + subsection = + { + format = \zihao { 4 } \bfseries, + beforeskip = 2ex plus 0.5ex minus .5ex, + afterskip = 2ex plus .2ex minus 1ex, + } , + } + } + { + \ctexset + { + section = + { + number = \chinese { section } , + format = \zihao { -4 } \bfseries, + name = {,、}, + aftername = {}, + beforeskip = 2ex plus 1ex minus .5ex, + afterskip = 1ex plus .2ex minus 1ex, + tocline = \chinese{#1}、#2 + } , + subsection = + { + format = \zihao { -4 } \bfseries, + beforeskip = 2ex plus 0.5ex minus .5ex, + } , + } + } + + + +% 字体 + +\cs_new_protected:Npn \__whuproposal_setmainfont:nn #1#2 + { \__fontspec_main_setmainfont:nn {#2} {#1} } + +% 西文字体 +\__whuproposal_setmainfont:nn { Times~ New~ Roman } { } + +% 中文字体 +% 在 ctex 的字体配置的基础上进行一些修改 +% 将苹方和微软雅黑分别替换为华文黑体和中易黑体 +\str_if_eq:onTF { \g__ctex_fontset_tl } { mac } + { + \setCJKsansfont { Heiti~ SC~ Light } [ BoldFont = Heiti~ SC~ Medium ] + } + { + \str_if_eq:onT { \g__ctex_fontset_tl } { windows } + { \setCJKsansfont { SimHei } } + } + + +% 如果有内容较高(如分式)使得行间距小于 0.5em,则将其增加至 0.5em。 +\dim_set:Nn \lineskiplimit { .5em } +\skip_set:Nn \lineskip { .5em } + + + +% 个人信息 + +\keys_define:nn { whu-proposal } + { + % 标题 + title .tl_set:N = \g__whuproposal_title_tl, + % 培养单位 + department .tl_set:N = \g__whuproposal_department_tl, + % 专业 + major .tl_set:N = \g__whuproposal_major_tl, + % 研究方向 + research_area .tl_set:N = \g__whuproposal_research_area_tl, + % 学号 + student_id .tl_set:N = \g__whuproposal_student_id_tl, + % 姓名 + author .tl_set:N = \g__whuproposal_author_tl, + % 导师姓名 + supervisor .tl_set:N = \g__whuproposal_supervisor_tl, + % 导师职称 + supervisor_title .tl_set:N = \g__whuproposal_supervisor_title_tl, + % 年 + year .int_set:N = \g__whuproposal_year_int, + % 月 + month .int_set:N = \g__whuproposal_month_int, + % 日 + day .int_set:N = \g__whuproposal_day_int, + } +\keys_set:nn { whu-proposal } + { + title = { 论文题目 } , + department = { 数学与统计学院 } , + major = { 基础数学 } , + research_area = { 算子理论 } , + student_id = { 2021202012345 } , + author = { 作者姓名 } , + supervisor = { 导师姓名 } , + supervisor_title = { 教授 } , + year = { \int_use:N \c_sys_year_int }, + month = { \int_use:N \c_sys_month_int }, + day = { \int_use:N \c_sys_day_int }, + } + +% 封面 +\cs_new:Npn \__whuproposal_cover_master_doctor: + { + \thispagestyle{empty} + \begin{tikzpicture}[ remember~picture, overlay ] + \__whuproposal_cover_master_doctor_logo: + \__whuproposal_cover_master_doctor_type: + \__whuproposal_cover_master_doctor_infomation: + \__whuproposal_cover_master_doctor_time: + \end{tikzpicture} + % \end{titlepage} + } + +% logo +\cs_new:Npn \__whuproposal_cover_master_doctor_logo: + { + \node[anchor = north] ( logo ) at + ( + [ shift = { ( 0em , -0.11\textheight ) } ] + current~page~text~area.north + ) + { + \includegraphics + [ height = 4.5em] + { figures / whu-logo.png } + }; + } +% 类型 +\cs_new:Npn \__whuproposal_cover_master_doctor_type: + { + \node[anchor = north] ( type ) at + ( + [ shift = { ( -2pt , -0.235\textheight ) } ] + current~page~text~area.north + ) + { + \zihao{-1} \bfseries \heiti 研究生学位论文开题报告登记表 + }; + } +% 时间 +\cs_new:Npn \__whuproposal_cover_master_doctor_time: + { + \node [ anchor = south ] ( date ) at ( [shift = {(0em, 2.5em)}]current~page~text~area.south ) + { + \zihao{3} \fangsong + \int_use:N \g__whuproposal_year_int + % \zhdigits { \int_use:N \g__whuproposal_year_int } + \, 年 \, + \int_use:N \g__whuproposal_month_int + % \zhnumber { \int_use:N \g__whuproposal_month_int } + \, 月 + \int_use:N \g__whuproposal_day_int + % \zhnumber { \int_use:N \g__whuproposal_day_int } + \, 日 + }; + } +% 个人信息 +\cs_new:Npn \__whuproposal_cover_master_doctor_infomation: + { + \node[] (information) at + ( + [shift = {(0, -4.6em)}] + current~page.center + ) + { + \begin{minipage} [ c ] { \textwidth } + \centering \zihao{3} \fangsong + \clist_set:Nn \l__whuproposal_tmpa_clist + { + 培养单位:, + 专\qquad 业:, % 加 \qquad 消除 underfull \hbox 的警告 + 研究方向:, + 学\qquad 号:, + 姓\qquad 名:, + 导师姓名:, + 导师职称: + } + \clist_set:Nx \l__whuproposal_tmpb_clist + { + \g__whuproposal_department_tl , + \g__whuproposal_major_tl , + \g__whuproposal_research_area_tl , + \g__whuproposal_student_id_tl , + \g__whuproposal_author_tl , + \g__whuproposal_supervisor_tl , + \g__whuproposal_supervisor_title_tl + } + \__whuproposal_get_max_text_width:NN + \l__whuproposal_tmpa_dim \l__whuproposal_tmpa_clist + % 获得个人信息的内容最大宽度 + \__whuproposal_get_max_text_width:NN + \l__whuproposal_tmpb_dim \l__whuproposal_tmpb_clist + \bool_until_do:nn + { \clist_if_empty_p:N \l__whuproposal_tmpa_clist } + { + \clist_pop:NN \l__whuproposal_tmpa_clist \l__whuproposal_tmpa_tl + \clist_pop:NN \l__whuproposal_tmpb_clist \l__whuproposal_tmpb_tl + \__whuproposal_cover_infomation_spread_box:nn + { \l__whuproposal_tmpa_dim } + { \l__whuproposal_tmpa_tl } + % \hspace*{1em} + \__whuproposal_cover_infomation_center_underline_box:Vn + \l__whuproposal_tmpb_dim + { \l__whuproposal_tmpb_tl } + \skip_vertical:n { 1.5 ex } + } + \end{minipage} + }; + } + +\cs_new_protected:Npn \__whuproposal_cover_infomation_center_underline_box:nn #1#2 + { + \mode_leave_vertical: + \CJKunderline* + [ + thickness = 1pt + ] + { + \hbox_to_wd:nn { #1 + 2cm } + { + \hfil + #2 + \hfil + } + } + } +\cs_generate_variant:Nn \__whuproposal_cover_infomation_center_underline_box:nn { Vn } + +\cs_new_protected:Npn \__whuproposal_cover_infomation_spread_box:nn #1#2 + { + \mode_leave_vertical: + \hbox_to_wd:nn {#1} + { \tl_map_inline:nn {#2} { ##1 \hfil } \unskip } + } +\cs_new:Npn \__whuproposal_get_text_width:Nn #1#2 + { + \hbox_set:Nn \l__whuproposal_tmpa_box {#2} + \dim_set:Nn #1 { \box_wd:N \l__whuproposal_tmpa_box } + } +\cs_new:Npn \__whuproposal_get_max_text_width:NN #1#2 + { + \group_begin: + \clist_set_eq:NN \l__whuproposal_tmpa_clist #2 + \bool_until_do:nn { \clist_if_empty_p:N \l__whuproposal_tmpa_clist } + { + \clist_pop:NN \l__whuproposal_tmpa_clist \l__whuproposal_tmpa_tl + \__whuproposal_get_text_width:NV \l__whuproposal_tmpa_dim \l__whuproposal_tmpa_tl + \dim_gset:Nn #1 { \dim_max:nn {#1} { \l__whuproposal_tmpa_dim } } + } + \group_end: + } +\cs_generate_variant:Nn \__whuproposal_get_text_width:Nn { NV } + +% 计算标题所占的最大宽度 +\dim_new:N \g__whuproposal_title_width_dim % 标题的宽度:行宽 - “学位论文题目:” + +\cs_new:Npn \__whuproposal_master_doctor_front_matter: + { + \__whuproposal_cover_master_doctor: + \hbox_set:Nn \l__whuproposal_tmp_box { \zihao{-4} 学位论文题目:} + \dim_gset:Nn \g__whuproposal_title_width_dim + { + \dim_eval:n { \textwidth - \box_wd:N \l__whuproposal_tmp_box } + } + \newpage + \par \vspace*{-6.9pt} + { + \noindent \zihao{-4} + 学位论文题目: + % \parbox[ \dim_use:N \g__whuproposal_title_width_dim ]{ \g__whuproposal_title_tl } + \begin{minipage}[t]{ \dim_use:N \g__whuproposal_title_width_dim } + \g__whuproposal_title_tl + \end{minipage} + } + + \par \vspace*{2.9ex} \noindent {\zihao{-4} 开题报告内容摘要(可附页):} + \fontsize{12pt}{14.5bp} \selectfont + } +\AtBeginDocument + { + \bool_if:NTF \g__whuproposal_bachelor_type_bool + { + \__whuproposal_bachelor_front_matter: + } + { + \__whuproposal_master_doctor_front_matter: + } + } + + +\bool_if:NF \g__whuproposal_bachelor_type_bool + { + \int_set:Nn \c@page { 0 } % 去掉封面的框 + + \AddToHook { shipout / background } + { + \put (0cm,0cm) + { + \int_compare:nNnT { \c@page } > { 0 } % 去掉封面的框 + { + \int_compare:nNnTF { \c@page } = {1} + { \__whuproposal_box_first_page: } + { + \__whuproposal_lastpage_tmp_set: + \int_compare:nNnT { \c@page } < { \l__whuproposal_tmp_int - 1 } + { \__whuproposal_box_after_first_page: } + } + } + } + } + } + +\cs_new:Npn \__whuproposal_lastpage_tmp_set: + { + \bool_lazy_or:nnTF + { \cs_if_eq_p:NN \lastpage@lastpage \__whuproposal_relax: } + { \str_if_eq_p:ee \lastpage@lastpage {??} } + { \int_set:Nn \l__whuproposal_tmp_int { 0 } } + { \int_set:Nn \l__whuproposal_tmp_int { \lastpage@lastpage } } + } +\cs_new_nopar:Npn \__whuproposal_relax: { \relax } + +\dim_new:N \g__whuproposal_box_width_extra_dim % box 的额外宽度 +\dim_new:N \g__whuproposal_box_bottom_extra_dim % box 的下面的额外高度 +\dim_new:N \g__whuproposal_box_seperate_line_vertical_dim % 分割线距离上方线的最终距离 +\dim_new:N \g__whuproposal_box_seperate_line_vertical_aux_dim % 分割线距离上方线的距离 +\dim_set:Nn \g__whuproposal_box_width_extra_dim { 3pt } +\dim_set:Nn \g__whuproposal_box_bottom_extra_dim { 5pt } +\dim_set:Nn \g__whuproposal_box_seperate_line_vertical_aux_dim { 6.9ex } + +% 正文第一页的分割线距离处理 +% 因为有可能出现论文题目比较长,需要换行的情况(极少,但是存在),如果把分割线的距离固定了略麻烦 +% 但是好在一般不会超过两行,所以只有两种情况,处理起来比较方便 +% 解决想法: +% 1、先判断是否多行 +% 2、是的话就重新调距离,并且写入 aux 文件,编译第二次的时候读取 + + +% 判断是否是多行 +\cs_new:Npn \__whuproposal_if_title_multiline: + { + % 把内容存在盒子里 + \hbox_set:Nn \l__whuproposal_tmp_box + { + \parbox{\textwidth}{ + \noindent \zihao{-4} 学位论文题目:\g__whuproposal_title_tl + } + } + % 测量总高度 + \dim_set:Nn \l__whuproposal_tmp_dim { \box_ht_plus_dp:N \l__whuproposal_tmp_box } + % 判断是否是多行 + \dim_compare:nNnT + { \l__whuproposal_tmp_dim } > { \normalbaselineskip } + { \bool_gset_true:N \g__whuproposal_if_title_multiline_bool } + \bool_if:NT \g__whuproposal_if_title_multiline_bool + { + \dim_gset:Nn \g__whuproposal_box_seperate_line_vertical_aux_dim { 9.8ex } + } + \AtEndDocument + { + \iow_now:cx { @auxout } + { + \token_to_str:N \ExplSyntaxOn % 要加一个token_to_str + ^^J + \dim_gset:Nn \exp_not:N \g__whuproposal_box_seperate_line_vertical_dim { \dim_use:N \g__whuproposal_box_seperate_line_vertical_aux_dim } + ^^J + \token_to_str:N \ExplSyntaxOff % 要加一个token_to_str + } + } + } + +% 整体的移动 +\dim_new:N \g__whuproposal_box_vertical_all_move_dim +\dim_set:Nn \g__whuproposal_box_vertical_all_move_dim {1pt} +\cs_new:Npn \__whuproposal_box_first_page: + { + % 判断是否是多行 + \__whuproposal_if_title_multiline: + \begin{tikzpicture}[ remember~picture, overlay ] + % 大边框 + \draw ([shift = {(-0.1cm-\g__whuproposal_box_width_extra_dim, \g__whuproposal_box_vertical_all_move_dim)}]current~page~text~area.north~west) + -- + ([shift = {(0.1cm+\g__whuproposal_box_width_extra_dim, \g__whuproposal_box_vertical_all_move_dim)}]current~page~text~area.north~east) + -- + ([shift = {(0.1cm+\g__whuproposal_box_width_extra_dim, \g__whuproposal_box_vertical_all_move_dim-\g__whuproposal_box_bottom_extra_dim)}]current~page~text~area.south~east) + -- + ([shift = {(-0.1cm-\g__whuproposal_box_width_extra_dim, \g__whuproposal_box_vertical_all_move_dim-\g__whuproposal_box_bottom_extra_dim)}]current~page~text~area.south~west) -- cycle + ; + % 分割线 + \draw ([shift = {(-0.1cm-\g__whuproposal_box_width_extra_dim, \g__whuproposal_box_vertical_all_move_dim-\g__whuproposal_box_seperate_line_vertical_dim)}]current~page~text~area.north~west) + -- + ([shift = {(0.1cm+\g__whuproposal_box_width_extra_dim, \g__whuproposal_box_vertical_all_move_dim-\g__whuproposal_box_seperate_line_vertical_dim)}]current~page~text~area.north~east); + \end{tikzpicture} + } + +\cs_new:Npn \__whuproposal_box_after_first_page: + { + \begin{tikzpicture}[ remember~picture, overlay ] + \draw ([shift = {(-\g__whuproposal_box_width_extra_dim, 0em)}]current~page~text~area.north~west) + -- + ([shift = {(\g__whuproposal_box_width_extra_dim, 0em)}]current~page~text~area.north~east) + -- + ([shift = {(\g__whuproposal_box_width_extra_dim, -\g__whuproposal_box_bottom_extra_dim)}]current~page~text~area.south~east) + -- + ([shift = {(-\g__whuproposal_box_width_extra_dim, -\g__whuproposal_box_bottom_extra_dim)}]current~page~text~area.south~west) -- cycle + ; + \end{tikzpicture} + } + + +\cs_new_protected:Npn \__whuproposal_master_doctor_back_matter: + { + \newpage + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { figures / proposal_master_doctor-comment1.pdf } + }; + \end{tikzpicture} + + \newpage + \begin{tikzpicture} [remember~picture, overlay] + \node at (current~page.center) + { + \includegraphics + [ width = \Gm@layoutwidth, height = \Gm@layoutheight ] + { figures / proposal_master_doctor-comment2.pdf } + }; + \end{tikzpicture} + } +\AtEndDocument + { + \bool_if:NTF \g__whuproposal_bachelor_type_bool + { + \__whuproposal_bachelor_back_matter: + } + { + \__whuproposal_master_doctor_back_matter: + } + } + +% 页眉和页脚 + +\tl_set:Nn \headrulewidth { 0pt } +\cs_set_eq:NN \@mkboth \use_none:n +\cs_set_eq:NN \sectionmark \use_none:n +\cs_set_eq:NN \subsectionmark \use_none:n + +\pagestyle { fancy } +\fancypagestyle { plain } + { + \fancyhf { } + \fancyfoot [ C ] + { + \__whuproposal_lastpage_tmp_set: + \zihao {-5} \int_eval:n { \thepage } + } + } +\pagestyle { plain } + + +\AtEndPreamble + { + % 修改 \printbibliography + \cs_if_exist:NT \printbibliography + { + \cs_set_eq:NN \__whuproposal_printbibliography_old \printbibliography + \cs_new:Npn \__whuproposal_printbibliography:n #1 + { + \__whuproposal_printbibliography_old [ #1 ] + } + \RenewDocumentCommand { \printbibliography } { O{} } + { + \group_begin: + \sloppy + \__whuproposal_printbibliography:n { heading = bibintoc, #1 } + \group_end: + } + } + } + +\cs_set_eq:NN \__whuproposal_old_tableofcontents \tableofcontents +\RenewDocumentCommand { \tableofcontents } { } + { + \group_begin: + \ctexset + { + section / format = \zihao {-3} \centering \bfseries + } + \__whuproposal_old_tableofcontents + \vspace*{2em} + \group_end: + } + + +% 处理本科生的开题报告:本科毕业论文(设计)任务书 + + +\tl_const:Nn \c__whuproposal_bachelor_heading_tl + { 武汉大学本科毕业论文(设计) \\ 开 题 报 告 } + +% 本科、开题报告左右边距 3 cm,上边距 2.5 cm,下边距 2 cm +\skip_const:Nn \c__whuproposal_bachelor_baseline_skip { 23 pt } + +% 行距 23 pt +\cs_new_protected:Npn \__whuproposal_bachelor_baseline_skip: + { + + \skip_set_eq:NN \baselineskip \c__whuproposal_bachelor_baseline_skip + \skip_zero:N \parskip + } + + +% 开头 +\cs_new_protected:Npn \__whuproposal_bachelor_front_matter: + { + \pagestyle { plain } + \begin { center } + \zihao { -2 } \heiti \c__whuproposal_bachelor_heading_tl + \end { center } + + \__whuproposal_bachelor_baseline_skip: + \hbox_set:Nn \l__whuproposal_tmp_box { \zihao{-4} 毕业论文(设计)题目: } + \dim_gset:Nn \g__whuproposal_title_width_dim + { + \dim_eval:n { \textwidth - \box_wd:N \l__whuproposal_tmp_box } + } + \noindent + \begin { minipage } { \textwidth } + \__whuproposal_bachelor_baseline_skip: + % 毕业论文(设计)题目: \CJKunderline* { \hfill \g__whuproposal_title_tl \hfill } \\ + 毕业论文(设计)题目: + \begin{minipage}[t]{\g__whuproposal_title_width_dim} + \CJKunderline* { \hfill \g__whuproposal_title_tl \hfill } + \end{minipage}\\[2ex] + 学院: \uline { \hfill \g__whuproposal_department_tl \hfill } \hfill \hfill + 学号: \uline { \hfill \g__whuproposal_student_id_tl \hfill } \hfill + \hfill 姓名: \uline { \hfill \g__whuproposal_author_tl \hfill } + \end { minipage } + \par \skip_vertical:n { 10 pt } + \raggedbottom + \__whu_set_table_font: + } +\cs_new_protected:Npn \__whu_set_table_font: + { + \clist_map_inline:nn { tabular , tabularx , longtable , xltabular } + { \AtBeginEnvironment {##1} { \zihao { 5 } } } + } + +% 落款 +\cs_new_protected:Npn \__whuproposal_bachelor_back_matter: + { + \skip_vertical:n { 2 \c__whuproposal_bachelor_baseline_skip } + \needspace { 0.3 \textheight } + 指导老师意见: + \vfill + \hfill 指导老师(签名): \hbox_to_wd:nn { 4 cm } {} \par + \skip_vertical:N \c__whuproposal_bachelor_baseline_skip + \hfill 年 \qquad 月 \qquad 日 + } \ No newline at end of file