## DEV Community is a community of 764,073 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Deuslirio Junior

Posted on • Updated on

# A custom LaTeX Presentation Template

In my university, we frequently need to present our studies. One option is to build our presentation using LaTeX/Beamer presentation templates.

Beamer is very powerful and practical to build presentations, but we needed a template with different style, with many slides layout, which usually is not provided by the default templates.

For example, the following image is a default template of beamer, in this template, the slides have this same layout (except for the title page).

So, with the help of some friends we built a custom LaTeX presentation template to help students, professors, or researchers to prepare their presentation slides in the format 16:9. Besides presenting a modern design concept, the template provides different slides’ layouts and color schemas to personalize the presentation.

# How to use

After downloading or cloning this repository, you must edit the file presentation.tex to fill the content of the presentation. Firstly, take a look at the "Primary Definitions" part, at the begin of such a .tex, and modify its parties, whether is needed. if you compile the code without changing, it will look like this.

To set the default color of the presentation, you can use the command \setPrimaryColor{color}. This command supports one of the colors defined by the template or any color defined by the user.

\setPrimaryColor{UFGBlue}


To set the logo of the department or institute, from the authors take part, you must use the command \setLogos{path/horizontal_logo}{path/squared_logo} to inform the paths of two files. The first one is the logo in title slide - we recommend using a horizontal image - and the second one is the logo used in the remaining slides - we recommend using a square image.

\setLogos{lib/logos/infw.png}{lib/logos/infw2.png}


To define a layout for a slide, you must use the command \setLayout{layoutname}, just informing the name of the layout you would like to use. This command must be placed before the command \begin{frame} of the slide you would like to change.

\setLayout{horizontal}
\begin{frame}
\tableofcontents
\end{frame}


To define a color for the background of a slide, you must use the command \setBGColor{color} informing a color. This command must be placed before the command \begin{frame} of the slide you would like to change. The color may be one of the template’s colors or a personalized color defined by the user.

\setBGColor{DarkOrange}
\begin{frame}
\frametitle{Pause Example}

\begin{itemize}
\item In this slide \pause
\item the text will be partially visible \pause
\item And finally everything will be there
\end{itemize}

\end{frame}

\definecolor{MyColor}{RGB}{10, 115, 110}
\setBGColor{MyColor}
\begin{frame}
% ...
\end{frame}


## Template's Layouts

At this momment, UFGTeXPresentation has five option for slides' layout: titlepage, vertical, horizontal, mainpoint, and blank. You can see each layout appearance at the following figure:

## Summary of the Template's commands

Template Commands Number of Params Type of Params Example
setLayout 1 Layout \setLayout{vertical}
setBGColor 1 Color \setBGColor{DarkPurple}
setPrimaryColor 1 Color \setPrimaryColor{UFGBlue}
setLogos 2 Image URL \setLogos{lib/logos/infw.png}{lib/logos/infw2.png}

# Overleaf

Overleaf is a platform to share and coedit LaTeX projects.
This template can be easily used and modified directly in the Overleaf

## Discussion (6)

John Idogun

\textbf doesn't work in the template. How do I bold some texts?

Deuslirio Junior

Hi, I have not faced this problem. Can you detail your case?
I suppose that in your case the style is overwritten in beamerthemeUfg.sty
but I can not simulate this behavior yet.

John Idogun

I want to have some bold fonts for some normal texts on my slides but couldn't achieve that. What I tried doing was wrapping the texts in \textbf{} command since this boldens texts in normal LaTeX but nothing happened. The texts remained unbold.

Deuslirio Junior • Edited on

This is intriguing, I can't reproduce it.
Are you using pdfLaTeX as compiler?
If you keep this problem a suggest you to use Overleaf overleaf.com/latex/templates/ufgte...

Check this, I'm using it directly in Overleaf and it is working nicely:


\setLayout{horizontal}
\begin{frame}
\frametitle{Sample frame title}
This is a text in second frame. For the sake of showing an example.

\begin{itemize}
\item<1-> \textbf{Text }visible on slide 1
\item<2-> Text visible on slide 2
\begin{itemize}
\item text sub\textbf{item}
\end{itemize}
\end{itemize}
\end{frame}


John Idogun

I'm compiling it with XeLaTeX on my ubuntu-based system, Pop!_OS, because it is required I use the Times New Roman font. I will certainly test it out on Overleaf.

Deuslirio Junior • Edited on

Ah, ok.
Using pdfLatex, try to use \usepackage{newtxtext,newtxmath} below \usetheme in tex file

\usetheme{Ufg}
\usepackage{newtxtext,newtxmath}


To change the font of titles, comment line 11 in sty file

\mode<presentation>
% \usefonttheme[onlymath]{serif}


result: