fvnccr228 / scu_beamer_slide-demo Goto Github PK
View Code? Open in Web Editor NEW四川大学非官方Beamer模板 | Unofficial Beamer Template for Sichuan University
License: LaTeX Project Public License v1.3c
四川大学非官方Beamer模板 | Unofficial Beamer Template for Sichuan University
License: LaTeX Project Public License v1.3c
This issue presents the complete code of the v1.1a of the theorem block that will be released in the future.
\documentclass{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{tcolorbox}
\usepackage{xparse}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{cleveref}
\tcbuselibrary{most,xparse}
\definecolor{JXred}{cmyk}{0.12,0.92,0.95,0.20}
\definecolor{YYgrey}{cmyk}{0.47,0.37,0.37,0.00}
\definecolor{BSblue}{cmyk}{1.00,0.60,0.00,0.15}
\definecolor{HYgreen}{cmyk}{1.00,0.00,0.90,0.15}
\definecolor{YXyellow}{cmyk}{0.00,0.40,1.00,0.15}
\makeatletter
% 定理盒子主题颜色定义.
\def\beamer@scu@tcbcolortheo@theo{JXred}
\def\beamer@scu@tcbcolortheo@exa{YYgrey}
\def\beamer@scu@tcbcolortheo@def{BSblue}
\def\beamer@scu@tcbcolortheo@lem{HYgreen}
\def\beamer@scu@tcbcolortheo@cond{YXyellow}
% 定理盒子基础样式定义.
\def\beamer@scu@tcbstyletheo#1{%
\tcbset{tcb#1style/.style=%
{enhanced jigsaw,%
drop fuzzy shadow southeast,%
toprule=3mm,leftrule=1mm,%
boxsep=-.5mm,arc=1.5mm,%
left=1.8mm,right=2mm,top=2.5mm,%
colback=\csname beamer@scu@tcbcolortheo@#1\endcsname!2!white,%
colframe=\csname beamer@scu@tcbcolortheo@#1\endcsname,%
opacityback=0.95,%
attach boxed title to top left={%
yshift=-4mm,xshift=2mm},%
boxed title style={%
arc=2.5mm,top=-.5mm,bottom=-.5mm,%
leftrule=1.5mm,rightrule=1.5mm,%
colback=\csname beamer@scu@tcbcolortheo@#1\endcsname!5!white,%
colframe=\csname beamer@scu@tcbcolortheo@#1\endcsname},%
fonttitle=\normalsize\bfseries,%
coltitle=black}%
}%
}
% 基础样式应用.
\beamer@scu@tcbstyletheo{theo}
\beamer@scu@tcbstyletheo{exa}
\beamer@scu@tcbstyletheo{def}
\beamer@scu@tcbstyletheo{lem}
\beamer@scu@tcbstyletheo{cond}
% 定理区块名称设置.
\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{证明}
% 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}
% 智能引用名称定义.
\Crefname{beamer@scu@theorem@count}%
{\beamer@scu@theonametheorem}%
{\beamer@scu@theonametheorem}
\Crefname{beamer@scu@example@count}%
{\beamer@scu@theonameexample}%
{\beamer@scu@theonameexample}
\Crefname{beamer@scu@algorithm@count}%
{\beamer@scu@theonamealgorithm}%
{\beamer@scu@theonamealgorithm}
\Crefname{beamer@scu@definition@count}%
{\beamer@scu@theonamedefinition}%
{\beamer@scu@theonamedefinition}
\Crefname{beamer@scu@axiom@count}%
{\beamer@scu@theonameaxiom}%
{\beamer@scu@theonameaxiom}
\Crefname{beamer@scu@property@count}%
{\beamer@scu@theonameproperty}%
{\beamer@scu@theonameproperty}
\Crefname{beamer@scu@proposition@count}%
{\beamer@scu@theonameproposition}%
{\beamer@scu@theonameproposition}
\Crefname{beamer@scu@lemma@count}%
{\beamer@scu@theonamelemma}%
{\beamer@scu@theonamelemma}
\Crefname{beamer@scu@corollary@count}%
{\beamer@scu@theonamecorollary}%
{\beamer@scu@theonamecorollary}
\Crefname{beamer@scu@condition@count}%
{\beamer@scu@theonamecondition}%
{\beamer@scu@theonamecondition}
\Crefname{beamer@scu@conclusion@count}%
{\beamer@scu@theonameconclusion}%
{\beamer@scu@theonameconclusion}
\Crefname{beamer@scu@assumption@count}%
{\beamer@scu@theonameassumption}%
{\beamer@scu@theonameassumption}
% 定理区块参数设置.
% #1: 后缀 - 环境名称.
% #2: 前缀 - 样式类型.
% #3: 前缀 - 标签.
% ##1: <可选>附加参数.
% ##2: 标题.
% ##3: 后缀 - 标签.
\def\beamer@scu@theo#1#2#3{%
\newtcolorbox[use counter=beamer@scu@#1@count,%
number within=section]{scu#1}[3][]{%
title={\csname beamer@scu@theoname#1\endcsname~%
\thetcbcounter\ifstrempty{##2}{}{:~##2}},%
IfValueT={##3}{label={#3:##3}},#2style,##1}%
}
\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}
% 智能引用名称定义.
\Crefname{beamer@scu@remark@count}%
{\beamer@scu@theonameremark}%
{\beamer@scu@theonameremark}
% 定理区块参数设置.
\newtcolorbox[use counter=beamer@scu@remark@count,%
no counter]{scuremark}[3][]{%
title={\beamer@scu@theonameremark%
\ifstrempty{#2}{}{:~#2}},%
IfValueT={#3}{label={rema:#3}},%
tcbexastyle,#1}
% scuproof 设置.
% 计数器定义.
\newcounter{beamer@scu@proof@count}
% 智能引用名称定义.
\Crefname{beamer@scu@proof@count}%
{\beamer@scu@theonameproof}%
{\beamer@scu@theonameproof}
% 定理区块参数设置.
\newtcolorbox[use counter=beamer@scu@proof@count,%
no counter]{scuproof}[3][]{%
title={% \@addpunct: Be intelligently omitted when punctuation is already present.
\ifblank{#2}{\beamer@scu@theonameproof}{#2}\@addpunct{.}},%
after upper={\par\hfill\qed},%
IfValueT={#3}{label={proo:#3}},%
tcbexastyle,#1}
\makeatother
\begin{document}
\section{定理区块示例}
\begin{scutheorem}{定理示例}{theorem}
这是定理.
\end{scutheorem}
\begin{scuproof}{}{}
这是证明.
\end{scuproof}
\begin{scuexample}{例子示例}{example}
这是例子.
\end{scuexample}
\begin{scualgorithm}{算法示例}{algorithm}
这是算法.
\end{scualgorithm}
\begin{scudefinition}{定义示例}{definition}
这是定义.
\end{scudefinition}
\begin{scuaxiom}{公理示例}{axiom}
这是公理.
\end{scuaxiom}
\begin{scuproperty}{性质示例}{property}
这是性质.
\end{scuproperty}
\begin{scuproposition}{命题示例}{proposition}
这是命题.
\end{scuproposition}
\begin{sculemma}{引理示例}{lemma}
这是引理.
\end{sculemma}
\begin{scucorollary}{推论示例}{corollary}
这是推论.
\end{scucorollary}
\begin{scuremark}{}{}
这是注解.
\end{scuremark}
\begin{scucondition}{条件示例}{condition}
这是条件.
\end{scucondition}
\begin{scuconclusion}{结论示例}{conclusion}
这是结论.
\end{scuconclusion}
\begin{scuassumption}{假设示例}{assumption}
这是假设.
\end{scuassumption}
\end{document}
beamerthemescu.sty
文件中,取消注释第 303 行代码
beamerthemescu.sty
文件中,第23行修改为
\ProvidesPackage{beamerthemescu}[2022/03/10, v1.2a]
beamercolorthemescu.sty
文件中,第16行修改为
\ProvidesPackage{beamercolorthemescu}[2022/03/10, v1.2a]
作者好,很漂亮的模板!
请问自定义的scu@theorem
中的@pl
参数要怎么用呢,在同时有多个examples想要加个s,又不想额外定义新的环境
下载该repo后,第一次编译main文件无法成功编译:
No file main.toc.
! Undefined control sequence.
\insertsubsectionendframe ...r@subsectionendframe
l.88 \subsection{研究现状}
增加
\def\beamer@subsectionendframe{2}
后即可成功编译。
猜测是 beamerthemescu.sty
第388行写错了?
SCU_Beamer_Slide-demo/beamerthemescu.sty
Lines 387 to 399 in fb4bbdd
将 \beamer@endframeofsubsection
改为 \beamer@subsectionendframe
后可正常编译。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.