Skip to content

Commit

Permalink
Initial with cs proposal template
Browse files Browse the repository at this point in the history
- General format
- CS proposal format
  • Loading branch information
TheNetAdmin committed Apr 19, 2018
1 parent 3b42813 commit 4029240
Show file tree
Hide file tree
Showing 37 changed files with 766 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# TEX FILES
*.tex text eol=lf
*.bib text eol=lf

## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
243 changes: 243 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
### This project's output files ###
out/*
/*.pdf

### LaTeX ###
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb

## 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
*.nlo

# 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

# 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

### VisualStudioCode ###
.vscode/*
.history
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ZJUTHESIS

![ZJUTHESIS](https://img.shields.io/badge/ZJUTHESIS-Template-blue.svg)

## 简介

本项目为浙江大学本科生毕业设计/论文的LaTeX模板,来源于作者自行编写的计算机学院毕业设计模板。本模板依据2018年`浙江大学本科生毕业论文(设计)编写规则`编写了[通用格式](config/format/general/format.tex),并根据2018年`浙江大学计算机学院毕业设计开题报告模板`编写了[计算机科学与技术专业专用格式](config/format/major/cs/format.tex)

## 使用

1. 安装TexLive工具包,编译需要XeLatex引擎
2. download/clone本代码仓库
3.`content`目录下编写内容
3.`figure`目录下保存图片,在`reference/ref.bib`内插入文献条目
5. 在根目录下运行命令`latexmk -xelatex -outdir=out zjutheis`即可编译LaTex到`out`目录(该目录不会被记录版本)

## 扩展

1. 针对每个专业的扩展格式编写请新建目录`config/format/major/专业简称`,在该目录下固定新建文件`format.tex`,引入该目录下所有格式设置文件
2. 扩展格式的`\usepackage{packagename}`尽量放在其所在子目录下的`packages.tex`内,不要放在`config/packages.tex`内,避免其他专业同学使用时产生package冲突或额外引入
3. 最后更改`config/format/format.tex`中的引入规则,引入新扩展的格式目录下的`format.tex`即可

## Q&A

1. 为何不使用`.cls`:我个人认为将所有格式写入同一文件会造成扩展与修改的困难,面对一个.cls中几百行上千行的代码,即使有注释也很难进行正确的修改和扩展。所以我将所有格式以及命令定义都放入`config`文件夹内,并以文件名区分其负责的格式内容。虽然这样带来了大量的文件引入,但相对来讲更易于定位代码和进行扩展
2. 为何只有开题报告模板:编写此模板时,计算机学院只发布了开题报告模板,无法编写后续模板,故[当前模板版本号](config/version.tex)定为`0.*.*`。待后续模板编写完成后会发布`1.*.*`版本
3. 为何只有计算机科学与技术专业模板:由于个人精力有限,难以编写完全,如果其他专业同学有相关需求,可以:
- 在Github上提出issue,附上模板格式要求
- 发送邮件到我邮箱(zxwang42 [at] gmail [dot] com),附上模板格式要求与样例文件
- **在Github上提出Pull Request,贡献你编写的代码**
4. 其他问题请在Github issue提出或使用邮件与我联系

## 开源许可

本项目基于MIT协议开源
14 changes: 14 additions & 0 deletions config/commands.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
\makeatletter
\newcommand{\cleardoubleemptypage}
{
\clearpage
\if@twoside
\ifodd\c@page
% do nothing
\else
\thispagestyle{empty} ~ \newpage
\fi
\fi
}

\makeatother
6 changes: 6 additions & 0 deletions config/config.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
\input{config/info}
\input{config/packages}
\input{config/path}
\input{config/format/format}
\input{config/commands}
\input{config/version}
2 changes: 2 additions & 0 deletions config/format/format.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\input{config/format/general/format}
\input{config/format/major/cs/format}
2 changes: 2 additions & 0 deletions config/format/general/fonts.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\setCJKmainfont{STSong}
\setmainfont{Times New Roman}
6 changes: 6 additions & 0 deletions config/format/general/format.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
\input{config/format/general/layout}
\input{config/format/general/heading}
\input{config/format/general/fonts}
\input{config/format/general/reference}
\input{config/format/general/tables}
\input{config/format/general/numbering}
40 changes: 40 additions & 0 deletions config/format/general/heading.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
% ctex style settings
\ctexset
{
chapter =
{
format=\centering\zihao{3}\bfseries,
pagestyle=empty,
name={,、},
aftername=,
number=\chinese{chapter},
beforeskip=12pt,
afterskip=6pt
},
section =
{
format=\raggedright\zihao{-3}\bfseries,
name={,.},
number=\arabic{section},
beforeskip=13pt,
afterskip=13pt
},
subsection =
{
format=\raggedright\zihao{4}\bfseries,
name={},
number=\arabic{section}.\arabic{subsection},
beforeskip=13pt,
afterskip=13pt
},
subsubsection =
{
format=\raggedright\zihao{4}\bfseries,
name={},
aftername=~,
numbering=true,
number=\arabic{section}.\arabic{subsection}.\arabic{subsubsection},
beforeskip=0pt,
afterskip=0pt
}
}
Loading

0 comments on commit 4029240

Please sign in to comment.