Skip to content

Commit

Permalink
适配最新版tcolorbox宏包
Browse files Browse the repository at this point in the history
  • Loading branch information
note286 committed Jan 3, 2022
1 parent a7b5352 commit bfc1eeb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 50 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ Texmaker内置了PDF查看器,支持正向同步和反向同步功能,具体

# 版本记录

- `2022-01-03` [`v0.7.2`](https://github.com/note286/xdupgtp/releases/tag/v0.7.2) 适配最新版tcolorbox宏包。
- `2022-01-02` [`v0.7.1`](https://github.com/note286/xdupgtp/releases/tag/v0.7.1) 修正开题报告要求标题字体。
- `2022-01-02` [`v0.7.0`](https://github.com/note286/xdupgtp/releases/tag/v0.7.0) 支持签名图像。
- `2022-01-02` [`v0.6.0`](https://github.com/note286/xdupgtp/releases/tag/v0.6.0) 新增支持Overleaf和TeXPage。
Expand Down
79 changes: 29 additions & 50 deletions xdupgtp.cls
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{xdupgtp}[2022/01/02 Xidian University Postgraduate Thesis Proposal class, v0.7.1, created by @note286, published in https://note286.github.io/xdupgtp/]
\ProvidesClass{xdupgtp}[2022/01/03 Xidian University Postgraduate Thesis Proposal class, v0.7.2, created by @note286, published in https://note286.github.io/xdupgtp/]

% 学术学位博士研究生 Doctor of Academic
\newif\ifda\datrue
Expand Down Expand Up @@ -158,7 +158,8 @@
}
}
\ctexset{
subsection={name={(,)},
subsection={
name={(,)},
number={\chinese{subsection}},
format={\raggedright\bfseries\zihao{-4}},
aftername={},
Expand All @@ -168,7 +169,8 @@
}
}
\ctexset{
subsubsection={name={(,)},
subsubsection={
name={(,)},
number={\arabic{subsubsection}},
format={\raggedright\bfseries\zihao{-4}},
aftername={},
Expand Down Expand Up @@ -379,10 +381,12 @@
}

% 定义边框边距和线宽
\newcommand\boxmargin{5pt}
\newcommand\boxrule{1pt}
\newlength\boxmargin
\setlength{\boxmargin}{5pt}
\newlength\boxrule
\setlength{\boxrule}{1pt}

\newtcolorbox{mybox1}{
\tcbset{
standard jigsaw,
sharp corners=all,
colframe=black,
Expand All @@ -393,39 +397,24 @@
bottom=\boxmargin,
left=\boxmargin,
right=\boxmargin,
space to upper,
lower separated=false,
halign lower=flush right,
before upper={\noindent \linespread{1}\fontsize{12}{20}\selectfont}
beforeafter skip=0pt
}

\newtcolorbox{mybox1}{
before upper={\noindent\linespread{1}\fontsize{12}{20}\selectfont}
}

\newtcolorbox{mybox2}{
standard jigsaw,
sharp corners=all,
colframe=black,
before upper={\setlength{\parindent}{2em}\linespread{1}\fontsize{12}{20}\selectfont},
breakable,
height fixed for=all,
height fill=maximum,
opacityback=0,
boxsep=0pt,
boxrule=\boxrule,
top=\boxmargin,
bottom=\boxmargin,
left=\boxmargin,
right=\boxmargin,
space to upper,
lower separated=false,
halign lower=flush right,
before upper={\parindent 2em \linespread{1}\fontsize{12}{20}\selectfont}
halign lower=flush right
}

\newtcolorbox{mybox3}{
standard jigsaw,
sharp corners=all,
colframe=black,
opacityback=0,
boxsep=0pt,
boxrule=\boxrule,
top=0pt,
bottom=0pt,
left=0pt,
Expand All @@ -434,21 +423,11 @@
}

\newtcolorbox{mybox4}{
standard jigsaw,
sharp corners=all,
colframe=black,
before upper={\setlength{\parindent}{2em}\linespread{1}\fontsize{12}{20}\selectfont},
height=.5\textheight-.3\baselineskip+0.6pt,
opacityback=0,
boxsep=0pt,
boxrule=\boxrule,
top=\boxmargin,
bottom=\boxmargin,
left=\boxmargin,
right=\boxmargin,
space to upper,
lower separated=false,
halign lower=flush right,
before upper={\parindent 2em \linespread{1}\fontsize{12}{20}\selectfont}
halign lower=flush right
}

\ifmp
Expand All @@ -473,7 +452,7 @@
选题来源&\subjectSource\\
\specialrule{\boxrule}{0pt}{0pt}
\parbox[t][\zwzyWidth][c]{1em}{中文摘要}&
\parindent 2em
\setlength{\parindent}{2em}
\BODY \\
\specialrule{\boxrule}{0pt}{0pt}
\end{tabularx}
Expand All @@ -484,34 +463,34 @@
{\begin{mybox1}
选题来源:\subjectSource
\end{mybox1}
\vspace*{-\baselineskip-\boxrule}
\vspace*{-\boxrule}
\begin{mybox1}
中文摘要:
\end{mybox1}
\vspace*{-\baselineskip-\boxrule}
\vspace*{-\boxrule}
\begin{mybox2}}
{\end{mybox2}}
\fi

\newenvironment{xtyj}
{\vspace*{-0.6\baselineskip-\boxrule}
{\vspace*{0.1\baselineskip}
\begin{mybox2}}
{\bibliographystyle{gbt7714-numerical}
\bibliography{xdupgtp}
\end{mybox2}}

\newenvironment{yjfa}
{\vspace*{-0.6\baselineskip-\boxrule}
{\vspace*{0.1\baselineskip}
\begin{mybox2}}
{\end{mybox2}}

\newenvironment{yjjc}
{\vspace*{-0.6\baselineskip-\boxrule}
{\vspace*{0.1\baselineskip}
\begin{mybox2}}
{\end{mybox2}}

\newenvironment{bgjl}
{\vspace*{-0.6\baselineskip-\boxrule}
{\vspace*{0.1\baselineskip}
\begin{mybox2}
\ifdp
(着重记录专家对开题报告提出的问题及修改意见和建议。)
Expand Down Expand Up @@ -624,7 +603,7 @@
\end{tabular}
\end{center}
\end{mybox3}
\vspace*{-\baselineskip-\boxrule}
\vspace*{-\boxrule}
\thispagestyle{jiaozhu}
\begin{mybox2}
\noindent\textbf{开题报告评语及结论}
Expand All @@ -647,7 +626,7 @@

\ifadegree
\newenvironment{jsyj}
{\vspace*{-0.6\baselineskip-\boxrule}
{\vspace*{0.1\baselineskip}
\begin{mybox2}
\ifddegree
(重点对博士生按照开题报告会上专家意见建议进行修改的情况予以说明。)
Expand Down Expand Up @@ -685,7 +664,7 @@
\NewEnviron{xyjsyj}{}
\else
\newenvironment{xyjsyj}
{\vspace*{-\baselineskip-\boxrule}
{\vspace*{-\boxrule}
\begin{mybox4}
\ifddegree
(重点对博士生的开题情况以及是否同意开题予以说明。)
Expand Down

0 comments on commit bfc1eeb

Please sign in to comment.