diff --git a/mono/undergraduate/.github/workflows/CICID.yml b/mono/undergraduate/.github/workflows/CICID.yml new file mode 100644 index 00000000..e121383e --- /dev/null +++ b/mono/undergraduate/.github/workflows/CICID.yml @@ -0,0 +1,33 @@ + +name: Auto test + +on: + push: + pull_request: + branches: + - master + +jobs: + work: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # github action 默认签出只包含最后一次提交 + # 解决方案参考:https://stackoverflow.com/questions/62334460/git-history-in-a-github-action + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + # 触发论文的 action + - name: Compile LaTeX document + uses: xu-cheng/latex-action@v3 + with: + working_directory: . + root_file: hutbthesis_main.tex + texlive_version: 2023 + latexmk_use_xelatex: true + # 下载安装Times New Roman字体 + pre_compile: | + apk add msttcorefonts-installer fontconfig + update-ms-fonts + fc-cache -f diff --git a/mono/undergraduate/.gitignore b/mono/undergraduate/.gitignore new file mode 100644 index 00000000..c89dc294 --- /dev/null +++ b/mono/undergraduate/.gitignore @@ -0,0 +1,246 @@ +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb +clean.bat +elegant*-cn.pdf +elegant*-en.pdf +*.dates + +## 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 + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# 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 + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# easy-todo +*.lod + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# generated if using elsarticle.cls +*.spl diff --git a/mono/undergraduate/README.md b/mono/undergraduate/README.md new file mode 100644 index 00000000..65bc04f0 --- /dev/null +++ b/mono/undergraduate/README.md @@ -0,0 +1,81 @@ +# 本科毕业设计模板 + +湖南工商大学本科毕业设计模板。 + +# 使用 +推荐使用 [texstudio](https://pan.baidu.com/s/1Is2-VR1z-tMYvmdinsVY_g?pwd=hutb) 或 [overleaf](https://cn.overleaf.com/) 进行论文撰写。 + +注:在 latex 2023 中编译成功,latex 2016 编译失败(需要更高的版本,其他版本的 latex 没试过)。 + +# 贡献 +有任何对模板格式进行调整的可以提交 [Issues](https://github.com/OpenHUTB/undergraduate/issues) 或 [Pull Request](https://github.com/OpenHUTB/undergraduate/pulls) 。 + +# 选题 +[选题列表](https://github.com/OpenHUTB/undergraduate/wiki/%E6%AF%95%E8%AE%BE%E9%80%89%E9%A2%98) + + +## 要求 +1. 格式化、注释、文档翻译 +2. 运行 +3. 测试(例子通过) + + +## 初始化 + +1. 新建github工程 + +2. 运行`init_proj('PROJECT_NAME');` + +3. 分配开发者 + + +## 使用 +克隆仓库 +```shell +git clone --recursive https://github.com/OpenHUTB/undergraduate.git +``` + +## 修改方法 + +### 添加新的一页 + +以添加“授权使用说明书”为例: + +1.添加内容文件`content/authorizationzh.tex` + +2.在模板文件中`hutbthesis.cls`添加: +```latex +% 预定义名称 +\newcommand*{\hutb@name@authorization@zh}{声明} +``` +```latex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 诚信声明 +% +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newenvironment{authorizationzh} { + %\begin{titlepage}% + \hutb@pdfbookmark{0}{\hutb@name@authorization@zh} + %\renewcommand*{\headsep}{20pt} + \vspace*{0pt} + % \begin{center} \zihao{-2} \heiti \@titlecn \end{center} + \vspace{0pt} + \begin{center} \zihao{2} \heiti 湖南工商大学本科毕业设计版权使用授权书 \end{center} % 摘要为三号黑体 + \vspace{12pt} + \linespread{1.5} + \zihao{4}\songti % 内容为四号宋体 + + %\end{titlepage}% + +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +``` + +3.在主文件`hutbthesis_main.tex`中引入 +```latex +\include{content/authorizationzh} +``` + diff --git a/mono/undergraduate/cmdel.bat b/mono/undergraduate/cmdel.bat new file mode 100644 index 00000000..c9642e0a --- /dev/null +++ b/mono/undergraduate/cmdel.bat @@ -0,0 +1,2 @@ +del /a /f *.xml *.bcf *.out *.log *.sav *.gz *.aux *.bbl *.bak *.dvi *.blg + diff --git a/mono/undergraduate/content/abstracten.tex b/mono/undergraduate/content/abstracten.tex new file mode 100644 index 00000000..1b5bf51d --- /dev/null +++ b/mono/undergraduate/content/abstracten.tex @@ -0,0 +1,10 @@ +%!TEX root = ../csuthesis_main.tex +\keywordsen{HUTB\ \ LaTeX\ \ Template} +\begin{abstracten} + +LaTeX can be compiled into a pdf of uniform format using the set template.At present, most domestic publishers and universities still use word. Because of its powerful function and flexibility, when faced with fixed-form papers by novices, simple matters such as typesetting, numbering, and reference documents will bring many difficulties and troubles. For some problems that need to be modified throughout, to achieve the efficiency of LaTeX, it requires a high level of skill for word users. + +In order to focus on the writing of papers, many international journals and universities support the writing and submission of LaTeX. Novices don't need to care about formatting issues. They only need to use a few symbolic labels step by step to get the documents that meet the requirements. And when you need to modify the entire format, you can directly recompile the template file by replacing or modifying the template file. This is incredible for the word novice to use the word. + + +\end{abstracten} \ No newline at end of file diff --git a/mono/undergraduate/content/abstractzh.tex b/mono/undergraduate/content/abstractzh.tex new file mode 100644 index 00000000..ab247941 --- /dev/null +++ b/mono/undergraduate/content/abstractzh.tex @@ -0,0 +1,14 @@ +%!TEX root = ../csuthesis_main.tex +% 设置中文摘要 +\keywordscn{湖南工商大学\quad 学位论文\quad LaTeX模板} +%\categorycn{TP391} +\begin{abstractzh} + +LaTeX利用设置好的模板,可以编译为格式统一的pdf。目前国内大多出版社与高校仍在使用word,word由于其强大的功能与灵活性,在新手面对形式固定的论文时,排版、编号、参考文献等简单事务反而会带来很多困难与麻烦,对于一些需要通篇修改的问题,要想达到LaTeX的效率,对word使用者来说需要具有较高的技能水平。 + +为了能把主要精力放在论文撰写上,许多国际期刊和高校都支持LaTeX的撰写与提交,新手不需要关心格式问题,只需要按部就班的使用少数符号标签,即可得到符合要求的文档。且在需要全篇格式修改时,更换或修改模板文件,即可直接重新编译为新的样式文档,这对于word新手使用word的感受来说是不可思议的。 + +本项目的目的是为了创建一个符合湖南工商大学本科生撰写规范的TeX模板,解决学位论文撰写时格式调整的痛点。 + + +\end{abstractzh} \ No newline at end of file diff --git a/mono/undergraduate/content/acknowledgements.tex b/mono/undergraduate/content/acknowledgements.tex new file mode 100644 index 00000000..5b7a3d87 --- /dev/null +++ b/mono/undergraduate/content/acknowledgements.tex @@ -0,0 +1,18 @@ +%!TEX root = ../csuthesis_main.tex +\begin{acknowledgements} + +感谢制作出中南大学本科学位论文 LaTeX 模板的edwardzcn。 + +感谢制作出中南大学博士学位论文 LaTeX 模板的郭大侠@CSGrandeur。 + +感谢添加本科学位论文样式支持的@BlurryLight。 + +感谢帮助重构项目并进行测试的@burst-bao以及为独立使用LaTeX进行毕业论文写作提供宝贵经验的16级的姜析阅学长。 + +感谢 CTeX-kit 提供了 LaTeX 的中文支持。 + +感谢上海交通大学学位论文 LaTeX 模板的维护者们 @sjtug 和清华大学学位论文 LaTeX 模板的维护者们 @tuna 给予的宝贵设计经验。 + +感谢所有为模板贡献过代码的同学们! + +\end{acknowledgements} diff --git a/mono/undergraduate/content/appendix.tex b/mono/undergraduate/content/appendix.tex new file mode 100644 index 00000000..d952b542 --- /dev/null +++ b/mono/undergraduate/content/appendix.tex @@ -0,0 +1,109 @@ +%!TEX root = ../csuthesis_main.tex +% \begin{appendixs} % 无章节编号 +\chapter{附录代码} + +附录部分用于存放这里用来存放不适合放置在正文的大篇幅内容、典型如代码、图纸、完整数学证明过程等内容。 + +\section{堆溢出检测算法} + +\begin{algorithm}[h] + \caption{堆溢出检测算法}\label{alg:ovf} + \begin{algorithmic}[1] + \IF {$\beta \in \mathbb{N^{*}} \land \Delta_\beta = \Delta_{\beta - 1} \land \beta < S$} + \STATE 正常写入 + \ELSIF {$\beta \in \mathbb{N^{*}} \land \Delta_\beta \neq \Delta_{\beta - 1} \land \beta \geq S$} + \STATE 发生堆溢出 + \ENDIF + \end{algorithmic} +\end{algorithm} + +\section{KMP算法C++描述} + +% \begin{minted}[linenos]{c} +\begin{lstlisting} + const int maxn=2e5+5; + int nt[maxn]; + int aa[maxn],bb[maxn]; + int a[maxn],b[maxn]; + int n; + //参数为模板串和next数组 + //字符串均从下标0开始 + void kmpGetNext(int *s,int *Next) + { + Next[0]=0; + // int len=strlen(s); + for(int i=1,j=0;i>n) + { + memset(a,0,sizeof(a)); + memset(b,0,sizeof(b)); + rep(i,0,n) cin>>aa[i]; + rep(i,0,n) cin>>bb[i]; + sort(aa,aa+n); + sort(bb,bb+n); + rep(i,0,n-1){ + a[i]=aa[i+1]-aa[i]; + b[i]=bb[i+1]-bb[i]; + } + a[n-1]=360000+aa[0]-aa[n-1]; + // rep(i,0,n) cout<