Changing margins in a beamer frame

I made a beamer presentation. In one of the frames I have a couple of pictures. However the left margin takes up a lot of space and the right margin is nearly zero. Having \centering in the figure also does not help, since the skewness of the location of the figures has to do with the margins.

How can I change margins locally? Can I use something similar to a geometry package? How do I define that within a frame?

\documentclass[xcolor=dvipsnames, table]{beamer}
\usetheme{Frankfurt}
\usepackage{framed}
\usepackage{graphicx,bm, multirow, subfig, tabularx}
\usepackage[]{textpos}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}
\begin{figure}
\centering
\begin{tabularx}{\linewidth}{@{}cXX@{}}
\begin{tabular}{cc}

\subfloat[title 1]{\includegraphics[height=5cm, width=5.5cm]{pic1.jpg}}
& \subfloat[title 2]{\includegraphics[height=5cm, width=5.5cm]{pic2.jpeg}}\\
\end{tabular}
\end{tabularx}
\end{figure}
\end{frame}
\end{document}


• Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Especially with beamer and its 'thousands' of templates and completely different looks it is hard to say which screw has to be turned to change the look. – user31729 Apr 18 '14 at 10:19
• @ChristianHupfer: I have added a pic and a MWE. Thanks. – Bravo Apr 18 '14 at 11:28
• Do you really need to change margins? Is not possible to adjust images size (width=.5\linewidth)? Do you know columns environment? – Ignasi Apr 22 '14 at 11:56

Use for \useoutertheme{infolines}, this reduces the left margin, then remove the \tabularx{} code as indicated. Keep the inner tabular with {rr} alignment.

\documentclass[xcolor=dvipsnames, table]{beamer}
\usetheme{Frankfurt}
\useoutertheme{infolines}
\usepackage{framed}
\usepackage{graphicx}
\usepackage{bm, multirow, subfig,tabularx}
\usepackage[]{textpos}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}
\begin{figure}
\centering
%\begin{tabularx}{\linewidth}{@{}rXX@{}}
\begin{tabular}{rr}
\subfloat[title1]{\includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}}
\subfloat[title2]{ \includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}} \tabularnewline
\end{tabular}
%\end{tabularx}
\end{figure}
\end{frame}
\end{document}


EDIT: Alternate version

If \useoutertheme{infolines} is no option, then a brute force method will help, depending on the size of the images, however:

\documentclass[xcolor=dvipsnames, table]{beamer}
\usetheme{Frankfurt}

\usepackage{framed}
\usepackage{graphicx}
\usepackage{bm, multirow, subfig,tabularx}
\usepackage[]{textpos}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}
\begin{figure}
\centering
%\begin{tabularx}{\linewidth}{@{}rXX@{}}
\begin{tabular}{rr}
\hspace{-0.5cm}%
\subfloat[title1]{\includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}}
\subfloat[title2]{ \includegraphics[height=5cm, width=5.5cm]{figs/dummy_fig}} \tabularnewline
\end{tabular}
%\end{tabularx}
\end{figure}
\end{frame}
\end{document}


As far as I know, the once chosen beamer theme in the beginning can not be changed somewhere later on, except from colour/font settings. This, however, does not effect the layout issue with outertheme infolines etc.

• Thanks Christian. It works perfectly for this frame, but marginally affects some other slides by pushing contents to the left. Is it possible to restrict outer theme to a single frame? Or control margin in any other way? – Bravo Apr 18 '14 at 12:01
• A brute force method? Add \hspace{-0.5cm} just before the first \subfloat command ;-) I feared, that outer frames would be affected. – user31729 Apr 18 '14 at 12:04

No need for the table, simply place the two subfloats next to each other

\documentclass[xcolor=dvipsnames, table]{beamer}
\usetheme{Frankfurt}
\usepackage{framed}
\usepackage{bm, multirow, subfig, tabularx}
\usepackage[]{textpos}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.callouts,shapes.arrows, chains,shapes.multipart}
%\usepackage{xcolor}
\usepackage[T1]{fontenc}

\begin{document}
\begin{frame}[plain]{Caption 1}
\begin{figure}
\subfloat[title 1]{\includegraphics[width=.45\textwidth]{example-image.jpg}}
\hfill
\subfloat[title 2]{\includegraphics[width=.45\textwidth]{example-image}}
\end{figure}
\end{frame}
\end{document}