1 Star 0 Fork 5

phyzgb/SCU_Beamer_Slide-demo

forked from Wu/SCU_Beamer_Slide-demo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
beamerthemescu.sty 57.33 KB
一键复制 编辑 原始数据 按行查看 历史
Wu 提交于 2022-03-21 22:34 . Update to adapt to v1.3a
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653
% This is file `beamerthemescu.sty'.
% Copyright (C) 2021-2022 by Linrong Wu.
% Version: 2021/12/30 v1.1a (Original Version: 2021/11/30 v1.0a).
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.
%
% Provide options::
% MathFont = LM | XITS
% BlockDisplay = colorful | followtheme | allgrey
% CodeDisplay = listing | minted
% ContentMuticols = true | false
% Background = true | false
%
% 本文件为 SCU_Beamer_Slide-demo 宏包文件.
% !请勿轻易改动此文档中代码.
%%%% ----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{beamerthemescu}[2022/03/10 v1.2a, SCU Beamer Theme(Main Theme)]
%%%% ----------------------------------------------------------------
\def\mycopyright{\vspace{2ex}Copyright\enspace\copyright\enspace2021-2022 by Linrong Wu.}
% ----------------
% Declare of Options
% ----------------
% 定义新的 if.
\newif\ifbeamer@chinese
\newif\ifbeamer@scu@contentmuticols
\newif\ifbeamer@scu@background
% 声明参数.
\DeclareOptionBeamer{MathFont}{\def\beamer@scu@MathFont{#1}}
\DeclareOptionBeamer{BlockDisplay}{\def\beamer@scu@BlockDisplay{#1}}
\DeclareOptionBeamer{CodeDisplay}{\def\beamer@scu@CodeDisplay{#1}}
\DeclareOptionBeamer{MintedStyle}{\def\beamer@scu@MintedStyle{#1}}
\DeclareOptionBeamer{ColorDisplay}{\PassOptionsToPackage{ColorDisplay=#1}{beamercolorthemescu}}
\DeclareOptionBeamer{LanguageMode}{\def\beamer@scu@LanguageMode{#1}}
\DeclareOptionBeamer{chinese}[true]{\csname beamer@chinese#1\endcsname}
\DeclareOptionBeamer{ContentMuticols}{\csname beamer@scu@contentmuticols#1\endcsname}
\DeclareOptionBeamer{Background}{\csname beamer@scu@background#1\endcsname}
\PassOptionsToClass{aspectratio=169}{beamer}
% 预执行参数.
\ExecuteOptionsBeamer{%
MathFont=LM,%
BlockDisplay=colorful,%
CodeDisplay=listing,%
ColorDisplay=JXred,%
LanguageMode=cn,%
ContentMuticols=true,%
Background=ture%
}
\ProcessOptionsBeamer
% 参数选项名称定义.
% MathFont.
\def\beamer@scu@MathFonttypeXITS{XITS}
\def\beamer@scu@MathFonttypeLM {LM}
% BlockDisplay.
\def\beamer@scu@BlockDisplaytypecolorful {colorful}
\def\beamer@scu@BlockDisplaytypefollowtheme{followtheme}
\def\beamer@scu@BlockDisplaytypeallgrey {allgrey}
% CodeDisplay.
\def\beamer@scu@CodeDisplaytypeminted {minted}
\def\beamer@scu@CodeDisplaytypelisting{listing}
\def\beamer@scu@MintedStyletypelightmode{lightmode}
\def\beamer@scu@MintedStyletypedarkmode {darkmode}
% 定义执行命令. 修改自 sjtubeamer.
\def\EqualOptionsBeamer{%
\relax\fi\ifEqualOptionsBeamer%
}
% #1: Option - Key.
% #2: Option - Value.
\def\ifEqualOptionsBeamer#1#2{%
\newif\ifoption@tmp%
\edef\optionkey@tmp{%
\csname beamer@scu@#1\endcsname%
}%
\edef\optionvalue@tmp{#2}%
\ifx\optionkey@tmp\optionvalue@tmp\option@tmptrue%
\else\option@tmpfalse\fi%
\ifoption@tmp%
}
% 定义命令写法. 修改自 lshort-zh-cn.
\DeclareRobustCommand*\cmd[1]{\alert{\texttt{\char`\\#1}}}
\DeclareRobustCommand*\env[1]{\alert{\texttt{#1}}}
\DeclareRobustCommand*\pkg[1]{\alert{\textsf{#1}}}
\DeclareRobustCommand*\cls[1]{\alert{\textsf{#1}}}
\DeclareRobustCommand*\marg{\@ifstar\@marg\@margmeta}
\DeclareRobustCommand*\oarg{\@ifstar\@oarg\@oargmeta}
\DeclareRobustCommand*\Arg[1]{\@meta{#1}}
\def\@oarg#1{\textcolor{scugrey}{\texttt{[#1]}}}
\def\@oargmeta#1{\@oarg{\@meta{#1}}}
\def\@marg#1{\texttt{\{#1\}}}
\def\@margmeta#1{\@marg{\@meta{#1}}}
\def\@meta#1{$\m@th\langle$\textnormal{\textit{#1}}$\m@th\rangle$}
% ----------------
\mode<presentation>
% ----------------
% Package Using
% ----------------
\if\EqualOptionsBeamer{LanguageMode}{cn}
\RequirePackage[fontset=none]{ctex}% 提供统一的 LaTeX 中文文档框架.
\if\EqualOptionsBeamer{LanguageMode}{en}
\RequirePackage[fontset=none, scheme=plain]{ctex}
\fi\fi
\RequirePackage{xeCJK}% xeCJK: 排版 CJK 文字.
\RequirePackage{fontspec}% fontspec: 字体设置.
\RequirePackage{unicode-math}% unicode-math: OpenType 数学字体.
\RequirePackage{tikz}% tikz: 绘制图像.
\usetikzlibrary{turtle}
\RequirePackage{comment}% comment: 提供注释环境.
\RequirePackage{xparse}% xparse: 指定命令参数.
\RequirePackage{varioref}% varioref: 交叉引用.
\RequirePackage{cleveref}% cleveref: 交叉引用.
\RequirePackage{tcolorbox}% tcolorbox: 绘制彩色文本框.
\RequirePackage{fbox}
\if\EqualOptionsBeamer{CodeDisplay}{minted}%
\RequirePackage[outputdir=mintedbuild]{minted}% 调用 minted 宏包, 临时文件存储在 mintedbuild 文件夹.
\tcbuselibrary{most, xparse, listings, minted}
\PackageWarningNoLine{beamerthemescu}{%
beamerthemscu package loaded with `CodeDisplay=minted' option. %
Please add `-shell-escape' and `-8bit' parameters to XeLaTeX.}
\else\if\EqualOptionsBeamer{CodeDisplay}{listing}%
\tcbuselibrary{most, xparse, listings}
\PackageWarningNoLine{beamerthemescu}{%
beamerthemscu package loaded with `CodeDisplay=listing' option. %
If you have configured Python environment, %
you are recommended to set `CodeDisplay=minted' option and %
install Pygments through pip. %
Please add `-shell-escape' and `-8bit' parameters to XeLaTeX.}
\fi\fi
\RequirePackage{adjustbox}% adjustbox: 处理盒子.
\RequirePackage{xhfill}% xhfill: 定制化线填充.
\RequirePackage{ifthen}% ifthen: 控制结构语句.
\RequirePackage{fontawesome}% fontawesome: 提供可缩放矢量图标.
\RequirePackage{tabularx}% tabularx: 智能表格环境.
\RequirePackage[%
backend=biber,%
autolang=hyphen,%
style=gb7714-2015,%
gbalign=gb7714-2015,%style=gb7714-2015ms
gbstyle=false, url=false, doi=false, isbn=false,%
sorting=none]{biblatex}% biblatex: 参考文献.
% ----------------
\@ifpackageloaded{minted}{%
\ExecuteOptionsBeamer{MintedStyle=lightmode}%
}
\ProcessOptionsBeamer
% ----------------
% Some Settings
% ----------------
%\hyperref{urlcolor=scugreen}
% 调整左右边距.
\setbeamersize{text margin left=0.036\paperwidth, text margin right=0.036\paperwidth}
% 设置目录深度为 2 (显示至 subsection).
\setcounter{tocdepth}{2}
% 设置图片路径为项目文件夹下 `image' `images' `figure' `figures'.
\graphicspath{{image/}{images/}{figure/}{figures/}{resources/}}
% 导入参考文献 bib 文件.
\addbibresource[location=local]{ref.bib}
% 半透明化尚未出现的内容.
\setbeamercovered{transparent}
% 导航栏为空.
\beamertemplatenavigationsymbolsempty
% 参考文献设置.
\beamertemplatetextbibitems
% ----------------
% ----------------
% Theme Layout
% Confirmed in v1.3a.
% 包含外部主题, 内部主题, 颜色主题.
% ----------------
% 颜色主题 - scu.
\usecolortheme{scu}
% 内部主题 - rounded (圆形边框).
\useinnertheme{rounded}
% 取消 itemize 环境编号.
\setbeamertemplate{itemize items}[circle]
% 设置 enumerate 环境编号为圆形.
\setbeamertemplate{enumerate items}[circle]
% 设置目录中章节编号为圆形.
\setbeamertemplate{sections/subsections in toc}[circle]
% 图标题编号.
\setbeamertemplate{caption}[numbered]
% 定理标题编号.
\setbeamertemplate{theorems}[numbered]
% 设置 blocks 区块为 rounded (圆形边框), 阴影开启.
\setbeamertemplate{blocks}[rounded][shadow=true]
% 设置 bibliography 列表为 text 显示模式.
\setbeamertemplate{bibliography item}[text]
% 压缩模式.
\beamer@compresstrue
% ----------------
% ----------------
% Length Define
% ----------------
% A paper width for the footline.
\newlength{\halfpaperwidth}
% The left margin.
\newlength{\headingleftmargin}
% Paper width minus margins.
\newlength{\headingwidthminusmargins}
% Height of the heading block.
\newlength{\headingheight}
% Height of the footer block.
\newlength{\footerheight}
% The height for the titlepageheader in the title page.
\newlength{\titlepageheaderheight}
% The height for the footer in the title page.
\newlength{\titlepagefooterheight}
% The height for the main title block.
\newlength{\titlepagemaintitleblockheight}
% The height for the subtitle block.
\newlength{\titlepagesubtitleblockheight}
% The height for the name and date block.
\newlength{\titlepagenamedateblockheight}
% The height for the institution block.
%\newlength{\titlepageinstitutionheight}
% The lengths for spacing between name and date.
\newlength{\titlepagespaceundername}
\newlength{\titlepagespaceunderdate}
% The length for the light thin bar.
\setlength{\headingleftmargin}{0.05573\paperwidth}
\setlength{\headingwidthminusmargins}{\paperwidth}
\addtolength{\headingwidthminusmargins}{-\headingleftmargin}
\setlength{\headingheight}{0.1\paperheight}
\setlength{\footerheight}{0.09017\paperheight}
\setlength{\titlepageheaderheight}{0.2\paperheight}
\setlength{\titlepagefooterheight}{0.0\paperheight}
\setlength{\titlepagemaintitleblockheight}{0.16\paperheight}
\setlength{\titlepagesubtitleblockheight}{0.1\paperheight}
\setlength{\titlepagenamedateblockheight}{0.36\paperheight}
\setlength{\titlepagespaceundername}{16pt}
\setlength{\titlepagespaceunderdate}{4pt}
\setlength{\bibitemsep}{0.75ex}
% ----------------
% ----------------
% Background Layout
% Confirmed in v1.3a.
% 设置了主题背景选项 "background=ture" & "background=false".
% 设置了页眉 logo.
% ----------------
\ifbeamer@scu@background%
% 设置 "background.png" 为图片 "bg".
\pgfdeclareimage[width=\paperwidth]%
{bg}{./resources/background.png}
% 设置图片 "bg" 为背景图片.
\usebackgroundtemplate{\pgfuseimage{bg}}
% 设置 "backgroundofsubsectiontocpage.png" 为图片 "bgofsubsectoc".
\pgfdeclareimage[width=\paperwidth]%
{bgofsubsectoc}{./resources/backgroundofsubsectiontocpage.png}
% 设置 "backgroundoftitlepage.png" 为图片 "bgoftitle".
\pgfdeclareimage[width=\paperwidth]%
{bgoftitle}{./resources/backgroundoftitlepage.png}
\else%
% 设置 "backgroundoftitlepage(Light).png" 为图片 "bgoftitle".
\pgfdeclareimage[width=\paperwidth]%
{bgoftitle}{./resources/backgroundoftitlepage(Light).png}
\fi
% 设置 "SCUname.pdf" 为图片 "logo".
\pgfdeclareimage[width=6.25em]%
{lg}{./resources/SCUname.pdf}
% ----------------
% ----------------
% Font Layout
% 设置了主题数学字体选项 "mathdisplay=XITS" & "mathdisplay=LM".
% ----------------
%\newfontfamily\cmcsc{cmcsc10.mf}
%\def\scshape{\cmcsc}
%\setmainfont[SmallCapsFont]{cmcsc10.mf}
% 设置无衬线字体为 Computer Modern Unicode Bright 字体族(Opentype 格式).
\setsansfont{CMU Sans Serif}
% 数学字体设置.
\if\EqualOptionsBeamer{MathFont}{XITS}%
% 数学字体 - XITS Math.
\setmathfont{XITS Math}
\else\if\EqualOptionsBeamer{MathFont}{LM}%
% 数学字体 - Latin Modern Math.
\setmathfont{Latin Modern Math}
\fi\fi
% 设置中文无衬线字体为项目文件夹下 "fonts" 中 "simkai.ttf" (楷体), 加粗为 "simhei.ttf" (黑体).
%\setCJKsansfont[Path="fonts/",BoldFont={simhei.ttf}]{simkai.ttf}
\setCJKsansfont[Scale=0.956]{Microsoft YaHei}
%\setCJKsansfont{LXGWWenKai-Bold.ttf}[Path="fonts/",Scale=0.956,BoldFont={SourceHanSansSC-Medium.otf}]
%\usefonttheme{professionalfonts}
% ----------------
% ----------------
% Font Sizes Layout
% ----------------
% 幻灯标题字体设置.
\setbeamerfont{frametitle}{size=\large,series=\bfseries}
\setbeamerfont{framesubtitle}{size=\scriptsize,series=\bfseries}
% 封页字体设置.
\setbeamerfont{title}{size=\Large,series=\bfseries}
\setbeamerfont{subtitle}{size=\footnotesize,series=\bfseries}
\setbeamerfont{author}{size=\normalsize}
\setbeamerfont{date}{size=\scriptsize}
\setbeamerfont{block title}{size=\normalsize}
\setbeamerfont{structure}{size=\normalsize,series=\bfseries}
% 脚注字号设置.
\setbeamerfont{footnote}{size=\scriptsize}
% 页眉页脚字体设置.
\setbeamerfont{section in head/foot}{size=\scriptsize,series=\bfseries}
\setbeamerfont{subsection in head/foot}{size=\scriptsize,series=\bfseries}
\setbeamerfont{institute in head/foot}{size=\scriptsize,series=\bfseries}
\setbeamerfont{author in head/foot}{size=\tiny,series=\bfseries}
\setbeamerfont{title in head/foot}{size=\tiny,series=\mdseries}
\setbeamerfont{framenumber in head/foot}{size=\scriptsize,series=\bfseries}
% itemize 环境序号设置.
\setbeamertemplate{itemize item}{\scriptsize\raise1.25pt\hbox{\textbullet}}
\setbeamertemplate{itemize subitem}{\scriptsize\raise1.25pt\hbox{\textbullet}}
\setbeamertemplate{itemize subsubitem}{\scriptsize\raise1.25pt\hbox{\textbullet}}
% 参考文献目录字号设置为6号.
\renewcommand*{\bibfont}{\footnotesize}
% ----------------
% ----------------
% Mini-frames Layout
% Confirmed in v1.1a.
% 参考了: https://tex.stackexchange.com/questions/314847/beamer-theme-antibes-plus-navigation-bar-with-circles-for-subsections/314961#314961.
% ----------------
% 计数器 - 小节起始页.
\newcount\beamer@subsectionstartframe
\beamer@subsectionstartframe=2
% 使用 etoolbox 宏包修改 `beamerbasesection.sty' 中 \beamer@subsection 命令.
\apptocmd{\beamer@subsection}{%
\addtocontents{nav}{\protect\headcommand{%
\protect\beamer@subsectionframes{%
\the\beamer@subsectionstartframe%
}{\the\c@framenumber}%
}}%
}{}{}
\apptocmd{\beamer@subsection}{%
\beamer@subsectionstartframe=\c@framenumber\relax%
}{}{}
% document 结束时设置 \headcommand 写入项. (\noexpand 表示不展开命令)
\AtEndDocument{%
\immediate\write\@auxout{\string\@writefile{nav}{%
\noexpand\headcommand{%
\noexpand\beamer@subsectionframes{%
\the\beamer@subsectionstartframe%
}{\the\c@framenumber}%
}%
}}%
}{}{}
% 定义小节结束页命令. (实际此处设置为后续小节起始帧, document 结束时设置为结束帧)
\def\beamer@subsectionendframe{2}
\def\beamer@subsectionframes#1#2{%
\ifnum\c@framenumber<#1%
\else%
\ifnum\c@framenumber>#2%
\else%
\gdef\beamer@subsectionendframe{#2}%
\fi%
\fi%
}
% 按照 beamer 方式储存命令.
\newcommand\insertsubsectionendframe{\beamer@subsectionendframe}
% 计数器 - 小节中当前幻灯帧数.
\newcounter{subsectioncurrentframe}
% 计数器 - 小节中总幻灯帧数.
\newcounter{subsectiontotalframes}
% 长度 - 迷你帧间距.
\newlength{\beamer@scu@miniframesspace}
% #1: 迷你帧间距 - 小节幻灯帧数不大于10.
% #2: 迷你帧间距 - 小节幻灯帧数大于10且不大于15.
% #3: 迷你帧间距 - 小节幻灯帧数大于15.
\def\insertsubsectionminiframes#1#2#3{%
% 小节当前幻灯帧数设置.
\setcounter{subsectioncurrentframe}{\insertframenumber}%
\addtocounter{subsectioncurrentframe}{1}%
\addtocounter{subsectioncurrentframe}{-\beamer@subsectionstartpage}%
% 小节总幻灯帧数设置.
\setcounter{subsectiontotalframes}{\insertsubsectionendframe}%
\addtocounter{subsectiontotalframes}{0}%
\addtocounter{subsectiontotalframes}{-\beamer@subsectionstartpage}%
% 迷你帧间距设置.
\ifnum\c@subsectiontotalframes>15%
\setlength{\beamer@scu@miniframesspace}{#3}%
\else\ifnum\c@subsectiontotalframes>10%
\setlength{\beamer@scu@miniframesspace}{#2}%
\else%
\setlength{\beamer@scu@miniframesspace}{#1}%
\fi\fi%
% foreach 循环控制 mini-frames 输出.
\hbox{%
\ifnum\c@subsectiontotalframes>1%
\foreach \i in {1,...,\c@subsectiontotalframes}{%
\usebeamercolor{mini frame}%
% 帧数小于当前帧, 则输出实心圆, 否则输出空心圆.
\ifnum\i<\numexpr\c@subsectioncurrentframe+1%
\hskip\beamer@scu@miniframesspace%
\usebeamertemplate{mini frame}%
\else%
\hskip\beamer@scu@miniframesspace%
\usebeamertemplate{mini frame in current section}%
\fi%
}%
\fi%
}%
}
% ----------------
% ----------------
% Tikz Def Layout
% Confirmed in v1.3a.
% ----------------
\newdimen\beamer@scu@sectionbar
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\beamer@scu@sectionbar=0.71\paperwidth%
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\beamer@scu@sectionbar=0.52\paperwidth%
\fi\fi
% 页眉样式定义.
\def\beamer@scu@tikz@headline#1#2#3{%
% #1: 辅助显示颜色.
% #2: 辅助显示颜色.
% #3: 辅助显示颜色.
\begin{tikzpicture}[overlay, remember picture]
\draw [fill=#1, draw=none] (current page.north east)%
rectangle ++ (-.5em, -.8ex);
\draw [fill=#3, draw=none] (current page.north east) ++ (0, -2ex)%
rectangle ++ (-.5em, -3.5ex);
\draw [fill=white, draw=none] (current page.north east) ++ (-.5em, 0)%
rectangle ++ (-.5em, -.8ex);
\draw [fill=black, draw=none] (current page.north east) ++ (-.5em, -2ex)%
rectangle ++ (-.5em, -3.5ex);
\draw [fill=#2, draw=none] (current page.north east) ++ (-1em, 0)%
rectangle ++ (-\dimexpr1.1\paperwidth-\beamer@scu@sectionbar\relax, -.8ex);
\draw [fill=#1, draw=none, rounded corners=2pt] (current page.north west) ++ (0, .15ex)%
[turtle={%
rt, fd=\beamer@scu@sectionbar,%
rt=135, fd=6.6ex,%
rt=45, fd=\dimexpr\beamer@scu@sectionbar-1.6em\relax,%
home%
}];
\node [anchor=north west, xshift=.5em, yshift=-.1ex, align=left] at (current page.north west) {%
\usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\hskip-1em\insertsectionnavigationhorizontal{.69\paperwidth}{}{}%
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\insertsectionhead%
\fi\fi%
};
\node [anchor=north east, xshift=-1.2em, yshift=-.5ex] at (current page.north east) {%
\usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}%
\insertsubsectionhead%
};
\node [anchor=north east, xshift=-1.2em, yshift=-3.75ex] at (current page.north east) {%
\usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}%
\insertsubsectionminiframes{1.8pt}{1.5pt}{1.2pt}\hspace*{.1em}%
};
\end{tikzpicture}%
}
% 计数器 - 幻灯页数.
\newcount\beamer@progressbar@currentframe% auxiliary counter
\newcount\beamer@progressbar@totalframe% auxiliary counter
% 长度.
\newdimen\beamer@progressbar@ht% progressbar height
\newdimen\beamer@progressbar@wd% progressbar width
\newdimen\beamer@progressbar@tmpdim% auxiliary dimension
% 设置长度.
\beamer@progressbar@ht=.4ex
\beamer@progressbar@wd=\dimexpr\paperwidth-10.5em\relax
% 进度条样式定义.
% #1: 未放映部分颜色.
% #2: 已放映部分颜色.
% #3: 辅助显示颜色.
\def\beamer@scu@tikz@progressbar#1#2#3{%
\beamer@progressbar@currentframe=\insertframenumber%
\beamer@progressbar@totalframe=\inserttotalframenumber%
\beamer@progressbar@tmpdim=\beamer@progressbar@wd%
\divide\beamer@progressbar@tmpdim by 1000%
\multiply\beamer@progressbar@tmpdim by \beamer@progressbar@currentframe%
\divide\beamer@progressbar@tmpdim by \beamer@progressbar@totalframe%
\multiply\beamer@progressbar@tmpdim by 1000%
\begin{tikzpicture}[very thin, overlay, remember picture]
\draw [fill=#1, draw=none] (current page.south west)%
rectangle ++ (1.5em, \beamer@progressbar@ht);
\draw [fill=#3, draw=none] (current page.south west) ++ (0, 1.6ex)%
rectangle ++ (1.5em, 1.4ex);
\draw [fill=white, draw=none] (current page.south west) ++ (1.5em, 0)%
rectangle ++ (.5em, \beamer@progressbar@ht);
\draw [fill=black, draw=none] (current page.south west) ++ (1.5em, 1.6ex)%
rectangle ++ (.5em, 1.4ex);
\draw [fill=#1, draw=none] (current page.south west) ++ (2em, 0)%
rectangle ++ (\beamer@progressbar@wd, \beamer@progressbar@ht);
\draw [fill=#2, draw=none] (current page.south west) ++ (2em, 0)%
rectangle ++ (\beamer@progressbar@tmpdim, \beamer@progressbar@ht);
\node [anchor=south west, xshift=2.2em, yshift=0ex] at (current page.south west) {%
\usebeamerfont{author in head/foot}\usebeamercolor[fg]{author in head/foot}%
\insertshortauthor%
\enspace\rule[-.2ex]{.25em}{2ex}\enspace%
\usebeamerfont{title in head/foot}\usebeamercolor[fg]{title in head/foot}%
\insertshorttitle%
};
\end{tikzpicture}%
}
% 设置页码显示为"x / total".
\def\insertfootlineframe{%
\insertframenumber%
\Acrobatmenu{GoToPage}{\beamer@linkspace{.275em}}%
/\Acrobatmenu{GoToPage}{\beamer@linkspace{.275em}}%
\inserttotalframenumber%
}
% 页脚样式定义.
% #1: 页码部分颜色.
% #2: Logo 部分颜色.
\def\beamer@scu@tikz@footline#1#2{%
\begin{tikzpicture}[overlay, remember picture]
\draw [fill=#1, draw=none, rounded corners=2pt] (current page.south east) ++ (-7.8em, -.15ex)%
[turtle={%
lt, fd=10em,%
rt=135, fd=5.4ex,%
rt=45, fd=8.4em,%
home%
}];
\draw [fill=#2, draw=none, rounded corners=2pt] (current page.south east) ++ (0, -.15ex)%
[turtle={%
lt, fd=10em,%
rt=135, fd=6ex,%
rt=45, fd=8.4em,%
home%
}];
\node [anchor=south east, xshift=-9.6em, yshift=-.8ex] at (current page.south east) {%
\usebeamerfont{framenumber in head/foot}\usebeamercolor[fg]{framenumber in head/foot}%
\insertfootlineframe%
};
\node [anchor=south east, xshift=-.78em, yshift=-.54ex] at (current page.south east) {%
\pgfuseimage{lg}%
};
\end{tikzpicture}%
}
% ----------------
% ----------------
% Headline Layout
% Confirmed in v1.3a.
% 格式: SECTION (ALL) | NAME OF SCU.
% ----------------
\defbeamertemplate*{headline}{SCU headline theme}{%
\begin{beamercolorbox}[wd=\paperwidth,ht=4ex]{}
\beamer@scu@tikz@headline{PrimaryC}{SecondaryAuxiliaryC}{AuxiliaryC}%
\end{beamercolorbox}%
}
\setbeamertemplate{headline}[SCU headline theme]
% ----------------
% ----------------
% Frametitle Layout
% Confirmed in v1.3a.
% 格式 - SUBSECTION & MINI-FRAMES OF SUBSECTION | FRAMETITLE.
% ----------------
%\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]%
%{beamer@frametitleshade}{\paperheight}%
%{%
% color(0pt)=(frametitle.bg);%
% color(\paperwidth)=(frametitle right.bg)
%}
\defbeamertemplate*{frametitle}{SCU theme}{%
\ifx\insertframesubtitle\@empty%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=.5ex]{}%{frametitle}
\textcolor{SecondaryAuxiliaryC}{\rule[-.3ex]{.25em}{2ex}\enspace}%
\usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}%
\insertframetitle%
\end{beamercolorbox}%
\else%
\begin{beamercolorbox}[wd=\paperwidth,ht=4.2ex,dp=.5ex]{}%{frametitle}
\textcolor{SecondaryAuxiliaryC}{\rule[-.3ex]{.25em}{2ex}\enspace}%
\usebeamerfont{frametitle}\usebeamercolor[fg]{frametitle}%
\insertframetitle\par%
\textcolor{SecondaryAuxiliaryC}{\rule[-.18ex]{.25em}{1.6ex}\enspace}%
\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}%
\insertframesubtitle%
\end{beamercolorbox}%
\fi%
}
\setbeamertemplate{frametitle}[SCU theme]
% ----------------
% ----------------
% Footline Layout
% Confirmed in v1.3a.
% 格式: AUTHOR | INSTITUTE | DATE FRAMENUMBER.
% ----------------
\defbeamertemplate*{footline}{SCU footline theme}{%
\begin{beamercolorbox}[wd=\paperwidth,ht=3ex]{}
\beamer@scu@tikz@progressbar{AuxiliaryC}{PrimaryC}{IntersperseC}%
\beamer@scu@tikz@footline{AuxiliaryC}{PrimaryC}%
\end{beamercolorbox}%
}
\setbeamertemplate{footline}[SCU footline theme]
% ----------------
% ----------------
% Navigation Symbols Layout
% 格式: TITLE | NAVIGATION SYMBOLS.
% ----------------
%\addtobeamertemplate{footline}{%
% \leavevmode%
% \hbox{%
% \begin{beamercolorbox}[wd=0.4\paperwidth,ht=3ex,dp=.75ex,right,rightskip=1.2em]{frametitle}%
% \usebeamercolor[fg]{navigation symbols}\insertslidenavigationsymbol%
% \insertframenavigationsymbol%
% \insertsubsectionnavigationsymbol%
% \insertsectionnavigationsymbol%
% \insertdocnavigationsymbol%
% \insertbackfindforwardnavigationsymbol%
% \end{beamercolorbox}%
% }}
% ----------------
% ----------------
% Title Page Layout
% ----------------
\setbeamertemplate{title page}%
{%
\begin{beamercolorbox}[sep=0cm,right,wd=0.0001\paperwidth,ht=\titlepageheaderheight,%
rightskip=\headingleftmargin]{pkured!5!white}
\vskip0.0361\titlepageheaderheight
\end{beamercolorbox}
\begin{beamercolorbox}[center,wd=0.92\paperwidth,ht=\titlepagemaintitleblockheight,%
rounded=true,shadow=true]{title}
\usebeamerfont{title}\inserttitle
\vskip\titlepagespaceunderdate%
\usebeamerfont{subtitle}\insertsubtitle
\vskip\titlepagespaceunderdate%
\end{beamercolorbox}
\vskip\titlepagespaceundername%
\medskip%
\begin{beamercolorbox}[center,wd=\paperwidth,ht=\titlepagenamedateblockheight]{white}
\usebeamerfont{author}\insertauthor\\
\vskip\titlepagespaceunderdate%
% \medskip%
\usebeamerfont{institute}\insertinstitute\\
\vskip\titlepagespaceunderdate%
% \medskip%
\usebeamerfont{date}\insertdate \;\;
\vskip\titlepagespaceunderdate%
\end{beamercolorbox}%
\begin{beamercolorbox}[center,wd=\paperwidth,ht=\titlepagefooterheight]{titlepagefooter}
\end{beamercolorbox}
}
% ----------------
% ----------------
% Tcolorbox Style Layout
% Confirmed in v1.3a.
% 定义了多种 Tcolorbox 盒子的基础样式. 修改自 Tcolorbox 手册.
% ----------------
% 盒子基础样式定义.
% 普通盒子基础样式定义.
% #1: 关键字 - 样式类型.
% #2: 上部颜色.
% #3: 下部颜色.
\def\beamer@scu@tcbstyle#1#2#3{%
\tcbset{tcb#1style/.style={%
enhanced jigsaw,%
arc=1.5mm,%
toprule=1mm, leftrule=1mm,%
boxsep=-.5mm,%
left=1.8mm, right=2mm, top=2.5mm,%
fonttitle=\normalsize\bfseries,%
fontupper=\usebeamercolor[fg]{nomal text},%
fontlower=\usebeamercolor[fg]{nomal text},%
frame style={%
upper left=#2, upper right=#2!50,%
lower left=#3!50, lower right=#3%
},%
interior style={white, opacity=.8},%
segmentation style={%
black, solid,%
opacity=.2, line width=1pt%
},%
breakable, break at=.78\textheight,%
pad at break=.5ex
}}%
}
% 定理盒子基础样式定义.
\def\beamer@scu@tcbstyletheo#1#2{%
% #1: 关键字 - 样式类型.
% #2: 颜色.
\tcbset{tcb#1style/.style={empty,%
attach boxed title to top left,%
boxed title style={empty,%
% colback=white!98!#2, opacityback=0.96, enhanced,%
% fuzzy shadow={-0.2mm}{0.2mm}{0mm}{0.2mm}{white!90!#2},%
% fuzzy shadow={0.2mm}{-0.2mm}{0mm}{0.2mm}{black!90!#2},%
size=minimal,%
toprule=2pt, top=4pt, left=1pt, right=1pt,%
overlay={%
\draw [#2, line width=2.5pt, rounded corners=1pt]%
([yshift=-1pt]frame.north west) -- ([yshift=-1pt]frame.north east);
\draw [white!80!#2, line width=2.5pt, rounded corners=1pt]%
([xshift=.25em,yshift=-1pt]frame.north west)%
-- ([xshift=.5em, yshift=-1pt]frame.north west);
},%
},%
coltitle=#2!90!black, fonttitle=\normalsize\bfseries,%
before=\par\medskip\noindent, vfill before first,%
parbox=false, boxsep=0pt,%
top=4pt, bottom=4pt, left=0pt, right=2mm,%
fontupper=\usebeamercolor[fg]{nomal text},%
fontlower=\usebeamercolor[fg]{nomal text},%
breakable, break at=.78\textheight,%
pad at break*=.5ex,%
overlay unbroken={%
\draw [#2, line width=1pt, rounded corners=1pt]%
([yshift=-1pt]title.north east)%
-- ([xshift=-0.5pt,yshift=-1pt]title.north-|frame.east)%
-- ([xshift=-0.5pt]frame.south east) -- (frame.south west);
\draw [white!80!#2, line width=1pt, rounded corners=1pt]%
([xshift=2em]frame.south west) -- ([xshift=5em]frame.south west);
},%
overlay first={%
\draw [#2, line width=1pt, rounded corners=1pt]%
([yshift=-1pt]title.north east)%
-- ([xshift=-0.5pt,yshift=-1pt]title.north-|frame.east)%
-- ([xshift=-0.5pt]frame.south east);
},%
overlay middle={%
\draw [#2, line width=1pt, rounded corners=1pt]%
([xshift=-0.5pt]frame.north east) -- ([xshift=-0.5pt]frame.south east);
},%
overlay last={%
\draw [#2, line width=1pt, rounded corners=1pt]%
([xshift=-0.5pt]frame.north east) -- ([xshift=-0.5pt]frame.south east)%
-- (frame.south west);
\draw [white!80!#2, line width=1pt, rounded corners=1pt]%
([xshift=2em]frame.south west) -- ([xshift=5em]frame.south west);
}%
}}%
}
% 代码盒子基础样式定义.
% #1: 关键字 - 样式类型.
% #2: 颜色.
\def\beamer@scu@tcbstylecode#1{%
\tcbset{codestyle/.style={empty,%
attach boxed title to top left,%
boxed title style={empty,%
% colback=white!98!#1, opacityback=0.96, enhanced,%
% fuzzy shadow={-0.2mm}{0.2mm}{0mm}{0.2mm}{white!90!#1},%
% fuzzy shadow={0.2mm}{-0.2mm}{0mm}{0.2mm}{black!90!#1},%
size=minimal,%
toprule=2pt, top=4pt, left=1pt, right=1pt,%
overlay={%
\draw [#1, line width=2.5pt, rounded corners=1pt]%
([yshift=-1pt]frame.north west) -- ([yshift=-1pt]frame.north east);
\draw [white!80!#1, line width=2.5pt, rounded corners=1pt]%
([xshift=.25em,yshift=-1pt]frame.north west)%
-- ([xshift=.5em, yshift=-1pt]frame.north west);
},%
},%
coltitle=#1!90!black, fonttitle=\normalsize\bfseries,%
before=\par\medskip\noindent, vfill before first,%
parbox=false, boxsep=0pt,%
top=4pt, bottom=4pt, left=1pt, right=2mm,%
fontupper=\usebeamercolor[fg]{nomal text},%
fontlower=\usebeamercolor[fg]{nomal text},%
breakable, break at=.78\textheight,%
pad at break*=.5ex,%\\
listing only,%
overlay unbroken={%
\draw [#1, line width=1pt, rounded corners=1pt]%
([yshift=-1pt]title.north east)%
-- ([xshift=-0.5pt,yshift=-1pt]title.north-|frame.east)%
-- ([xshift=-0.5pt]frame.south east) -- (frame.south west);
\draw [white!80!#1, line width=1pt, rounded corners=1pt]%
([xshift=2em]frame.south west) -- ([xshift=5em]frame.south west);
\node [anchor=north east] at ([xshift=-1.5pt,yshift=-2pt]title.north-|frame.east) {%
\textcolor{#1}{\normalsize ##1}%\faCode\faFileCodeO
};
},%
overlay first={%
\draw [#1, line width=1pt, rounded corners=1pt]%
([yshift=-1pt]title.north east)%
-- ([xshift=-0.5pt,yshift=-1pt]title.north-|frame.east)%
-- ([xshift=-0.5pt]frame.south east);
},%
overlay middle={%
\draw [#1, line width=1pt, rounded corners=1pt]%
([xshift=-0.5pt]frame.north east) -- ([xshift=-0.5pt]frame.south east);
},%
overlay last={%
\draw [#1, line width=1pt, rounded corners=1pt]%
([xshift=-0.5pt]frame.north east) -- ([xshift=-0.5pt]frame.south east)%
-- (frame.south west);
\draw [white!80!#1, line width=1pt, rounded corners=1pt]%
([xshift=2em]frame.south west) -- ([xshift=5em]frame.south west);
}%
}}
}
% 基础样式应用.
\beamer@scu@tcbstyle{rb}{scured} {scublue}
\beamer@scu@tcbstyle{yg}{scuyellow}{scugreen}
\if\EqualOptionsBeamer{BlockDisplay}{colorful}%
\beamer@scu@tcbstyletheo{theo}{PrimaryC}%
\beamer@scu@tcbstyletheo{exa} {BlockExampleC}%
\beamer@scu@tcbstyletheo{def} {BlockDefinitionC}%
\beamer@scu@tcbstyletheo{lem} {BlockLemmaC}%
\beamer@scu@tcbstyletheo{cond}{BlockConditionC}%
\beamer@scu@tcbstylecode{PrimaryC}%
\else\if\EqualOptionsBeamer{BlockDisplay}{followtheme}%
\beamer@scu@tcbstyletheo{theo}{PrimaryC}%
\beamer@scu@tcbstyletheo{exa} {PrimaryC}%
\beamer@scu@tcbstyletheo{def} {PrimaryC}%
\beamer@scu@tcbstyletheo{lem} {PrimaryC}%
\beamer@scu@tcbstyletheo{cond}{PrimaryC}%
\beamer@scu@tcbstylecode{PrimaryC}%
\else\if\EqualOptionsBeamer{BlockDisplay}{allgrey}%
\beamer@scu@tcbstyletheo{theo}{BlockExampleC}%
\beamer@scu@tcbstyletheo{exa} {BlockExampleC}%
\beamer@scu@tcbstyletheo{def} {BlockExampleC}%
\beamer@scu@tcbstyletheo{lem} {BlockExampleC}%
\beamer@scu@tcbstyletheo{cond}{BlockExampleC}%
\beamer@scu@tcbstylecode{BlockExampleC}%
\fi\fi\fi
% ----------------
% ----------------
% Tcolorbox Layout
% Confirmed in v1.3a.
% 定义了两个渐变样式( rb 为红蓝渐变, yg 为黄绿渐变)的 Tcolorbox.
% #1: <可选>附加参数.
% #2: 标题.
% ----------------
\newtcolorbox{scutcbrb}[2][]{%
tcbrbstyle, title={#2}, #1%
}
\newtcolorbox{scutcbyg}[2][]{%
tcbygstyle, title={#2}, #1%
}
% ----------------
% ----------------
% Theorem Layout
% Confirmed in v1.3a.
% 使用 tcolorbox 重定义定理环境, 原始的不带 scu 前缀的定理环境仍可使用.
% ----------------
% 定理区块名称设置.
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\def\beamer@scu@theonametheorem {定理}
\def\beamer@scu@theonameexample {}
\def\beamer@scu@theonamealgorithm {算法}
\def\beamer@scu@theonamedefinition {定义}
\def\beamer@scu@theonameaxiom {公理}
\def\beamer@scu@theonameproperty {性质}
\def\beamer@scu@theonameproposition{命题}
\def\beamer@scu@theonamelemma {引理}
\def\beamer@scu@theonamecorollary {推论}
\def\beamer@scu@theonamecondition {条件}
\def\beamer@scu@theonameconclusion {结论}
\def\beamer@scu@theonameassumption {假设}
\def\beamer@scu@theonameremark {}
\def\beamer@scu@theonameproof {证明}
%
\def\beamer@scu@theonametheorem@pl {定理}
\def\beamer@scu@theonameexample@pl {}
\def\beamer@scu@theonamealgorithm@pl {算法}
\def\beamer@scu@theonamedefinition@pl {定义}
\def\beamer@scu@theonameaxiom@pl {公理}
\def\beamer@scu@theonameproperty@pl {性质}
\def\beamer@scu@theonameproposition@pl{命题}
\def\beamer@scu@theonamelemma@pl {引理}
\def\beamer@scu@theonamecorollary@pl {推论}
\def\beamer@scu@theonamecondition@pl {条件}
\def\beamer@scu@theonameconclusion@pl {结论}
\def\beamer@scu@theonameassumption@pl {假设}
\def\beamer@scu@theonameremark@pl {}
\def\beamer@scu@theonameproof@pl {证明}
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\def\beamer@scu@theonametheorem {Theorem}
\def\beamer@scu@theonameexample {Example}
\def\beamer@scu@theonamealgorithm {Algorithm}
\def\beamer@scu@theonamedefinition {Definition}
\def\beamer@scu@theonameaxiom {Axiom}
\def\beamer@scu@theonameproperty {Property}
\def\beamer@scu@theonameproposition{Proposition}
\def\beamer@scu@theonamelemma {Lemma}
\def\beamer@scu@theonamecorollary {Corollary}
\def\beamer@scu@theonamecondition {Condition}
\def\beamer@scu@theonameconclusion {Conclusion}
\def\beamer@scu@theonameassumption {Assumption}
\def\beamer@scu@theonameremark {Remark}
\def\beamer@scu@theonameproof {Proof}
%
\def\beamer@scu@theonametheorem@pl {Theorems}
\def\beamer@scu@theonameexample@pl {Examples}
\def\beamer@scu@theonamealgorithm@pl {Algorithms}
\def\beamer@scu@theonamedefinition@pl {Definitions}
\def\beamer@scu@theonameaxiom@pl {Axioms}
\def\beamer@scu@theonameproperty@pl {Properties}
\def\beamer@scu@theonameproposition@pl{Propositions}
\def\beamer@scu@theonamelemma@pl {Lemmas}
\def\beamer@scu@theonamecorollary@pl {Corollaries}
\def\beamer@scu@theonamecondition@pl {Conditions}
\def\beamer@scu@theonameconclusion@pl {Conclusions}
\def\beamer@scu@theonameassumption@pl {Assumptions}
\def\beamer@scu@theonameremark@pl {Remarks}
\def\beamer@scu@theonameproof@pl {Proofs}
\fi\fi
% theorem, example, algorithm, definition, axiom, property, proposition, lemma, corollary, condition, conclusion, assumption 设置.
% 计数器 - 定理环境.
\newcounter{beamer@scu@theorem@count}
\newcounter{beamer@scu@example@count}
\newcounter{beamer@scu@algorithm@count}
\newcounter{beamer@scu@definition@count}
\newcounter{beamer@scu@axiom@count}
\newcounter{beamer@scu@property@count}
\newcounter{beamer@scu@proposition@count}
\newcounter{beamer@scu@lemma@count}
\newcounter{beamer@scu@corollary@count}
\newcounter{beamer@scu@condition@count}
\newcounter{beamer@scu@conclusion@count}
\newcounter{beamer@scu@assumption@count}
% 定理区块参数设置.
\def\beamer@scu@theo#1#2#3{%
% #1: 后缀 - 环境名称.
% #2: 前缀 - 样式类型.
% #3: 前缀 - 标签.
% 无*环境.
\DeclareTColorBox[use counter=beamer@scu@#1@count,%
% ##1: <可选>附加参数 - Tcolorbox.
% ##2: 标题.
% ##3: <可选>模式选择 - 带 * 即不显示区块标题头.
% ##4: <可选>后缀 - 标签.
number within=section, reset counter on overlays]%
{beamerscuoriginal#1}{ O{} m !s !O{} }{%
title={%
\IfBooleanTF{##3}{\ifstrempty{##2}{}{##2}}{%
\csname beamer@scu@theoname#1\endcsname%
~\thetcbcounter\ifstrempty{##2}{}{:~##2}%
}%
},%
IfValueT={##4}{label={#3\kvtcb@label@sep##4}},%
nameref={##2}, #2style, ##1%
}%
% 带*环境.
\DeclareTColorBox[no counter]%
% ##1: <可选>附加参数 - Tcolorbox.
% ##2: 标题.
% ##3: <可选>模式选择 - 带*即不显示区块标题头.
% ##4: <可选>后缀 - 标签.
{beamerscuoriginal#1*}{ O{} m !s !O{} }{%
title={%
\IfBooleanTF{##3}{\ifstrempty{##2}{}{##2}}{%
\csname beamer@scu@theoname#1\endcsname%
\ifstrempty{##2}{}{:~##2}%
}%
},%
IfValueT={##4}{label={#3\kvtcb@label@sep##4}},%
nameref={##2}, #2style, ##1%
}%
\DeclareDocumentEnvironment{scu#1}%
% ##1: <可选>模式选择 - 带 * 即不显示序号 (目前已实现带星号环境不参与计数器递进).
% ##2: <可选>Overlay选择 - Beamer.
% ##3: <可选>附加参数 - Tcolorbox.
% ##4: 标题.
% ##5: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% ##6: <可选>后缀 - 标签.
{ s D<>{1-} O{} m !s !O{} }{%
\begin{actionenv}<##2>%
\IfBooleanTF{##1}%
{\IfBooleanTF{##5}%
{\begin{beamerscuoriginal#1*}[##3]{##4}*[##6]}%
{\begin{beamerscuoriginal#1*}[##3]{##4}[##6]}}%
{\IfBooleanTF{##5}%
{\begin{beamerscuoriginal#1}[##3]{##4}*[##6]}%
{\begin{beamerscuoriginal#1}[##3]{##4}[##6]}}%
}{\IfBooleanTF{##1}%
{\end{beamerscuoriginal#1*}}%
{\end{beamerscuoriginal#1}}%
\end{actionenv}%
}%
}
\beamer@scu@theo{theorem} {tcbtheo}{theo}
\beamer@scu@theo{example} {tcbexa} {exam}
\beamer@scu@theo{algorithm} {tcbexa} {algo}
\beamer@scu@theo{definition} {tcbdef} {def}
\beamer@scu@theo{axiom} {tcbtheo}{axio}
\beamer@scu@theo{property} {tcbdef} {prope}
\beamer@scu@theo{proposition}{tcbdef} {propo}
\beamer@scu@theo{lemma} {tcblem} {lemm}
\beamer@scu@theo{corollary} {tcblem} {coro}
\beamer@scu@theo{condition} {tcbcond}{cond}
\beamer@scu@theo{conclusion} {tcblem} {conc}
\beamer@scu@theo{assumption} {tcbcond}{assu}
% scuremark 设置.
% 计数器 - 定理环境.
\newcounter{beamer@scu@remark@count}
% 定理区块参数设置.
\DeclareTColorBox[use counter=beamer@scu@remark@count,%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>后缀 - 标签.
no counter]{beamerscuoriginalremark}{ O{} m !O{} }{%
title={\beamer@scu@theonameremark%
\ifstrempty{#2}{}{:~#2}%
},%
IfValueT={#3}{label={rema:#3}},%
nameref={#2}, tcbexastyle, #1%
}
\DeclareDocumentEnvironment{scuremark}%
% #1: <可选>Overlay选择 - Beamer.
% #2: <可选>附加参数 - Tcolorbox.
% #3: 标题.
% #4: <可选>后缀 - 标签.
{ D<>{1-} O{} m !O{} }{%
\begin{actionenv}<#1>%
\begin{beamerscuoriginalremark}[#2]{#3}[#4]%
}{\end{beamerscuoriginalremark}\end{actionenv}}%
% scuproof 设置.
% 计数器 - 定理环境.
\newcounter{beamer@scu@proof@count}
% 定理区块参数设置.
\providecommand\pushQED{\def\beamer@qed}
\DeclareTColorBox[use counter=beamer@scu@proof@count,%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>后缀 - 标签.
no counter]{beamerscuoriginalproof}{ O{} m !O{} }{%
title={% \@addpunct: Be intelligently omitted when punctuation is already present.
\ifblank{#2}{\beamer@scu@theonameproof}{#2}\@addpunct{.}%
},%
IfValueT={#3}{label={rema:#3}},%
nameref={#2}, tcbexastyle, #1%
}
\DeclareDocumentEnvironment{scuproof}%
% #1: <可选>Overlay选择 - Beamer.
% #2: <可选>附加参数 - Tcolorbox.
% #3: 标题.
% #4: <可选>后缀 - 标签.
{ D<>{1-} O{} m !O{} }{%
\begin{actionenv}<#1>%
\begin{beamerscuoriginalproof}[#2]{#3}[#4]%
\pushQED{\qed}%
}{\popQED\end{beamerscuoriginalproof}\end{actionenv}}%
% Beamer 下原始 proof 环境.
%\renewenvironment<>{SCUproof}[1][证明]{%
% \par
% \def\insertproofname{#1\@addpunct{.}}%
% \pushQED{\qed}
% \usebeamertemplate{proof begin}#2}
%{\popQED\usebeamertemplate{proof end}}
% 智能引用名称定义.
\Crefname{beamer@scu@theorem@count}%
{\beamer@scu@theonametheorem}%
{\beamer@scu@theonametheorem@pl}
\Crefname{beamer@scu@example@count}%
{\beamer@scu@theonameexample}%
{\beamer@scu@theonameexample@pl}
\Crefname{beamer@scu@algorithm@count}%
{\beamer@scu@theonamealgorithm}%
{\beamer@scu@theonamealgorithm@pl}
\Crefname{beamer@scu@definition@count}%
{\beamer@scu@theonamedefinition}%
{\beamer@scu@theonamedefinition@pl}
\Crefname{beamer@scu@axiom@count}%
{\beamer@scu@theonameaxiom}%
{\beamer@scu@theonameaxiom@pl}
\Crefname{beamer@scu@property@count}%
{\beamer@scu@theonameproperty}%
{\beamer@scu@theonameproperty@pl}
\Crefname{beamer@scu@proposition@count}%
{\beamer@scu@theonameproposition}%
{\beamer@scu@theonameproposition@pl}
\Crefname{beamer@scu@lemma@count}%
{\beamer@scu@theonamelemma}%
{\beamer@scu@theonamelemma@pl}
\Crefname{beamer@scu@corollary@count}%
{\beamer@scu@theonamecorollary}%
{\beamer@scu@theonamecorollary@pl}
\Crefname{beamer@scu@condition@count}%
{\beamer@scu@theonamecondition}%
{\beamer@scu@theonamecondition@pl}
\Crefname{beamer@scu@conclusion@count}%
{\beamer@scu@theonameconclusion}%
{\beamer@scu@theonameconclusion@pl}
\Crefname{beamer@scu@assumption@count}%
{\beamer@scu@theonameassumption}%
{\beamer@scu@theonameassumption@pl}
\Crefname{beamer@scu@remark@count}%
{\beamer@scu@theonameremark}%
{\beamer@scu@theonameremark@pl}
\Crefname{beamer@scu@proof@count}%
{\beamer@scu@theonameproof}%
{\beamer@scu@theonameproof@pl}
% ----------------
% ----------------
% Listing Layout
% Confirmed in v1.3a.
% 定义了一个用作代码演示的 Listing, 和一个不带计数的 Listing.
% ----------------
% 代码区块名称设置.
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\def\beamer@scu@codename{源码}
\def\beamer@scu@codename@pl{源码}
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\def\beamer@scu@codename{Source Code}
\def\beamer@scu@codename@pl{Source Codes}
\fi\fi
% scucode 设置.
% 计数器 - 定理环境.
\newcounter{beamer@scu@code@count}
% 定理区块参数设置.
\if\EqualOptionsBeamer{CodeDisplay}{minted}%
\if\EqualOptionsBeamer{MintedStyle}{lightmode}%
\def\minted@style{default}%
\else\if\EqualOptionsBeamer{MintedStyle}{darkmode}%
\def\minted@style{rrt}%
\else\if\EqualOptionsBeamer{MintedStyle}{\beamer@scu@MintedStyle}%
\def\minted@style{\beamer@scu@MintedStyle}
\fi\fi\fi
\renewcommand{\theFancyVerbLine}{%
\sffamily\textcolor{PrimaryC}{%
\tiny\oldstylenums{\arabic{FancyVerbLine}}%
}}%
\DeclareTCBListing[use counter=beamer@scu@code@count,%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 注释定界符.
number within=section, reset counter on overlays]%
{scucode}{ O{} m s O{} m !O{} !D''{||} }{%
listing engine=minted,%
minted style={\minted@style},%
minted language={#5},%
minted options={%
autogobble, tabsize=2,%
highlightcolor=HighlightCodeLineC,%
beameroverlays, escapeinside=#7,%
mathescape, texcl,%
breaklines, breakbytokenanywhere,%
linenos, numbersep=2pt,%
fontsize=\scriptsize\ttfamily, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename~\thetcbcounter%
\ifstrempty{#2}{}{:~#2}%
}%
},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faCode}, #1%
}%
\DeclareTCBListing[no counter]%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 注释定界符.
{scucode*}{ O{} m s O{} m !O{} !D''{||} }{%
listing engine=minted,%
minted style={\minted@style},%
minted language={#5},%
minted options={%
autogobble, tabsize=2,%
highlightcolor=HighlightCodeLineC,%
beameroverlays, escapeinside=#7,%
mathescape, texcl,%
breaklines, breakbytokenanywhere,%
linenos, numbersep=2pt,%
fontsize=\scriptsize\ttfamily, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename\ifstrempty{#2}{}{:~#2}%
}%
},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faCode}, #1%
}%
\DeclareTCBInputListing[use counter=beamer@scu@code@count,%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 文件名.
% #8: 注释定界符.
number within=section, reset counter on overlays]%
{\scucodeinput}{ O{} m s O{} m O{} m !D''{||} }{%
listing file={./sourcecode/#7},%
listing engine=minted,%
minted style={\minted@style},%
minted language={#5},%
minted options={%
autogobble, tabsize=2,%
highlightcolor=HighlightCodeLineC,%
beameroverlays, escapeinside=#7,%
mathescape, texcl,%
breaklines, breakbytokenanywhere,%
linenos, numbersep=2pt,%
fontsize=\scriptsize\ttfamily, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename~\thetcbcounter%
\ifstrempty{#2}{}{:~#2}%
}%
},%
before upper=\scriptsize{以下是文件\texttt{#7}中包含的源码:\vspace{.75ex}},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faFileCodeO}, #1%
}
\DeclareTCBInputListing[no counter]%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 文件名.
% #8: 注释定界符.
{\scucodeinputnocounter}{ O{} m s O{} m O{} m !D''{||} }{%
listing file={./sourcecode/#7},%
listing engine=minted,%
minted style={\minted@style},%
minted language={#5},%
minted options={%
autogobble, tabsize=2,%
highlightcolor=HighlightCodeLineC,%
beameroverlays, escapeinside=#8,%
mathescape, texcl,%
breaklines, breakbytokenanywhere,%
linenos, numbersep=2pt,%
fontsize=\scriptsize\ttfamily, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename\ifstrempty{#2}{}{:~#2}%
}%
},%
before upper=\scriptsize{以下是文件\texttt{#7}中包含的源码:\vspace{.75ex}},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faFileCodeO}, #1%
}
\else\if\EqualOptionsBeamer{CodeDisplay}{listing}%
\DeclareTCBListing[use counter=beamer@scu@code@count,%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 注释定界符.
number within=section, reset counter on overlays]%
{scucode}{ O{} m s O{} m !O{} !D''{||} }{%
listing engine=listings,%
listing options={%
language={#5},%
breaklines, tabsize=2,%style=tcblatex,
columns=flexible,%
escapeinside=#7, texcl,%
numberstyle=\tiny\color{PrimaryC}\oldstylenums,%
basicstyle=\scriptsize\ttfamily,%
keywordstyle=\color{scured},%
commentstyle=\color{scugreen},%
stringstyle=\color{scuyellow},%
numbers=left, numbersep=2pt,%
aboveskip=-2pt, belowskip=-2pt,%
xrightmargin=-2pt,%
extendedchars=true, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename~\thetcbcounter%
\ifstrempty{#2}{}{:~#2}%
}%
},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faCode}, #1%
}%
\DeclareTCBListing[no counter]%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 注释定界符.
{scucode*}{ O{} m s O{} m !O{} !D''{||} }{%
listing engine=listings,%
listing options={%
language={#5},%
breaklines, tabsize=2,%style=tcblatex,
columns=flexible,%
escapeinside=#7, texcl,%
numberstyle=\tiny\color{PrimaryC}\oldstylenums,%
basicstyle=\scriptsize\ttfamily,%
keywordstyle=\color{scured},%
commentstyle=\color{scugreen},%
stringstyle=\color{scuyellow},%
numbers=left, numbersep=2pt,%
aboveskip=-2pt, belowskip=-2pt,%
xrightmargin=-2pt,%
extendedchars=true, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename\ifstrempty{#2}{}{:~#2}%
}%
},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faCode}, #1%
}%
\DeclareTCBInputListing[use counter=beamer@scu@code@count,%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 文件名.
% #8: 注释定界符.
number within=section, reset counter on overlays]%
{\scucodeinput}{ O{} m s O{} m O{} m !D''{||} }{%
listing file={./sourcecode/#7},%
listing engine=listings,%
listing options={%
language={#5},%
breaklines, tabsize=2,%style=tcblatex,
columns=flexible,%
escapeinside=#8, texcl,%
numberstyle=\tiny\color{PrimaryC}\oldstylenums,%
basicstyle=\scriptsize\ttfamily,%
keywordstyle=\color{scured},%
commentstyle=\color{scugreen},%
stringstyle=\color{scuyellow},%
numbers=left, numbersep=2pt,%
aboveskip=-2pt, belowskip=-2pt,%
xrightmargin=-2pt,%
extendedchars=true, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename~\thetcbcounter%
\ifstrempty{#2}{}{:~#2}%
}%
},%
before upper=\scriptsize{以下是文件\texttt{#7}中包含的源码:\vspace{.75ex}},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faFileCodeO}, #1%
}
\DeclareTCBInputListing[no counter]%
% #1: <可选>附加参数 - Tcolorbox.
% #2: 标题.
% #3: <可选>模式选择 - 带 * 即不显示区块标题前缀.
% #4: <可选>后缀 - 标签.
% #5: 抄录语言.
% #6: <可选>附加参数 - minted.
% #7: 文件名.
% #8: 注释定界符.
{\scucodeinputnocounter}{ O{} m s O{} m O{} m !D''{||} }{%
listing file={./sourcecode/#7},%
listing engine=listings,%
listing options={%
language={#5},%
breaklines, tabsize=2,%style=tcblatex,
columns=flexible,%
escapeinside=#8, texcl,%
numberstyle=\tiny\color{PrimaryC}\oldstylenums,%
basicstyle=\scriptsize\ttfamily,%
keywordstyle=\color{scured},%
commentstyle=\color{scugreen},%
stringstyle=\color{scuyellow},%
numbers=left, numbersep=2pt,%
aboveskip=-2pt, belowskip=-2pt,%
xrightmargin=-2pt,%
extendedchars=true, #6%
},%
title={%
\IfBooleanTF{#3}{\ifstrempty{#2}{}{#2}}{%
\beamer@scu@codename\ifstrempty{#2}{}{:~#2}%
}%
},%
before upper=\scriptsize{以下是文件\texttt{#7}中包含的源码:\vspace{.75ex}},%
IfValueT={#4}{label={code\kvtcb@label@sep#4}},%
nameref={#2}, codestyle={\faFileCodeO}, #1%
}
\fi\fi
% 智能引用名称定义.
\Crefname{beamer@scu@code@count}%
{\beamer@scu@codename}%
{\beamer@scu@codename@pl}
% ----------------
% ----------------
% Automatic Frame Layout
% Confirmed in v1.1a.
% 以下设置自动帧输出, 含封页, 小节前目录页.
% ----------------
% 添加封页.
\AtBeginDocument{%
\begingroup%
\setbeamertemplate{background}{\pgfuseimage{bgoftitle}}%
% 取消页眉残留空白.
\vspace*{-\dimexpr\headheight+\topskip\relax}%
\begin{frame}[plain]
%\transfade 渐变
\titlepage% 显示 titlepage.
\end{frame}
\endgroup%
}
% 定义目录输入命令.
\def\inserttableofcontent{
\ifbeamer@scu@contentmuticols%
\begin{multicols}{2}
\tableofcontents[%
sectionstyle=show/shaded,%
subsectionstyle=show/shaded/hide,%
subsubsectionstyle=show/shaded/hide]%
\end{multicols}
\else%
\tableofcontents[%
sectionstyle=show/shaded,%
subsectionstyle=show/shaded/hide,%
subsubsectionstyle=show/shaded/hide]%
\fi%
}
% 小节前加目录.
\AtBeginSubsection[]{%
\begingroup%
\ifbeamer@scu@background%
\setbeamertemplate{background}{\pgfuseimage{bgofsubsectoc}}%
\fi%
\if\EqualOptionsBeamer{LanguageMode}{cn}
\begin{frame}{目录}
\inserttableofcontent%
\end{frame}
\else\if\EqualOptionsBeamer{LanguageMode}{en}
\begin{frame}{Outline}
\inserttableofcontent%
\end{frame}
\fi\fi
\endgroup%
}
% ----------------
% ----------------
% Environment Break Layout
% 实现 tcolorbox 等环境的分页显示, 目前仍有 bug 如 tcolorbox 的阴影, 以及需要手动控制距离实现分页.
% 若内容长度未超过当页, 仍能正常显示.
% 代码来源于 https://tex.stackexchange.com/questions/509208/breakable-tcolorbox-inside-a-beamer-slide/.
% ----------------
\newsavebox{\mysavebox}
\newlength{\myrest}
\newlength{\Textheight}
\newif\iffirstframe
\firstframetrue
\newcommand\framenew[1]{%
\setlength{\Textheight}{#1\textheight}%
\ifdim\ht\mysavebox>\Textheight%
\setlength{\myrest}{\ht\mysavebox}%
\loop\ifdim\myrest>\Textheight%
\iffirstframe%
\firstframefalse%
\else%
\newpage\par\noindent%
\fi%
\clipbox{0 {\myrest-\Textheight} 0 {\ht\mysavebox-\myrest}}{\usebox{\mysavebox}}%
\addtolength{\myrest}{-\Textheight}%
\repeat%
\newpage\par\noindent%
\clipbox{0 0 0 {\ht\mysavebox-\myrest}}{\usebox{\mysavebox}}%
\else%
\usebox{\mysavebox}%
\fi}
% ----------------
% ----------------
% Ref Layout
% 重定义了 \vref & \cref 命令, 实现跳转.
% 重定义了页码计数器 page, 实现环境 frame 输出后值与计数器 framenumber 相同, 从而实现引用时页码不为 pdf 页码.
% 定义了中文下的 varioref 和 cleveref 包的显示项. (部分具体定义未知, 故未翻译)
% ----------------
% 重定义 \vref & \cref.
\let\soscref\cref % 储存 \cref 原始命令.
\let\sosvref\vref % 储存 \vref 原始命令.
\renewcommand{\cref}[1]{\hyperlink{#1}{\soscref{#1}}}
\renewcommand{\vref}[1]{\hyperlink{#1}{\sosvref{#1}}}
% 重定义计数器 page.
\AtBeginEnvironment{beamer@framepauses}{\setcounter{page}{\c@framenumber}}
% 定义 varioref 和 cleveref 包的中文显示项.
\if\EqualOptionsBeamer{LanguageMode}{cn}%
\vref@addto\extraschinese{%
\def\reftextfaceafter {\reftextvario{}{}}%
\def\reftextfacebefore{\reftextvario{}{}}%
\def\reftextafter {\reftextvario{}{}}%
\def\reftextbefore {\reftextvario{}{}}%
\def\reftextcurrent {\reftextvario{}{}}%
\def\reftextfaraway#1{见第\pageref{#1}~页}%
\def\reftextpagerange#1#2{见第\pageref{#1}~到第\pageref{#2}~页}%
\def\reftextlabelrange#1#2{\ref{#1}到~\ref{#2}}%
\def\vrefformat#1#2{\ref{#2}\vpageref[#1]{#2}}%
\def\Vrefformat#1#2{\Ref{#2}\vpageref[#1]{#2}}%
\def\fullrefformat#1{\ref{#1}\reftextfaraway{#1}}%
\def\vrefrangeformat#1#2#3{\reftextlabelrange{#2}{#3}%
\vpagerefrange[{#1}]{#2}{#3}}%
}
%\cref@addlanguagedefs\extraschinese{%
\newcommand{\crefrangeconjunction}{\nobreakspace}%
\newcommand\crefrangepreconjunction{}%
\newcommand\crefrangepostconjunction{}%
\newcommand{\crefpairconjunction}{\nobreakspace}%
\newcommand{\crefmiddleconjunction}{, }%
\newcommand{\creflastconjunction}{\nobreakspace}%
\newcommand{\crefpairgroupconjunction}{\nobreakspace}%
\newcommand{\crefmiddlegroupconjunction}{, }%
\newcommand{\creflastgroupconjunction}{, 和\nobreakspace}%
% crefname
\Crefname{framenumber}{幻灯}{幻灯}
\Crefname{equation}{}{}%
\Crefname{figure}{}{}%
\Crefname{subfigure}{}{}%
\Crefname{table}{}{}%
\Crefname{subtable}{}{}%
\Crefname{page}{}{}%
\Crefname{part}{Part}{Parts}%
\Crefname{chapter}{}{}%
\Crefname{section}{}{}%
\Crefname{subsection}{}{}%
\Crefname{subsubsection}{}{}%
\Crefname{appendix}{附录}{附录}%
\Crefname{subappendix}{附录}{附录}%
\Crefname{subsubappendix}{附录}{附录}%
\Crefname{subsubsubappendix}{附录}{附录}%
\Crefname{enumi}{}{}%
\Crefname{enumii}{}{}%
\Crefname{enumiii}{}{}%
\Crefname{enumiv}{}{}%
\Crefname{enumv}{}{}%
\Crefname{footnote}{脚注}{脚注}%
\Crefname{theorem}{定理}{定理}%
\Crefname{lemma}{引理}{引理}%
\Crefname{corollary}{推论}{推论}%
\Crefname{proposition}{命题}{命题}%
\Crefname{definition}{定义}{定义}%
\Crefname{result}{结果}{结果}%
\Crefname{example}{}{}%
\Crefname{remark}{}{}%
\Crefname{note}{}{}%
\Crefname{algorithm}{算法}{算法}%
\Crefname{listing}{代码}{代码}%
\Crefname{line}{Line}{Lines}%
%}
\else\if\EqualOptionsBeamer{LanguageMode}{en}%
\PassOptionsToPackage{english}{cleveref}
\Crefname{framenumber}{Slide}{Slides}
\fi\fi
% ----------------
% ----------------
% Bib Layout
% Confirmed in v1.1a.
% ----------------
% 设置参考文献脚注引用.
\newcommand{\footfullcitetext}[2][]{%
\footnotetext{\fullcite[#1]{#2}}}
% ----------------
%%%% ----------------------------------------------------------------
\endinput
%%%% ----------------------------------------------------------------
% End of file `beamerthemescu.sty'.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phyzgb/SCU_Beamer_Slide-demo.git
git@gitee.com:phyzgb/SCU_Beamer_Slide-demo.git
phyzgb
SCU_Beamer_Slide-demo
SCU_Beamer_Slide-demo
main

搜索帮助

D67c1975 1850385 1daf7b77 1850385