diff --git a/.gitignore b/.gitignore index a1ab944..fa8c628 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ main.pdf - ## Core latex/pdflatex auxiliary files: *.aux *.lof @@ -66,6 +65,9 @@ acs-*.bib # changes *.soc +# comment +*.cut + # cprotect *.cpt @@ -204,9 +206,16 @@ pythontex-files-*/ # todonotes *.tdo +# vhistory +*.hst +*.ver + # easy-todo *.lod +# xcolor +*.xcp + # xmpincl *.xmpi diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c66785 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +MAIN = main +NAME = ustcbeamer +STYFILES = $(NAME).sty + +SHELL = bash +LATEXMK = latexmk -xelatex + +.PHONY : main sty clean all FORCE_MAKE + +main : $(MAIN).pdf + +all : main + +sty : $(STYFILES) + +$(MAIN).pdf : $(MAIN).tex $(STYFILES) FORCE_MAKE + $(LATEXMK) $< + +clean : FORCE_MAKE + $(LATEXMK) -c $(MAIN).tex + +distclean : + $(LATEXMK) -C $(MAIN).tex diff --git a/README.md b/README.md index 46679b1..a60070e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,27 @@ -# USTC Beamer 模板 +# 中国科学技术大学Beamer模板 -生成文档: -``` -latexmk -``` +本项目是基于 [thomasWeise/ustcSlides](https://github.com/thomasWeise/ustcSlides) 修改而来,加了几种不同的颜色主题。 -清理临时文件: -``` -latexmk -c -``` +科大官网上有与之对应的[USTC公用PPT模板](http://lswhw.ustc.edu.cn/public/inc/editer/attached/file/20181106/20181106152958_72346.zip)。 + +## 使用说明 + +`beamer.tex` 文件运行 `xelatex` 即可。模板 ustcbeamer 中定义了五个选项供选择:`ustcblue`, `ustcred`, `black`, `violet`, `blue`;分别对应了五种主题颜色。 + +建议使用 `ustcblue` 和 `ustcred`,两者均为[科大党委宣传部](http://lswhw.ustc.edu.cn/index.php/index/info/3370)规定的校徽标准红蓝配色。两个标准配色分别为:蓝 `cmyk(100,80,0,0)`、红 `cmyk(0,100,100,0)`,在 LaTeX 中使用需要除以 100。 + +本模板参考了 [thomasWeise/ustcSlides](https://github.com/thomasWeise/ustcSlides) 的,故而保留了 Thomas Weise 先生的原始配色(blue)。 + +此外,个人不太建议使用黑色(black),看上去像讣告。 + + +## 下载地址 + +- GitHub Releases:https://github.com/ustctug/ustcbeamer/releases + + +## 其他 + +本人第一次做 LaTeX 模板,有什么问题望及时反馈,谢谢! + +有其他的颜色或格式的需求可在github上反馈。 diff --git a/beamerthemeUSTC.sty b/beamerthemeUSTC.sty deleted file mode 100644 index cf1bf42..0000000 --- a/beamerthemeUSTC.sty +++ /dev/null @@ -1,67 +0,0 @@ -% -% Copyright (C) 2014-2018 by USTC TeX User Group -% -% This file may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3c -% of this license or (at your option) any later version. -% The latest version of this license is in -% https://www.latex-project.org/lppl.txt -% and version 1.3c or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% - -\mode - -\usetheme{Madrid}%%Warsaw [secheader] -%\usecolortheme{beaver} -\beamersetaveragebackground{black!10} - -\setbeamercovered{transparent} -%\setbeamertemplate{navigation symbols}{} - -\usefonttheme{professionalfonts} -\useinnertheme{circles}%{rectangles} -\setbeamertemplate{itemize item}{$\circledast$}%{\checkmark} - - -\setbeamertemplate{title page} -{ -% \vbox{} - \vfill - \begin{centering} - \includegraphics[height=2.0cm]{ustc_logo_fig.pdf} - \vskip0.6em\par% - \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title} - \usebeamerfont{title}\inserttitle\par% - \ifx\insertsubtitle\@empty% - \else% - \vskip0.25em% - {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% - \fi% - \end{beamercolorbox}% - \vskip1em\par - \begin{beamercolorbox}[sep=8pt,center]{author} - \usebeamerfont{author} - % \insertauthor - { - \begin{tabular}{cc} - 答辩人:&\insertauthor\\ - 导\quad 师:& \advisor - \end{tabular} - } - \end{beamercolorbox} - \begin{beamercolorbox}[sep=8pt,center]{institute} - \usebeamerfont{institute}\insertinstitute - \end{beamercolorbox} - \begin{beamercolorbox}[sep=8pt,center]{date} - \usebeamerfont{date}\insertdate - \end{beamercolorbox}\vskip0.5em - % {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par} - \end{centering} - \vfill -} - -\hypersetup{pdfpagemode=FullScreen} % makes your presentation go automatically to full screen - -\mode - diff --git a/figures/ustc_background_1.pdf b/figures/ustc_background_1.pdf new file mode 100644 index 0000000..8137420 Binary files /dev/null and b/figures/ustc_background_1.pdf differ diff --git a/figures/ustc_background_2.pdf b/figures/ustc_background_2.pdf new file mode 100644 index 0000000..4e33c36 Binary files /dev/null and b/figures/ustc_background_2.pdf differ diff --git a/figures/ustc_background_3.pdf b/figures/ustc_background_3.pdf new file mode 100644 index 0000000..fc6a464 Binary files /dev/null and b/figures/ustc_background_3.pdf differ diff --git a/figures/ustc_background_4.pdf b/figures/ustc_background_4.pdf new file mode 100644 index 0000000..211c6ee Binary files /dev/null and b/figures/ustc_background_4.pdf differ diff --git a/figures/ustc_background_5.pdf b/figures/ustc_background_5.pdf new file mode 100644 index 0000000..319a43e Binary files /dev/null and b/figures/ustc_background_5.pdf differ diff --git a/figures/ustc_cover_1.pdf b/figures/ustc_cover_1.pdf new file mode 100644 index 0000000..fea4ef8 Binary files /dev/null and b/figures/ustc_cover_1.pdf differ diff --git a/figures/ustc_cover_2.pdf b/figures/ustc_cover_2.pdf new file mode 100644 index 0000000..11061f9 Binary files /dev/null and b/figures/ustc_cover_2.pdf differ diff --git a/figures/ustc_cover_3.pdf b/figures/ustc_cover_3.pdf new file mode 100644 index 0000000..9d311d2 Binary files /dev/null and b/figures/ustc_cover_3.pdf differ diff --git a/figures/ustc_cover_4.pdf b/figures/ustc_cover_4.pdf new file mode 100644 index 0000000..58c6db9 Binary files /dev/null and b/figures/ustc_cover_4.pdf differ diff --git a/figures/ustc_cover_5.pdf b/figures/ustc_cover_5.pdf new file mode 100644 index 0000000..fed85c2 Binary files /dev/null and b/figures/ustc_cover_5.pdf differ diff --git a/ustc_logo_fig.pdf b/figures/ustc_logo.pdf similarity index 100% rename from ustc_logo_fig.pdf rename to figures/ustc_logo.pdf diff --git a/latexmkrc b/latexmkrc index 449c638..9719d8f 100644 --- a/latexmkrc +++ b/latexmkrc @@ -1,19 +1,9 @@ +$pdf_mode = 1; + $pdflatex = "xelatex -file-line-error -halt-on-error -interaction=nonstopmode -synctex=1 %O %S"; $xelatex = "xelatex -file-line-error -halt-on-error -interaction=nonstopmode -no-pdf -synctex=1 %O %S"; -$xdvipdfmx="xdvipdfmx -E -o %D %O %S"; - -$pdf_mode = 1; -$dvi_mode = 0; -$postscript_mode = 0; +$xdvipdfmx = "xdvipdfmx -q -E -o %D %O %S"; $bibtex_use = 1.5; -$go_mode = 1; - $clean_ext = 'glo gls hd nav snm synctex.gz xdv'; - -$makeindex = 'makeindex -s gind.ist %O -o %D %S'; -add_cus_dep('glo', 'gls', 0, 'makegls'); -sub makegls { - system("makeindex -s gglo.ist -o \"$_[0].gls\" \"$_[0].glo\""); -} diff --git a/main.tex b/main.tex index 4e712a7..9103316 100644 --- a/main.tex +++ b/main.tex @@ -1,148 +1,108 @@ -%!TEX encoding = UTF-8 Unicode -%!TEX program = latexmk - -\documentclass[12pt]{ctexbeamer} %声明文档类型为beamer幻灯片 -\mode -\usetheme{USTC}%%Warsaw [secheader] - -% \usepackage{multimedia} %让文档支持多媒体 -% \usepackage{hyperref} %让文档支持超链接 -% \usepackage{booktabs} %让文档支持三线表格 -% \usepackage{amsmath} %ams可以让文档支持数学公式 -% \usepackage{amsfonts} -% \usepackage{amssymb} -% \usepackage{color} -% \usepackage{graphicx,psfrag} - -\title{话者识别中失配信息补偿理论和方法研究} %幻灯片标题 -\author[刘青松]{刘青松} -\def\advisor{戴蓓蒨教授} - -\institute[中国科学技术大学]{ -语音信号与信息处理实验室\\ -中国科学技术大学,电子科学与技术系 -} %作者单位 -\date{\today} +%!TEX program = xelatex + +\documentclass[12pt]{ctexbeamer} +\usepackage[ustcblue]{ustcbeamer}%可通过更改选项来更改主题颜色 -\setcounter{tocdepth}{1} +%%%模板说明%%%% +%模板ustc_beamer中定义了五个选项供选择:ustcblue,ustcred,black,violet,blue;分别对应了五种主题颜色。 +%建议使用ustcblue和ustcred,两者均为科大党委宣传部规定的校徽标准配色,参考http://lswhw.ustc.edu.cn/index.php/index/info/3370 。两个标准配色分别为:蓝cmyk(100,80,0,0)、红cmyk(0,100,100,0),在LaTex中使用需要除以100。 +%本模板参考了https://github.com/thomasWeise/ustcSlides 的Slides,故而保留了Thomas Weise先生的原始配色(blue)。 +%不怎么建议使用黑色(black),看上去像讣告。 +%有其他的配色需求可在github上反馈。 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\title[底部简明标题]{ + 量子力学熵形式的不确定关系 +} +\author[底部演讲者]{报告人:XXX} +\institute[USTC]{ +理论物理研究组\\ +中国科学技术大学,近代物理系 +} +\date{\today} \begin{document} -\begin{frame} -\titlepage -\end{frame} + +\startPresentation{} \AtBeginSection[]{ - \frame{ + \begin{frame}% \frametitle{大纲} \tableofcontents[currentsection] - } + \end{frame} } - -\begin{frame} -\frametitle{大纲} -\tableofcontents -\end{frame} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{概述} +\section{研究背景} \begin{frame} -\frametitle{概述} -研究意义 + \frametitle{研究背景} + 研究背景: + \begin{itemize} + \item 一 + \item 二 + \item 三 + \end{itemize} \end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{存在的问题} +\section{理论模型} \begin{frame} -\frametitle{一二三四五问题} -\begin{itemize} -\item 一二三四五 -\item \alert{六七八九十} -\end{itemize} -\pause -一二三四五 + \frametitle{理论模型} + \begin{equation*} + S\left(\rho\right)=-Tr\rho\ln\rho + \end{equation*} + \pause + 由此得到…… \end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{方法一} +\section{研究方法} \begin{frame} -\frametitle{USTC} - -\begin{itemize} -\item<1-> USTC,ABCD EFG HIJK LMN OPQ RST UVW XYZ -\item<2-> USTC,abcd efg hijk lmn opq rst uvw xyz -\end{itemize} - - -\end{frame} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{方法二} - -\begin{frame} -\frametitle{公式} -$$M=m_{ubm}+Dy$$ + \frametitle{研究方法} + \begin{block}{方法一} + \begin{itemize} + \item abc + \item def + \end{itemize} + \end{block} + \pause + \begin{block}{方法二} + \begin{itemize} + \item abc + \item def + \end{itemize} + \end{block} \end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{方法三} +\section{总结展望} \begin{frame} -\frametitle{Block} -\begin{block}{Block1} - \begin{itemize} - \item 方法三 - \item 方法三 - \end{itemize} -\end{block} -\pause -\begin{block}{Block1} - \begin{itemize} - \item 方法三 - \item 方法三 - \end{itemize} -\end{block} + \frametitle{总结展望} + \begin{columns} + \begin{column}{0.50\textwidth} + \begin{figure} + \includegraphics[width=0.8\textwidth]{figures/ustc_logo.pdf} + \caption{标题} + \end{figure} + \end{column} + \begin{column}{0.50\textwidth} + \begin{block}{结论} + \begin{itemize} + \item 结论 1 + \item 结论 2 + \item 结论 3 + \end{itemize} + \end{block} + \end{column} + \end{columns} \end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{总结与展望} \begin{frame} -\frametitle{实验结果} -\begin{columns} -\begin{column}{0.50\textwidth} -% \epsfig{figure=ustc_logo_fig_new,width=\textwidth} -\includegraphics[width=\textwidth]{ustc_logo_fig.pdf} -\end{column} -\begin{column}{0.50\textwidth} -\begin{block}{结论} -\begin{itemize} -\item 实验结果如左图所示 -\item 实验结果如左图所示 -\item 实验结果如左图所示 -\item 实验结果如左图所示 -\item 实验结果如左图所示 -\item 实验结果如左图所示 -\end{itemize} -\end{block} -\end{column} -\end{columns} + \centerline{\Large 谢谢!} \end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -\begin{frame} -\centerline{\Large 谢谢!} -\end{frame} - \end{document} diff --git a/ustcbeamer.sty b/ustcbeamer.sty new file mode 100644 index 0000000..7ff0d97 --- /dev/null +++ b/ustcbeamer.sty @@ -0,0 +1,158 @@ +\newif\ifbeamer@ustcblue +\newif\ifbeamer@ustcred +\newif\ifbeamer@black +\newif\ifbeamer@violet +\newif\ifbeamer@blue + +\DeclareOption{ustcblue}{\beamer@ustcbluetrue\beamer@ustcredfalse\beamer@blackfalse\beamer@violetfalse\beamer@bluefalse} +\DeclareOption{ustcred}{\beamer@ustcbluefalse\beamer@ustcredtrue\beamer@blackfalse\beamer@violetfalse\beamer@bluefalse} +\DeclareOption{black}{\beamer@ustcbluefalse\beamer@ustcredfalse\beamer@blacktrue\beamer@violetfalse\beamer@bluefalse} +\DeclareOption{violet}{\beamer@ustcbluefalse\beamer@ustcredfalse\beamer@blackfalse\beamer@violettrue\beamer@bluefalse} +\DeclareOption{blue}{\beamer@ustcbluefalse\beamer@ustcredfalse\beamer@blackfalse\beamer@violetfalse\beamer@bluetrue} + +\ExecuteOptions{ustcblue} +\ProcessOptions\relax +\ifbeamer@ustcblue + \definecolor{themecolor}{cmyk}{1,0.8,0,0} %科大蓝色 +\fi +\ifbeamer@ustcred + \definecolor{themecolor}{cmyk}{0,1,1,0} %科大红色 +\fi +\ifbeamer@black + \definecolor{themecolor}{HTML}{000000} %黑色 +\fi +\ifbeamer@violet + \definecolor{themecolor}{cmyk}{0.8,1,0,0} %紫色 +\fi +\ifbeamer@blue + \definecolor{themecolor}{cmyk}{0.95,0.45,0,0} %蓝色 +\fi + +\useoutertheme{infolines}% +%\usefonttheme{serif} %使用衬线字体,自行设置 +%\setmainfont{Times New Roman} %全局英文字体,自行设置 +%\setCJKmainfont{STKaiti} %全局中文字体,自行设置 +\defbeamertemplate*{headline}{BLANK}{} +\defbeamertemplate*{navigation symbols}{} %隐藏导航栏 + +\setbeamerfont{frametitle}{size=\large} + +\setbeamercolor{section in toc}{fg=black} +\setbeamercolor{block title}{fg=black} +\setbeamercolor{caption name}{fg=black} +\setbeamercolor{title}{fg=white}% +\setbeamercolor{frametitle}{fg=white}% +\setbeamercolor{item projected}{bg=themecolor}% +\setbeamercolor{item}{fg=themecolor} + +\setbeamertemplate{items}[bullet]% +\setbeamertemplate{item}[bullet]% +\setbeamertemplate{sections/subsections in toc}[square]% + + +%%% 标题页设置,参考https://github.com/thomasWeise/ustcSlides %%% +\defbeamertemplate*{title page}{}[1][]{% +\strut\vfill\strut% +\begin{centering}% +\vfill\vfill\vfill\vfill% +{\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle}% +\vfill% +\begingroup{\ifx\insertsubtitle\empty% +\else% +\usebeamercolor[fg]{title}\usebeamerfont{title}\large{\insertsubtitle} +\vfill% +\fi}\endgroup% +\begin{beamercolorbox}[center,#1]{author}% +\usebeamercolor[bg]{frametitle}\usebeamerfont{author}\insertauthor% +\end{beamercolorbox}\vfill% +\begin{beamercolorbox}[center,#1]{institute}% +\usebeamercolor[fg]{title}\usebeamerfont{institute}\insertinstitute% +\end{beamercolorbox}\vfill% +\begin{beamercolorbox}[center,#1]{date}% +\usebeamercolor[fg]{title}\usebeamerfont{date}\insertdate% +\end{beamercolorbox}% +\end{centering} +\vfill\vfill\vfill\vfill\vfill% +}% +% +% +\gdef\startPresentation#1{% +% +\setbeamertemplate{footline}{}% +% +\usebackgroundtemplate{% +\hspace{-0.005\paperwidth}% +\vspace{-0.005\paperheight}% +\ifbeamer@ustcblue +\includegraphics[width=1.01\paperwidth,height=1.01\paperheight]{% +./figures/ustc_cover_1} +\fi +\ifbeamer@ustcred +\includegraphics[width=1.01\paperwidth,height=1.01\paperheight]{% +./figures/ustc_cover_2} +\fi +\ifbeamer@black +\includegraphics[width=1.01\paperwidth,height=1.01\paperheight]{% +./figures/ustc_cover_3} +\fi +\ifbeamer@violet +\includegraphics[width=1.01\paperwidth,height=1.01\paperheight]{% +./figures/ustc_cover_4} +\fi +\ifbeamer@blue +\includegraphics[width=1.01\paperwidth,height=1.01\paperheight]{% +./figures/ustc_cover_5} +\fi +}% +% +\begin{frame}% +\titlepage% +\end{frame}% +% +% +\defbeamertemplate*{footline}{USTC}{% +{\color{white}% +\strut\hfill% +{\insertshorttitle}% +\hfill\hfill% +{\insertshortauthor}({\insertshortinstitute})\qquad{\insertshortdate{}}% +\hfill\hfill% +{{\insertframenumber{}}/{\inserttotalframenumber}}% +\hfill\strut +\vskip2pt% +}}% +% +% +\ifbeamer@ustcblue +\pgfdeclareimage[width=1.01\paperwidth,height=1.01\paperheight]{ustc_background}{% +./figures/ustc_background_1} +\fi +\ifbeamer@ustcred +\pgfdeclareimage[width=1.01\paperwidth,height=1.01\paperheight]{ustc_background}{% +./figures/ustc_background_2} +\fi +\ifbeamer@black +\pgfdeclareimage[width=1.01\paperwidth,height=1.01\paperheight]{ustc_background}{% +./figures/ustc_background_3} +\fi +\ifbeamer@violet +\pgfdeclareimage[width=1.01\paperwidth,height=1.01\paperheight]{ustc_background}{% +./figures/ustc_background_4} +\fi +\ifbeamer@blue +\pgfdeclareimage[width=1.01\paperwidth,height=1.01\paperheight]{ustc_background}{% +./figures/ustc_background_5} +\fi +% +\usebackgroundtemplate{% +\hspace{-0.005\paperwidth}% +\vspace{-0.005\paperheight}% +\pgfuseimage{ustc_background}}% +% +\begin{frame}% +\frametitle{大纲}% +\tableofcontents[subsectionstyle=hide/hide/hide]% +#1% +\end{frame}% +% +}%