3

This is my first post so excuse me if I'm not complying to all the rules.

I'm trying to make a LaTex presentation template for my company using beamer. I have almost everything I want except for the title page. I need a sidebar with a gradient ONLY in the title page, because that's the standard title page for our company. I've tried the "\useoutertheme{sidebar}" inside the \defbeamertemplate for the title page but it doesn't work. Also tried to wrap the \frame definition with the \useoutertheme but no success either. Being very new to beamer, I have no clue what else to do.

Here's my MWE:

\documentclass{beamer}

\definecolor{dark}{rgb}{0.05, 0.3, 0.5}
\definecolor{light}{rgb}{0.1, 0.5, 0.7}

% Imports
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[margin=1in]{geometry}
\usepackage{pythontex}
\usepackage[svgnames]{xcolor}

\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

% Theme definitions
\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer

\mode<presentation>

\useoutertheme[footline=title]{miniframes}
\useinnertheme{circles}

\setbeamertemplate{blocks}[rounded][shadow=true]

% Colors
\setbeamercolor{palette primary}{bg=dark, fg=black}
\setbeamercolor{palette secondary}{bg=light, fg=black}
\setbeamercolor{palette tertiary}{bg=dark, fg=white}
\setbeamercolor{palette quaternary}{bg=dark, fg=light}

\setbeamercolor{structure}{fg=black}

\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{title}{bg=light}

\setbeamercolor{item}{fg=light}
\setbeamercolor{itemize item}{fg=black}
\setbeamercolor{itemize subitem}{fg=black}

\setbeamercolor{institute in head/foot}{fg=white}

% Title page
\defbeamertemplate*{title page}{customized}[1][]
{
\begin{center}
    \usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par
    \usebeamercolor[bg]{palette primary}www.url.com\par
    \vspace{0.15\paperheight}
    \usebeamerfont{title}\inserttitle\par
    \vspace{0.6\paperheight}
    \usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle
\end{center}  
}

\mode
<all>

\title{Title}   
\titlegraphic{Title Graphic}
\logo{Logo}
\date{}

% Begin document
\begin{document}

% Title page and contents
\frame[plain]{\titlepage} 
\frame[plain]{\frametitle{Contents}\tableofcontents} 

% Sections
\section{Intro} 
\frame{
\frametitle{\insertsectionhead} 

}

\section{Second} 

\frame{
\frametitle{\insertsectionhead} 

}

\end{document}

And here's what I'm trying to accomplish:

Example slide

  • PS #1: I have copied some of the code from other templates, so there might be some useless lines I don't know are useless yet
  • PS #2: I don't mind if the gradient isn't exactly equal as the example image (the example gradient starts with some sort of offset/margin from the left), but it would be a bonus for me
1

Quick and dirty:

\documentclass[xcolor={svgnames}]{beamer}

\definecolor{dark}{rgb}{0.05, 0.3, 0.5}
\definecolor{light}{rgb}{0.1, 0.5, 0.7}

% Imports
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

%\usepackage[margin=1in]{geometry}
\usepackage{pythontex}
%\usepackage[svgnames]{xcolor}

\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

% Theme definitions
\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer

\mode<presentation>

\useoutertheme[footline=title]{miniframes}
\useinnertheme{circles}

\setbeamertemplate{blocks}[rounded][shadow=true]

% Colors
\setbeamercolor{palette primary}{bg=dark, fg=black}
\setbeamercolor{palette secondary}{bg=light, fg=black}
\setbeamercolor{palette tertiary}{bg=dark, fg=white}
\setbeamercolor{palette quaternary}{bg=dark, fg=light}

\setbeamercolor{structure}{fg=black}

\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{title}{bg=light}

\setbeamercolor{item}{fg=light}
\setbeamercolor{itemize item}{fg=black}
\setbeamercolor{itemize subitem}{fg=black}

\setbeamercolor{institute in head/foot}{fg=white}

\makeatletter

\pgfdeclarehorizontalshading{beamer@titleshade}{\paperheight}{%
    color(0pt)=(dark);
    color(.2\paperwidth)=(white!80!dark);
    color(\paperwidth)=(white)
}
\makeatother

% Title page
\defbeamertemplate*{title page}{customized}[1][]
{
\begin{pgfpicture}{30pt}{0pt}{\paperwidth}{\paperheight}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\paperheight}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@titleshade}}
\end{pgfpicture}
\vspace*{-.8\paperheight}

\hspace*{.1\paperwidth}
\begin{minipage}{.8\paperwidth}
        \centering
    \usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par
    \usebeamercolor[bg]{palette primary}www.url.com\par
    \vspace{0.15\paperheight}
    \usebeamerfont{title}\inserttitle\par
    \vspace{0.6\paperheight}
    \usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle
\end{minipage} 
}

\mode
<all>

\title{Title}   
\titlegraphic{Title Graphic}
\logo{Logo}
\date{}

% Begin document
\begin{document}

% Title page and contents
\frame[plain]{\titlepage} 
\frame[plain]{\frametitle{Contents}\tableofcontents} 

% Sections
\section{Intro} 
\frame{
\frametitle{\insertsectionhead} 

}

\section{Second} 

\frame{
\frametitle{\insertsectionhead} 

}

\end{document}

enter image description here

Please note that you cannot use \usepackage[margin=1in]{geometry} and \usepackage[svgnames]{xcolor} -- beamer already loads these packages and thus your code cannot be compiled due to option clashes.

  • This is very close. The only thing missing now is that the gradient should end earlier and the rest of the page needs to be white. Also, removing the lines you pointed out finally removed some cryptic warnings I was having during compilation (even though it finished and produced a pdf) that I couldn't figure out. Thanks a lot for your help! – clow539 Jul 23 '18 at 23:34
  • I managed to solve it! I added color(.21\paperwidth)=(white); after color(.2\paperwidth)=(white!80!plan4dark); Now it works perfect. Thanks for your answer! – clow539 Jul 23 '18 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.