我想创建自己的beamer theme
,并且我已经获得了它的粗略代码。
\documentclass[serif]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{tikz,blindtext,enumerate,charter}
\usetikzlibrary{fadings,positioning,calc}
\newcommand{\changefont}[3]{\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont}
\definecolor{blau}{RGB}{0,191,255}
%\definecolor{blau}{RGB}{226, 245, 13}
\definecolor{ora}{RGB}{253,111,1}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}
\begin{tikzpicture}[remember picture,overlay]
\fill[inner color=blau] (current page.south west) rectangle (current page.north east);
\node[opacity=.6] at ([xshift=.05cm,yshift=1.03cm]$(current page.north west)!.5!(current page.south east)$) {\Huge\sc Die Überschrift};
\node[red] at ([yshift=1cm]$(current page.north west)!.5!(current page.south east)$) {\Huge\sc Die Überschrift};
\node[ora] at ([yshift=-.5cm]$(current page.north west)!.5!(current page.south east)$) {\changefont{lmr}{m}{it}Der Autor};
\end{tikzpicture}
\end{frame}
\begin{frame}
\begin{tikzpicture}[overlay,remember picture]
\fill[path fading=north,fading transform={yshift=-.5cm},fading angle=225,blau] (current page.north west) rectangle (current page.south east);
\node[yshift=.2cm,above left] at (current page.south east) {\changefont{lmr}{m}{n}Zeichnen mit Ti\emph{\color{blau}k}Z};
\node[yshift=.15cm,xslant=.6,xshift=-1.75cm,yscale=-1,opacity=.4] at (current page.south east) {\changefont{lmr}{m}{n}Zeichnen mit Ti\emph{\color{blau}k}Z};
\fill[opacity=.6,black] ([xshift=2.1cm]current page.north west) -- ([xshift=2.1cm,yshift=-1.5cm]current page.north west) -- ([xshift=2.6cm,yshift=-1.2cm]current page.north west) -- ([xshift=3.1cm,yshift=-1.5cm]current page.north west) -- ([xshift=3.1cm]current page.north west);
\fill[red] ([xshift=2cm]current page.north west) -- ([xshift=2cm,yshift=-1.5cm]current page.north west) -- ([xshift=2.5cm,yshift=-1.2cm]current page.north west) -- ([xshift=3cm,yshift=-1.5cm]current page.north west) -- ([xshift=3cm]current page.north west);
\node[white,inner sep=0pt] (a) at ([xshift=2.5cm,yshift=-.5cm]current page.north west) {\changefont{pzc}{b}{n}Thema};
\node[white,below=.2mm of a] {\changefont{lmtt}{m}{b}1};
\draw[red,thick,yshift=.1cm] (-1,3) -- (7.7,3) node[near end,above,xshift=1cm,red] {\changefont{put}{m}{n}Der Titel};
% \node[below left,opacity=.3,rotate=-20,xshift=1cm,yshift=-.5cm] at (current page.north east) {\includegraphics[scale=.2]{shot}};
\end{tikzpicture}
\vspace{-2cm}\parbox{.7\textwidth}{\color{black!85}\footnotesize\blindtext[1]}
\end{frame}
\begin{frame}
\begin{tikzpicture}[overlay,remember picture]
\fill[path fading=north,fading transform={yshift=-.5cm},fading angle=225,blau] (current page.north west) rectangle (current page.south east);
\node[yshift=.26cm,above left] at (current page.south east) {\changefont{lmr}{m}{n}Die Präsentation};
% {Das Arbeiten mit \color{blau}\sc\LaTeX};
\node[yshift=.15cm,xslant=.6,xshift=-1.6cm,yscale=-1,opacity=.4] at (current page.south east) {\changefont{lmr}{m}{n}Die Präsentation};
% {Das Arbeiten mit \color{blau}\sc\LaTeX};
\fill[opacity=.6,black] ([xshift=2.1cm]current page.north west) -- ([xshift=2.1cm,yshift=-1.5cm]current page.north west) -- ([xshift=2.6cm,yshift=-1.2cm]current page.north west) -- ([xshift=3.1cm,yshift=-1.5cm]current page.north west) -- ([xshift=3.1cm]current page.north west);
\fill[red] ([xshift=2cm]current page.north west) -- ([xshift=2cm,yshift=-1.5cm]current page.north west) -- ([xshift=2.5cm,yshift=-1.2cm]current page.north west) -- ([xshift=3cm,yshift=-1.5cm]current page.north west) -- ([xshift=3cm]current page.north west);
\node[white,inner sep=0pt] (a) at ([xshift=2.5cm,yshift=-.5cm]current page.north west) {\changefont{pzc}{b}{n}Thema};
\node[white,below=.2mm of a] {\changefont{lmtt}{m}{b}2};
%\node[below left,opacity=.3,rotate=-20,xshift=1cm,yshift=-.5cm] at (current page.north east) {\includegraphics[scale=.2]{shot}};
\end{tikzpicture}
\vspace{-2cm}\parbox{.7\textwidth}{
\begin{enumerate}[\tikz{\fill[white]circle(.13);\fill[red]circle(.1);}]
\item \color{black!85}Hallo,
\item Welt!
\end{enumerate}
}
\end{frame}
\end{document}
输出如下:
我的问题是:我怎样才能实现这一目标
- 右下角出现长
frame title
?✔¹ - 代替“Thema”的是简短的
frame title
?✔¹ - 无需手动输入
section
号码,就会出现“正常”号码? - “阴影”效果(例如带有 TikZ 的图画;下面不透明度较低的相同文本)会自动调整至上面的文本(这是否意味着不再
xshift=…
需要)?
我只知道一些可以将其转变为“主题”的命令,但我对使用该类没有经验beamer
,我只知道基础知识。
¹ 非常感谢samcarter
。
答案1
正如您已经在使用的那样,tikz
您可以使用它来自由放置框架标题和副标题。
\documentclass{beamer}
\usepackage{tikz}
\setbeamertemplate{frametitle}{%
\begin{tikzpicture}[overlay, remember picture]
\node[yshift=-0.4cm,xshift=1cm,anchor=west] at (current page.north west) {\insertframesubtitle};
\node[yshift=0.4cm, anchor=east] at (current page.south east) {\insertframetitle};
\end{tikzpicture}
}
\begin{document}
\begin{frame}
\frametitle{frametitle}
\framesubtitle{framesubtitle}
content
\end{frame}
\end{document}