mardi 2 décembre 2014

Customise beamer template


So! Like many people here, I'm trying to customise a beamer template to look like the .ppt template my university uses. For the regular slides, I'd like them to look like this:


My goal:


I'm getting pretty close! I have found a tutorial on how to make your own templates and have built my own .sty file. This is the way my slides look now:Current situation:


The only thing missing is the bar of colours. I have defined the colourcodes and so on and have created something that looks a lot like that bar, using the following code:



% Defining the different colours:
\definecolor{ULB}{RGB}{0,76,147}
\definecolor{ULBpoly}{RGB}{26,23,27}
\definecolor{ULBdroit}{RGB}{226,0,122}
\definecolor{ULBarch}{RGB}{144,190,69}
\definecolor{ULBsopo}{RGB}{0,143,194}
\definecolor{ULBphilo}{RGB}{133,135,140}
\definecolor{ULBmed}{RGB}{227,33,25}
\definecolor{ULBpsy}{RGB}{0,107,179}
\definecolor{ULBsci}{RGB}{108,80,152}
\definecolor{ULBsolvay}{RGB}{246,169,36}
\definecolor{ULBeurope}{RGB}{0,80,154}
\definecolor{ULBpharm}{RGB}{0,135,81}
% Adding them all together
\colorbox{ULB}{} \\
\vspace{-7.5pt}\colorbox{ULBpoly}{} \\
\vspace{-7.5pt}\colorbox{ULBdroit}{} \\
\vspace{-7.5pt}\colorbox{ULBarch}{} \\
\vspace{-7.5pt}\colorbox{ULBsopo}{} \\
\vspace{-7.5pt}\colorbox{ULBphilo}{} \\
\vspace{-7.5pt}\colorbox{ULBmed}{} \\
\vspace{-7.5pt}\colorbox{ULBpsy}{} \\
\vspace{-7.5pt}\colorbox{ULBsci}{} \\
\vspace{-7.5pt}\colorbox{ULBsolvay}{} \\
\vspace{-7.5pt}\colorbox{ULBeurope}{} \\
\vspace{-7.5pt}\colorbox{ULBpharm}{} \\


If I put this into a different .tex file to test it out, it delivers something looking like this:Bar


My question is twofold: 1) How do I get the coloured bar where I want it to be? I've added the University logo in the sidebar, and defined a background image for the University seal. I am a novice in template design, so I'm probably not using the most elegant methods.


2) How do I make LaTeX forget everything when I customise the titleframe, which looks totally different.


The MWE of the .sty file:



mode<presentation>
\usepackage{pgfcomp-version-0-65}
\usepackage{xcolor}
\definecolor{ULB}{RGB}{0,76,147}
\definecolor{ULBpoly}{RGB}{26,23,27}
\definecolor{ULBdroit}{RGB}{226,0,122}
\definecolor{ULBarch}{RGB}{144,190,69}
\definecolor{ULBsopo}{RGB}{0,143,194}
\definecolor{ULBphilo}{RGB}{133,135,140}
\definecolor{ULBmed}{RGB}{227,33,25}
\definecolor{ULBpsy}{RGB}{0,107,179}
\definecolor{ULBsci}{RGB}{108,80,152}
\definecolor{ULBsolvay}{RGB}{246,169,36}
\definecolor{ULBeurope}{RGB}{0,80,154}
\definecolor{ULBpharm}{RGB}{0,135,81}
\setbeamertemplate{sidebar canvas left}{
{\includegraphics[width=1cm,height=5cm]{example-image-16x9.jpg}}
}
\usebackgroundtemplate{\includegraphics[height=9.5cm,trim=-55cm 0 0 -37cm]{example-image-1x1.jpg}\vspace{2cm}}
\setbeamertemplate{frametitle}{\vspace*{2.5mm}\hspace*{1.5mm}\insertframetitle}
\mode
<all>


MWE for the presentation:



\documentclass{beamer}
\usetheme{MWE}
\usepackage{mwe}
\begin{document}
\begin{frame}\frametitle{Introduction}
\begin{itemize}
\item this is point 1
\item this is point 2
\end{itemize}
\end{frame}
\end{document}


I realise there are lots of "customise beamer" posts out there, but none seemed to help me with my specific problem.





Aucun commentaire:

Enregistrer un commentaire