我把下面的 tikzpicture 借用自https://tex.stackexchange.com/a/86310/10898,在我的 Beamer 标题页中。
尽管如此,我还是想尝试两件事。一方面,将 tikzfigure 相对于页面水平放置,如果可能的话,在第二种情况下,减少标题颜色框的宽度。
有什么提示可以继续吗?非常感谢您的帮助!
\documentclass[8pt,onlymath,usenames,dvipsnames]{beamer}
\usepackage{tikz}
\definecolor{titlecolor}{RGB}{0,173,239}
\mode<presentation>{
\usetheme{Warsaw}
\usefonttheme{structurebold}
\setbeamerfont{title}{family={\fontfamily{ppl}},series=\bfseries,size=\LARGE,shape=\itshape}
\definecolor{steelblue3}{rgb}{0.31,0.58,0.8}
\colorlet{structure}{steelblue3}
\usecolortheme[named=steelblue3]{structure}
\setbeamercovered{transparent}
\definecolor{skyblue3}{rgb}{0.42,0.65,0.8}
\setbeamercolor{blocks}{fg=black,bg=skyblue3}
\definecolor{purple4}{rgb}{0.33,0.1,0.55}
\setbeamercolor{alerted text}{fg=purple4}
\setbeamertemplate{navigation symbols}{}
\let\Tiny=\tiny
\setbeamersize{text margin left=0.4cm,text margin right=0.4cm}
}
\newcommand\titlepagedecoration{%
\begin{tikzpicture}[scale=.5,remember picture,overlay,shorten >= -10pt]
\coordinate (aux1) at ([yshift=-15pt] current page.north east); %1st two triangles
\coordinate (aux2) at ([yshift=-410pt]current page.north east); %last two triangles
\coordinate (aux3) at ([xshift=-4.5cm]current page.north east); %1st two triangles
\coordinate (aux4) at ([yshift=-150pt]current page.north east);
\begin{scope}[titlecolor!40,line width=6pt,rounded corners=6pt]
\draw
(aux1) -- coordinate (a)
++(225:5) --
++(-45:5.1) coordinate (b);
\draw[shorten <= -10pt]
(aux3) --
(a) --
(aux1);
\draw[opacity=0.6,titlecolor,shorten <= -10pt]
(b) --
++(225:2.2) --
++(-45:2.2);
\end{scope}
\draw[titlecolor,line width=4pt,rounded corners=4pt,shorten <= -10pt]
(aux4) --
++(225:0.8) --
++(-45:0.8);
\begin{scope}[titlecolor!70,line width=2pt,rounded corners=4pt]
\draw[shorten <= -10pt]
(aux2) --
++(225:3) coordinate[pos=0.45] (c) --
++(-45:3.1);
\draw
(aux2) --
(c) --
++(135:2.5) --
++(45:2.5) --
++(-45:2.5) coordinate[pos=0.3] (d);
\draw
(d) -- +(45:1);
\end{scope}
\end{tikzpicture}%
}
\vspace*{2.5pt}
\title[Conference-Year]{Title of the presentation}
\vspace*{.8cm}\author[Author]{\textcolor{steelblue3}{\textbf{{\Large Author}}} \\ \vspace{.5cm} }
\date{\textcolor{steelblue3}{\small\bf Conference\\Place, Month Year}}
\begin{document}
\titlepagedecoration
\begin{frame}[plain]
\vspace*{-1cm}
\begin{columns}
\begin{column}{1.9cm}
\centering
Logo1
\end{column}
\begin{column}{7cm}
\centering
{\textbf{\textcolor{steelblue3}{Center \\ Institute \\ Department}}}
\end{column}
\begin{column}{2cm}
\centering
Logo2
\end{column}
\end{columns}
\vspace{1cm}
\titlepage
\end{frame}
\end{document}
更新:
对于第一个问题,我尝试使用旋转包,但没有成功。而对于第二个问题,我使用了此代码
\setbeamertemplate{title page}[default][rounded=true,shadow=true,wd=0.8\textwidth]
,现在颜色框变短了,但它没有居中。
答案1
这是一种可能性;根据您的需要调整设置:
\documentclass[8pt,onlymath,usenames,dvipsnames]{beamer}
\usepackage{tikz}
\definecolor{titlecolor}{RGB}{0,173,239}
\mode<presentation>{
\usetheme{Warsaw}
\usefonttheme{structurebold}
\setbeamerfont{title}{family={\fontfamily{ppl}},series=\bfseries,size=\LARGE,shape=\itshape}
\definecolor{steelblue3}{rgb}{0.31,0.58,0.8}
\colorlet{structure}{steelblue3}
\usecolortheme[named=steelblue3]{structure}
\setbeamercovered{transparent}
\definecolor{skyblue3}{rgb}{0.42,0.65,0.8}
\setbeamercolor{blocks}{fg=black,bg=skyblue3}
\definecolor{purple4}{rgb}{0.33,0.1,0.55}
\setbeamercolor{alerted text}{fg=purple4}
\setbeamertemplate{navigation symbols}{}
\let\Tiny=\tiny
\setbeamersize{text margin left=0.4cm,text margin right=0.4cm}
}
\newcommand\titlepagedecoration{%
\begin{tikzpicture}[scale=.5,remember picture,overlay,shorten >= -10pt]
\coordinate (aux1) at ([xshift=15pt] current page.north west); %1st two triangles
\coordinate (aux2) at ([xshift=410pt]current page.north west); %last two triangles
\coordinate (aux3) at ([yshift=-4cm]current page.north west); %1st two triangles
\coordinate (aux4) at ([xshift=150pt]current page.north west);
\begin{scope}[titlecolor!40,line width=6pt,rounded corners=6pt]
\draw
(aux1) -- coordinate (a)
++(-45:5) --
++(45:5.1) coordinate (b);
\draw[shorten <= -10pt]
(aux3) --
(a) --
(aux1);
\draw[opacity=0.6,titlecolor,shorten <= -10pt]
(b) --
++(-45:2.2) --
++(45:2.2);
\end{scope}
\draw[titlecolor,line width=4pt,rounded corners=4pt,shorten <= -10pt]
(aux4) --
++(-45:0.8) --
++(45:0.8);
\begin{scope}[titlecolor!70,line width=2pt,rounded corners=4pt]
\draw[shorten <= -10pt]
(aux2) --
++(-45:3) coordinate[pos=0.45] (c) --
++(45:3.1);
\draw
(aux2) --
(c) --
++(225:2.5) --
++(135:2.5) --
++(45:2.5) coordinate[pos=0.3] (d);
\draw
(d) -- +(135:1);
\end{scope}
\end{tikzpicture}%
}
\title[Conference-Year]{Title of the presentation}
\vspace*{.8cm}\author[Author]{\textcolor{steelblue3}{\textbf{{\Large Author}}} \\ \vspace{.5cm} }
\date{\textcolor{steelblue3}{\small\bf Conference\\Place, Month Year}}
\makeatletter
\defbeamertemplate*{title page}{mydefault}[1][]
{
\vbox{}
\vfill
\begingroup
\centering
\parbox{.75\paperwidth}{% change the width here
\begin{beamercolorbox}[wd=\linewidth,sep=8pt,center,#1]{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,#1]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\endgroup
\vfill
}
\setbeamertemplate{title page}[mydefault][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]
\makeatother
\begin{document}
\titlepagedecoration
\begin{frame}[plain]
\vspace*{-1cm}
\begin{columns}
\begin{column}{1.9cm}
\centering
Logo1
\end{column}
\begin{column}{7cm}
\centering
{\textbf{\textcolor{steelblue3}{Center \\ Institute \\ Department}}}
\end{column}
\begin{column}{2cm}
\centering
Logo2
\end{column}
\end{columns}
\vspace{1cm}
\titlepage
\end{frame}
\end{document}
beamercolorbox
标题所用的 的宽度现在由 的宽度控制\parbox
,最初设置为0.75\paperwidth
;您可以在标有 的行中更改此值% change the width here
。