所有模板目录改为中文名,并入幻灯片与科技报告两个仓库(#3)
目录改名(git mv 保留历史,包名不变): exam/ -> 试卷/ form/ -> 年度考核登记表/ form2/ -> 劳务发放说明表/ course/ -> 课程执行大纲/ 改名即可编译:实测 6 个模板在含中文的目录下 XeLaTeX 均零报错, PDF 逐页文本与改名前的版本完全一致(0 页差异,仅元数据时间戳变化)。 并入两个此前独立维护的仓库: ouc-slide-latex-template -> 幻灯片/ ouc-report-latex-template -> 科技报告/ 带入了 theme/ fonts/ logos/ figs/ cls/ input/ 与 fontawesome.pdf, 字体随模板附带(无须在系统安装)。中间文件一律不入库。 同步修正的文档:根 README 目录表改为中文名并说明统一维护; 四个子 README 的标题;ouclw.sty 注释里对 form/ 的交叉引用; 幻灯片与科技报告 README 里「从旧仓库 clone」「按年份切分支」等已失效的说明 (并入后只有 main 一个分支,各年份 TeX Live 通用)。 两个迁入模板的 PDF 保留源仓库原版(逐字节一致),未重新编译: 源 PDF 出自 TeX Live 2026,本机为 2022,重新编译会让结尾页装饰层定位 产生细微偏移,保留原版以保证样张与原来完全一致。
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% boxes
|
||||
%% 信息框
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%% 带标题的文本框
|
||||
\newtcolorbox{titledbox}[1]{%
|
||||
tikznode boxed title,
|
||||
enhanced,
|
||||
arc=3pt,
|
||||
interior style={white},
|
||||
attach boxed title to top center = {yshift=-\tcboxedtitleheight/2},
|
||||
fonttitle=\hm,
|
||||
colbacktitle=white,coltitle=black,
|
||||
boxed title style={size=normal,colframe=white,boxrule=0pt},
|
||||
boxrule=.5pt,
|
||||
left=5pt, right=5pt, top=5pt, bottom=0pt,
|
||||
boxsep=5pt,
|
||||
title={#1},
|
||||
halign=left,
|
||||
fontupper=\fzkai
|
||||
}
|
||||
|
||||
%% Note
|
||||
\newtcolorbox{notebox}{%
|
||||
enhanced,
|
||||
arc=2pt,
|
||||
boxrule=.5pt,
|
||||
left=5pt, right=5pt, top=0pt, bottom=0pt,
|
||||
boxsep=5pt,
|
||||
colframe=NavyBlue,
|
||||
colback=NavyBlue!5!White,
|
||||
colbacktitle=NavyBlue!5!White,
|
||||
coltext=NavyBlue,
|
||||
title={\textcolor{NavyBlue}{\faStickyNoteO\hspace{.5em}\bfseries{\hm{笔记}}}},
|
||||
halign=left,
|
||||
fontupper=\fzkai
|
||||
}
|
||||
|
||||
%% Important
|
||||
\newtcolorbox{importantbox}{%
|
||||
enhanced,
|
||||
arc=2pt,
|
||||
boxrule=.5pt,
|
||||
left=5pt, right=5pt, top=0pt, bottom=0pt,
|
||||
boxsep=5pt,
|
||||
colframe=Orange,
|
||||
colback=Orange!5!White,
|
||||
colbacktitle=Orange!5!White,
|
||||
coltext=Orange,
|
||||
title={\textcolor{Orange}{\faExclamationCircle\hspace{.5em}\bfseries{\hm{重要}}}},
|
||||
halign=left,
|
||||
fontupper=\fzkai
|
||||
}
|
||||
|
||||
%% verbatim 环境无法直接在新环境中使用
|
||||
%% 换用 \VerbatimEnvironment \begin{Verbatim}
|
||||
\RequirePackage{fancyvrb}
|
||||
|
||||
%% 命令行
|
||||
\newenvironment{shellbox}
|
||||
{%
|
||||
\VerbatimEnvironment
|
||||
\begin{tcolorbox}[
|
||||
enhanced,
|
||||
arc=2pt,
|
||||
boxrule=.5pt,
|
||||
left=5pt, right=5pt, top=0pt, bottom=0pt,
|
||||
boxsep=5pt,
|
||||
colframe=black,
|
||||
colback=white,
|
||||
coltext=black,
|
||||
title={},
|
||||
fontupper=\linespread{1.2}
|
||||
]%
|
||||
\begin{Verbatim}
|
||||
}
|
||||
{%
|
||||
\end{Verbatim}
|
||||
\end{tcolorbox}
|
||||
}
|
||||
|
||||
%% 命令行
|
||||
\newenvironment{invertedshellbox}
|
||||
{%
|
||||
\VerbatimEnvironment
|
||||
\begin{tcolorbox}[
|
||||
enhanced,
|
||||
arc=2pt,
|
||||
boxrule=.5pt,
|
||||
left=5pt, right=5pt, top=0pt, bottom=0pt,
|
||||
boxsep=5pt,
|
||||
colframe=black!70!white,
|
||||
colback=black!70!white,
|
||||
coltext=white,
|
||||
title={},
|
||||
fontupper=\linespread{1.2}
|
||||
]%
|
||||
\begin{Verbatim}
|
||||
}
|
||||
{%
|
||||
\end{Verbatim}
|
||||
\end{tcolorbox}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Chinese names
|
||||
%% 中文名称
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\renewcommand{\figurename}{图}
|
||||
\renewcommand{\tablename}{表}
|
||||
\renewcommand{\lstlistingname}{代码}
|
||||
\renewcommand{\abstractname}{摘要}
|
||||
@@ -0,0 +1,129 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% code listings
|
||||
%% 代码块设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\RequirePackage{listings,verbatim}
|
||||
|
||||
\definecolor{codecolorkeywords}{rgb}{0,0,1}
|
||||
\definecolor{codecolorcomments}{rgb}{0,0.5,0}
|
||||
\definecolor{codecolorxmlcomments}{rgb}{0.5,0.5,0.5}
|
||||
\definecolor{codecolorstrings}{rgb}{0.64,0.08,0.08}
|
||||
\definecolor{codecolortypes}{rgb}{0.17,0.57,0.68}
|
||||
|
||||
\lstdefinelanguage{JavaScript}{
|
||||
keywords={do, if, in, for, let, new, try, var, case, else, enum, eval, null, this, true, void, with, await, break, catch, class, const, false, super, throw, while, yield, delete, export, import, public, return, static, switch, typeof, default, extends, finally, package, private, continue, debugger, function, arguments, interface, protected, implements, instanceof},
|
||||
sensitive=true,
|
||||
comment=[l]{//},
|
||||
morecomment=[s]{/*}{*/},
|
||||
morestring=[b]',
|
||||
morestring=[b]"
|
||||
}
|
||||
|
||||
\lstdefinelanguage{TypeScript}{
|
||||
keywords={abstract, break, case, catch, class, const, continue, debugger, default, delete, do, else, enum, export, extends, false, finally, for, function, if, import, in, instanceof, new, null, return, super, switch, this, throw, true, try, typeof, var, void, while, with, as, implements, interface, let, package, private, protected, public, static, yield, any, boolean, constructor, declare, get, module, require, number, set, string, symbol, type, from, of},
|
||||
sensitive=true,
|
||||
comment=[l]{//},
|
||||
morecomment=[s]{/*}{*/},
|
||||
morestring=[b]',
|
||||
morestring=[b]"
|
||||
}
|
||||
|
||||
\lstdefinelanguage{golang}{
|
||||
keywords={break, default, func, interface, select, case, defer, go, map, struct, chan, else, goto, package, switch, const, fallthrough, if, range, type, continue, for, import, return, var},
|
||||
sensitive=true,
|
||||
comment=[l]{//},
|
||||
morecomment=[s]{/*}{*/},
|
||||
morestring=[b]',
|
||||
morestring=[b]"
|
||||
}
|
||||
|
||||
\lstdefinestyle{mystyle}{
|
||||
% Basic design
|
||||
basicstyle=\linespread{1.2}\ttfamily,
|
||||
frame=tb,
|
||||
framesep=5pt,
|
||||
framerule=.5pt,
|
||||
framexleftmargin=10pt,
|
||||
rulecolor=\color{black},
|
||||
abovecaptionskip=0pt,
|
||||
belowcaptionskip=5pt,
|
||||
aboveskip=5pt,
|
||||
backgroundcolor=\color{black!5!white},
|
||||
% Code design
|
||||
keywordstyle=\color{codecolorkeywords},
|
||||
commentstyle=\color{codecolorcomments},
|
||||
stringstyle=\color{codecolorstrings},
|
||||
numberstyle=\small\color{gray},
|
||||
breakatwhitespace=false,
|
||||
breaklines=true,
|
||||
captionpos=t,
|
||||
keepspaces=true,
|
||||
% Line numbers
|
||||
numbers=none,
|
||||
numbersep=15pt,
|
||||
xleftmargin=10pt,
|
||||
stepnumber=1,
|
||||
firstnumber=1,
|
||||
numberfirstline=true,
|
||||
% Code
|
||||
tabsize=4,
|
||||
showspaces=false,
|
||||
showstringspaces=false,
|
||||
showtabs=false,
|
||||
breaklines=true,
|
||||
}
|
||||
\lstset{style=mystyle}
|
||||
|
||||
%% 命令行
|
||||
\lstdefinestyle{bashstyle}{
|
||||
backgroundcolor=\color{NavyBlue!10!white},
|
||||
basicstyle=\linespread{1.2}\ttfamily,
|
||||
keepspaces=true,
|
||||
numbers=none,
|
||||
numbersep=10pt,
|
||||
frame=l,
|
||||
framerule=2pt,
|
||||
framesep=5pt,
|
||||
framexleftmargin=3pt,
|
||||
framextopmargin=-5pt,
|
||||
xleftmargin=10pt,
|
||||
rulecolor=\color{NavyBlue},
|
||||
% Code
|
||||
tabsize=4,
|
||||
showspaces=false,
|
||||
showstringspaces=false,
|
||||
showtabs=false,
|
||||
breaklines=true,
|
||||
}
|
||||
|
||||
%% 命令行输出
|
||||
\lstdefinestyle{bashoutputstyle}{
|
||||
backgroundcolor=\color{black!10!white},
|
||||
basicstyle=\linespread{1.2}\ttfamily,
|
||||
keepspaces=true,
|
||||
numbers=none,
|
||||
numbersep=10pt,
|
||||
frame=l,
|
||||
framerule=2pt,
|
||||
framesep=5pt,
|
||||
framexleftmargin=3pt,
|
||||
framextopmargin=-5pt,
|
||||
xleftmargin=10pt,
|
||||
rulecolor=\color{black!70!white},
|
||||
% Code
|
||||
tabsize=4,
|
||||
showspaces=false,
|
||||
showstringspaces=false,
|
||||
showtabs=false,
|
||||
breaklines=true,
|
||||
}
|
||||
|
||||
%% 代码列表标题
|
||||
\RequirePackage{caption}
|
||||
\DeclareCaptionFormat{codecaptionformat}{%
|
||||
%%\colorbox{black!20}{
|
||||
%% \parbox{\textwidth}{#1#2\ttfamily#3}
|
||||
%%}
|
||||
\parbox{\textwidth}{\textcolor{violet}\faCode~\textcolor{violet}{#1#2}\hspace{.5em}\fzkai#3}
|
||||
}
|
||||
\captionsetup[lstlisting]{format=codecaptionformat}
|
||||
@@ -0,0 +1,4 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% 图片设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\graphicspath{{./figs/}{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% fonts settings
|
||||
%% 字体设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%% \usepackage{ebgaramond}
|
||||
|
||||
%% 开明式:句末点号用占一个汉字宽度,标号和句内点号占半个汉字宽度
|
||||
%\punctstyle{kaiming}
|
||||
|
||||
%\setmainfont{Minion Pro}
|
||||
% \setmainfont{Myriad Pro}
|
||||
% \setsansfont{Myriad Pro}
|
||||
% \setmonofont{Courier Std}
|
||||
|
||||
%设置英文字体 鸿蒙字体
|
||||
% \setmainfont[
|
||||
% Path=font/,
|
||||
% BoldFont=Arvo-Bold.ttf,
|
||||
% ItalicFont=Arvo-Italic.ttf,
|
||||
% BoldItalicFont=Arvo-BoldItalic.ttf,
|
||||
% ]{Arvo-Regular.ttf}
|
||||
\setmainfont[
|
||||
Path=font/,
|
||||
BoldFont=HarmonyOS_Sans_Bold.ttf,
|
||||
ItalicFont=HarmonyOS_Sans_Regular_Italic.ttf,
|
||||
BoldItalicFont=HarmonyOS_Sans_Bold_Italic.ttf,
|
||||
]{HarmonyOS_Sans_Regular.ttf}
|
||||
\setsansfont[
|
||||
Path=font/,
|
||||
BoldFont=HarmonyOS_Sans_Bold.ttf,
|
||||
ItalicFont=HarmonyOS_Sans_Regular_Italic.ttf,
|
||||
BoldItalicFont=HarmonyOS_Sans_Bold_Italic.ttf,
|
||||
]{HarmonyOS_Sans_Regular.ttf}
|
||||
\setmonofont[
|
||||
Path=font/
|
||||
]{HarmonyOS_Sans_Regular.ttf}
|
||||
|
||||
\setCJKmainfont[
|
||||
Path=font/,
|
||||
BoldFont=fangzhengxiaobiaosong_GBK.TTF,
|
||||
ItalicFont=fangzhengkaiti_GBK.TTF,
|
||||
BoldItalicFont=fangzhengfangsong_GBK.TTF,
|
||||
]{fangzhengshusong_GBK.TTF}
|
||||
\setCJKsansfont[
|
||||
Path=font/,
|
||||
BoldFont=HarmonyOS_Sans_SC_Bold.ttf,
|
||||
ItalicFont=HarmonyOS_Sans_SC_Light.ttf,
|
||||
BoldItalicFont=HarmonyOS_Sans_SC_Black.ttf,
|
||||
]{HarmonyOS_Sans_SC_Regular.ttf}
|
||||
\setCJKmonofont[
|
||||
Path=font/
|
||||
]{fangzhengzhongdengxian_GBK.TTF}
|
||||
|
||||
\XeTeXlinebreaklocale "zh"
|
||||
\XeTeXlinebreakskip = 0pt plus 1pt
|
||||
|
||||
%方正书宋
|
||||
\setCJKfamilyfont{fzss}[
|
||||
Path=font/
|
||||
]{fangzhengshusong_GBK.TTF}
|
||||
\newcommand{\fzss}{\CJKfamily{fzss}}
|
||||
|
||||
%方正小标宋
|
||||
\setCJKfamilyfont{fzxbs}[
|
||||
Path=font/
|
||||
]{fangzhengxiaobiaosong_GBK.TTF}
|
||||
\newcommand{\fzxbs}{\CJKfamily{fzxbs}}
|
||||
|
||||
%方正楷体
|
||||
\setCJKfamilyfont{fzkai}[
|
||||
Path=font/
|
||||
]{fangzhengkaiti_GBK.TTF}
|
||||
\newcommand{\fzkai}{\CJKfamily{fzkai}}
|
||||
|
||||
%方正仿宋
|
||||
\setCJKfamilyfont{fzfs}[
|
||||
Path=font/
|
||||
]{fangzhengfangsong_GBK.TTF}
|
||||
\newcommand{\fzfs}{\CJKfamily{fzfs}}
|
||||
|
||||
%方正中等线
|
||||
\setCJKfamilyfont{fzzdx}[
|
||||
Path=font/
|
||||
]{fangzhengzhongdengxian_GBK.TTF}
|
||||
\newcommand{\fzzdx}{\CJKfamily{fzzdx}}
|
||||
|
||||
%鸿蒙字体
|
||||
\setCJKfamilyfont{hm}[
|
||||
Path=font/,
|
||||
BoldFont=HarmonyOS_Sans_SC_Bold.ttf,
|
||||
ItalicFont=HarmonyOS_Sans_SC_Light.ttf,
|
||||
BoldItalicFont=HarmonyOS_Sans_SC_Black.ttf,
|
||||
]{HarmonyOS_Sans_SC_Regular.ttf}
|
||||
\newcommand{\hm}{\CJKfamily{hm}}
|
||||
@@ -0,0 +1,19 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% 页面设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\geometry{
|
||||
textwidth=138mm,
|
||||
textheight=215mm,
|
||||
left=27mm,
|
||||
%% or
|
||||
%% inner=23mm,
|
||||
right=27mm,
|
||||
%% or
|
||||
%% outer=18mm,
|
||||
top=25.4mm, bottom=25.4mm,
|
||||
headheight=2.17cm,
|
||||
headsep=4mm,
|
||||
footskip=12mm,
|
||||
heightrounded,
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% global settings
|
||||
%% 全局格式设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%% 添加首行缩进,两个字符
|
||||
\setlength{\parindent}{2em}
|
||||
|
||||
%% 行距
|
||||
\linespread{1.5}
|
||||
|
||||
%% 表格
|
||||
\captionsetup[table]{belowskip=0pt,aboveskip=5pt}
|
||||
|
||||
%粗线,在表格中可以画出更粗的线条
|
||||
\newcommand{\thickhline}{%
|
||||
\noalign {\ifnum 0=`}\fi \hrule height 1pt
|
||||
\futurelet \reserved@a \@xhline
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% head and foot
|
||||
%% 页眉页脚
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% \RequirePackage{fancyhdr}
|
||||
% \RequirePackage{zhnumber}
|
||||
|
||||
% \pagestyle{fancy}
|
||||
% \fancyhf{}
|
||||
% \renewcommand\headrulewidth{.5pt}
|
||||
% \renewcommand\footrulewidth{0pt}
|
||||
% %\futurelet\TMPheadrule\def\headrule{{\color{violet}\TMPheadrule}}
|
||||
|
||||
% \renewcommand{\sectionmark}[1]{\markright{#1}}
|
||||
|
||||
% \fancyhead[C]{\fzkai{\rightmark}}
|
||||
% %\fancyhead[R]{\thepage}
|
||||
|
||||
% \fancyfoot[L]{\fzkai{\author}}
|
||||
% \fancyfoot[R]{\thepage}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\fancyhf{}
|
||||
\renewcommand\headrulewidth{.5pt}
|
||||
\renewcommand\footrulewidth{0pt}
|
||||
%\futurelet\TMPheadrule\def\headrule{{\color{violet}\TMPheadrule}}
|
||||
%\renewcommand{\sectionmark}[1]{\markright{#1}}
|
||||
\fancyhead[C]{\fzkai{\themaintitle}}
|
||||
%\fancyhead[C]{\@title}
|
||||
%\fancyhead[R]{\thepage}
|
||||
%\fancyfoot[L]{\fzkai{\@author}}
|
||||
\fancyfoot[C]{\thepage}% / \pageref{LastPage}}
|
||||
@@ -0,0 +1,12 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% hyperref settings
|
||||
%% 超链接设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\hypersetup{
|
||||
bookmarksnumbered,
|
||||
colorlinks,
|
||||
linkcolor={black},
|
||||
citecolor={black},
|
||||
urlcolor={black}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% 标题、目录等设定
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\ctexset{
|
||||
% 修改 section文字样式,
|
||||
section={
|
||||
name={,.},%编号和文字中间用.。
|
||||
number={\arabic{section}},%编号形式:\arabic设置为阿拉伯数字,\chinese设置为中文,\roman设置为小写罗马字母,\Roman设置为大写罗马字母,\alph设置为小写英文,\Alph设置为大写英文。
|
||||
format=\hm\bfseries\raggedright\zihao{4},%鸿蒙字体,小四号字,右对齐。
|
||||
aftername=\hspace{5pt},%编号和标题的距离
|
||||
% beforeskip=1ex,%标题与前文的距离
|
||||
% afterskip=1ex,%标题与后文的距离
|
||||
},
|
||||
%修改subsection文字样式
|
||||
subsection={
|
||||
format=\hm\bfseries\raggedright\zihao{-4},
|
||||
aftername=\hspace{5pt},%编号和标题的距离
|
||||
},
|
||||
%修改subsubsection文字样式
|
||||
subsubsection={
|
||||
format=\hm\bfseries\raggedright\zihao{5},
|
||||
aftername=\hspace{5pt},%编号和标题的距离
|
||||
}
|
||||
}
|
||||
|
||||
%设置目录的显示样式
|
||||
\renewcommand{\contentsname}{\begin{center} \normalsize \hm\zihao{4}\textbf{目录} \end{center}}
|
||||
\renewcommand{\listfigurename}{\begin{center} \normalsize \hm\zihao{4}\textbf{插图目录} \end{center}}
|
||||
\renewcommand{\listtablename}{{\begin{center} \normalsize \hm\zihao{4}\textbf{表格目录} \end{center}}}
|
||||
%给目录加上点
|
||||
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % 给 parts 加点
|
||||
%\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % 给 chapters 加点
|
||||
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} % 给 sections加点
|
||||
Reference in New Issue
Block a user