diff --git a/beamercolorthemeaptero.sty b/beamercolorthemeaptero.sty index af5c7a9..8e901d8 100644 --- a/beamercolorthemeaptero.sty +++ b/beamercolorthemeaptero.sty @@ -83,7 +83,9 @@ \setbeamercolor{verse}{fg=, bg=black!15} \setbeamercolor{quote}{fg=, bg=black!15} +\setbeamercolor{quote symbol}{fg=red} \setbeamercolor{quotation}{fg=, bg=black!15} +\setbeamercolor{quotation symbol}{fg=blue} \setbeamercolor{section in toc}{parent={normal text}} \setbeamercolor{subsection in toc}{parent={normal text}} diff --git a/beamerthemelines.sty b/beamerthemelines.sty index 63677a6..251443f 100644 --- a/beamerthemelines.sty +++ b/beamerthemelines.sty @@ -544,76 +544,155 @@ %%%%% verse, quotation, quote: - -% \begin{tikzpicture} -% \useasboundingbox (0,0) rectangle (5,5); -% \node at (2,2) {Foo}; -% \end{tikzpicture} - % font selection % https://tex.stackexchange.com/questions/25249/how-do-i-use-a-particular-font-for-a-small-section-of-text-in-my-document -% pbk , phv, pnc, qbk, qhv, qcs -\newcommand*\openquote{\makebox(25,-22){\scalebox{5}{\fontfamily{pbk}\selectfont ``}}} +% pbk , phv, pnc, qcs +\newcommand{\openquote}[1][4]{\tikz[baseline]{% + \useasboundingbox (0, 0) rectangle (1ex, 1.7ex); + \node[scale=#1, xshift=-0.6ex, yshift=-0.77ex] at (current bounding box.north east) {\fontfamily{pbk}\selectfont\textquotedblleft}; +}} + +\def\insertquoteauthor{} +\newcommand{\quote@author@left}[1]{% + \ifx\insertquoteauthor\@empty\else% + \item[% + \usebeamerfont{#1 author}% + \usebeamercolor{#1 author}% + \usebeamertemplate{#1 author separator}% + \insertquoteauthor]% + \fi} +\newcommand{\quote@author@right}[1]{% + \ifx\insertquoteauthor\@empty\else% + \par{}\hfill% + \usebeamerfont{#1 author}% + \usebeamercolor{#1 author}% + \usebeamertemplate{#1 author separator}% + \insertquoteauthor% + \fi} +\newcommand{\quote@author@rightline}[1]{% + \ifx\insertquoteauthor\@empty\else% + \hfill% + \usebeamerfont{#1 author}% + \usebeamercolor{#1 author}% + \usebeamertemplate{#1 author separator}% + \insertquoteauthor% + \fi} + +% quotation environment \defbeamertemplate{quotation symbol}{default}{} -\defbeamertemplate{quotation symbol}{quotes}{\textquotedblleft} -\defbeamertemplate{quotation symbol}{bigquotes}{\openquote} +\defbeamertemplate{quotation symbol}{quotes}[1][5]{\usebeamercolor[fg]{quotation symbol}\openquote[#1]} -\setbeamertemplate{quotation symbol}[bigquotes] +\setbeamertemplate{quotation symbol}[quotes][6] \defbeamertemplate{quotation author separator}{default}{} \defbeamertemplate{quotation author separator}{dash}{ --- } \setbeamertemplate{quotation author separator}[dash] -\newcommand{\quote@author@left}[1]{% - \item[% - \usebeamerfont{#1 author}% - \usebeamercolor{#1 author}% - \usebeamertemplate{#1 author separator}% - \insertquoteauthor]} -\newcommand{\quote@author@right}[1]{% - \par{}\hfill% - \usebeamerfont{#1 author}% - \usebeamercolor{#1 author}% - \usebeamertemplate{#1 author separator}% - \insertquoteauthor} -\newcommand{\quote@author@rightline}[1]{% - \hfill% - \usebeamerfont{#1 author}% - \usebeamercolor{#1 author}% - \usebeamertemplate{#1 author separator}% - \insertquoteauthor} - +\defbeamertemplate{quotation author}{none}{} \defbeamertemplate{quotation author}{left}{\quote@author@left{quotation}} \defbeamertemplate{quotation author}{right}{\quote@author@right{quotation}} \defbeamertemplate{quotation author}{rightline}{\quote@author@rightline{quotation}} -\setbeamertemplate{quotation author}[rightline] +\setbeamertemplate{quotation author}[rightline] % none, left, right, rightline + +\defbeamertemplate*{quotation begin}{none}{} +\defbeamertemplate*{quotation end}{none}{} % see definition in /usr/share/texmf/tex/latex/beamer/base/beamerbaselocalstructure.sty \renewenvironment<>{quotation}[1][] { \def\insertquoteauthor{#1} \actionenv#2% + \beamercolorbox[vmode]{quotation} \usebeamertemplate{quotation begin} - \usebeamerfont{quotation}% + \usebeamerfont*{quotation}% \usebeamercolor{quotation}% - \list{\usebeamertemplate{quotation symbol}}{ - %\listparindent 1.5em% - %\itemindent \listparindent - \rightmargin \leftmargin + \list{}{ + \leftmargin 3em + \rightmargin 2em + \listparindent 1.5em + \itemindent \listparindent + \labelsep \listparindent + \advance\labelsep by 1.5ex\relax \parsep \z@ \@plus\p@ }% - \item\strut\relax + \item[\usebeamertemplate{quotation symbol}]\relax +} +{% + \usebeamertemplate{quotation author} + \endlist\usebeamertemplate{quotation end} + \endbeamercolorbox + \endactionenv% } -{\usebeamertemplate{quotation author}\endlist\usebeamertemplate{quotation end}\endactionenv} -%\defbeamertemplate*{quotation begin}{default} -%{\beamercolorbox[vmode]{quotation}} +% quote environment: + +\defbeamertemplate{quote symbol}{default}{} +\defbeamertemplate{quote symbol}{quotes}[1][5]{\usebeamercolor[fg]{quote symbol}\openquote[#1]} + +\setbeamertemplate{quote symbol}[quotes][6] + +\defbeamertemplate{quote author separator}{default}{} +\defbeamertemplate{quote author separator}{dash}{ --- } -%\defbeamertemplate*{quotation end}{default} -%{\endbeamercolorbox} +\setbeamertemplate{quote author separator}[dash] + +\defbeamertemplate{quote author}{none}{} +\defbeamertemplate{quote author}{left}{\quote@author@left{quote}} +\defbeamertemplate{quote author}{right}{\quote@author@right{quote}} +\defbeamertemplate{quote author}{rightline}{\quote@author@rightline{quote}} + +\setbeamertemplate{quote author}[rightline] % none, left, right, rightline + +\defbeamertemplate*{quote begin}{none}{} +\defbeamertemplate*{quote end}{none}{} + +\renewenvironment<>{quote}[1][] +{ \def\insertquoteauthor{#1} + \actionenv#2% + \beamercolorbox[vmode]{quote} + \usebeamertemplate{quote begin} + \usebeamerfont*{quote}% + \usebeamercolor{quote}% + \list{}{ + \leftmargin 3em + \rightmargin 2em + \labelsep 1.5ex + \parsep 1ex + }% + \item[\usebeamertemplate{quote symbol}]\relax +} +{% + \usebeamertemplate{quote author} + \endlist\usebeamertemplate{quote end} + \endbeamercolorbox + \endactionenv% +} +% verse environment: + +\defbeamertemplate*{verse begin}{none}{} +\defbeamertemplate*{verse end}{none}{} + +\renewenvironment<>{verse} +{ \actionenv#1% + \beamercolorbox[vmode]{verse} + \usebeamertemplate{verse begin} + \usebeamerfont*{verse}% + \usebeamercolor{verse}% + \list{}{ + \leftmargin 2em + \rightmargin 2em + \parsep 1ex + }% + \item\relax +} +{% + \endlist\usebeamertemplate{verse end} + \endbeamercolorbox + \endactionenv% +} %%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -887,6 +966,14 @@ \setbeamerfont{message}{parent={normal text}, size=\large} \setbeamerfont{message item}{parent={normal text}, size=\large} +\setbeamerfont{quotation}{shape=\slshape} +\setbeamerfont{quotation author}{parent={normal text}, size=\small, shape=\upshape} + +\setbeamerfont{quote}{shape=\slshape} +\setbeamerfont{quote author}{parent={normal text}, size=\small, shape=\upshape} + +\setbeamerfont{verse}{shape=\itshape} + \setbeamerfont*{section title}{size=\huge} \setbeamerfont*{section name}{size=\huge} \setbeamerfont*{subsection title}{size=\Large} diff --git a/lines-example.tex b/lines-example.tex index a73b7c9..7d327a3 100644 --- a/lines-example.tex +++ b/lines-example.tex @@ -268,7 +268,7 @@ \vspace{2ex} \begin{block}{Colors/Fonts} - \verb!\setbeamercolor{alerted text}{fg=red}! + \verb!\setbeamercolor{alerted text}{fg=red}!\\ \verb!\setbeamercolor{structure}{fg=blue}! \end{block} \end{frame} @@ -349,26 +349,27 @@ \end{frame} \begin{frame}[fragile]{Quotations} - Let's start with a poem: - \begin{verse} - A \verb!verse! environment.\\With a second line. - \end{verse} - \vfill Quote something of somebody with indentation: - \begin{quotation}[Me] + \begin{quotation}[Me And Myself] A \verb!quotation! environment. There is a lot to talk about and it really takes a lot of words to express this. Most likely this - does not fit into a single line. + does not fit into a single line. We might even need yet another + full new line. Here we even start a second paragraph. \end{quotation} \vfill - Quote something else of somebody else: + Quote something else of somebody else (empty author argument): \begin{quote} - A \verb!quote! environment.\\With a second line. + A \verb!quote! environment. + + With a second line. \end{quote} \vfill - ... to be improved (with huge quotation marks and horizontal lines) + Here is a poem: + \begin{verse} + A \verb!verse! environment ---\\with a second line. + \end{verse} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%