\documentclass[10pt]{beamer}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[english]{babel}
\usepackage{color}
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{pgf}
\usepackage{setspace}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{mathrsfs}
\usetikzlibrary{arrows,shapes}
\usepackage{adjustbox}
\usepackage{pgf,tikz}
\mode<presentation>{
\usetheme{Warsaw}
\usecolortheme{crane}
\setbeamertemplate{navigation symbols}{}
\setbeamercovered{transparent}
}
\title{Disks}
\AtBeginSubsection[]{
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}
\begin{document}
\begin{frame}{Initial solution}
%\begin{adjustbox}{max size={.95\textwidth}{.8\textheight}}
\resizebox{11.5cm}{!}{%
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]%, scale=0.5]
\coordinate (b) at (13,3) ;
\coordinate (c) at (14,3) ;
\coordinate (d) at (15,3) ;
\coordinate (i) at (9,5) ;
\coordinate (g) at (9,4) ;
\coordinate (e) at (9,3) ;
\coordinate (n) at (5,3) ;
\coordinate (o) at (4,3) ;
\coordinate (p) at (3,3) ;
\coordinate (a) at (12,3) ;
\coordinate (m) at (6,3) ;
\coordinate (h) at (10,5) ;
\coordinate (j) at (10,4) ;
\coordinate (f) at (10,3) ;
\draw (p) circle [radius = 3];
\draw (d) circle [radius = 3];
\end{tikzpicture}
}%
%\end{adjustbox}
\end{frame}
\end{document}
In the MWE above,
- When I use
\resizeboxto scale the picture, the entire picture (2 disks) are visible, provided I do not exceed 11.5cm (a value found out by trial-and-error, something I want to avoid)
- Hence, I tried using
adjustbox(as mentioned in the question here), but if I usedadjustboxby commenting the\resizeboxblock and uncommenting theadjustboxline, the effect was as if I hadn't used it at all. (The disk on the right was completely left out of the picture.)
What am I doing wrong? I could finish my current slides using \resizebox, but I wanted to use the "better" way of "scaling only if required" usingadjustbox, and wanted to understand why it isn't happening in my case...
\resizebox{11.5cm}{!}{}with\resizebox{\columnwidth}{!}{}and for adjustbox use\begin{adjustbox}{max size={\columnwidth}{!}}instead of\begin{adjustbox}{max size={.95\textwidth}{.8\textheight}}. – cacamailg Jun 08 '13 at 19:04adjustbox Version v1.0 – 2012/05/21, TeXLive 2012. – cacamailg Jun 08 '13 at 19:22texdoc adjustboxand it display the documentation pdf file, which has the version on the top. – cacamailg Jun 08 '13 at 19:44