如何让思维导图适合框架?

如何让思维导图适合框架?

我正在使用一些 tikz 概念创建 Beamer 演示文稿,如何使思维导图适合幻灯片?我的代码如下:

\documentclass[T]{beamer}

\definecolor{links}{HTML}{2A1B81}
\hypersetup{colorlinks,linkcolor=,urlcolor=red}

\usetheme{Frankfurt}
\usecolortheme{dolphin}
\usefonttheme{structuresmallcapsserif}
\usefonttheme{serif}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\usepackage[graphics,tightpage]{preview}

\setbeamertemplate{button}{\tikz
\node[
inner xsep=10pt,
draw=structure!80,
fill=structure!50,
rounded corners=4pt]  {\Large\insertbuttontext};}


\title{Presentation Template}
\setbeamercolor{author}{fg=yellow}
\author{asdfasdfa}
\setbeamercolor{date}{fg=yellow}
\date\today



\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section*{Outline}


\begin{frame}
\begin{multicols}{2}
\frametitle{Contents}
\tableofcontents
\end{multicols} 
\end{frame}

\section{Timeline}
\begin{frame}
\frametitle{ Timeline}
\centering

\end{frame}

\begin{frame}
\begin{tikzpicture}
\path[mindmap,concept color=blue, text=white, transform shape]
node[concept]{bicycle}
    child[grow=0, concept color=red]{node[concept]{road bicycle}
        child[grow=30]{node[concept]{time trial bicycle}}
        child[grow=30]{node[concept]{road racing bicycle}}}
    child[grow=60, concept color=black]{node[concept]{mountain bicycle}}    
    child[grow=120, concept color=orange]{node[concept]{tandem bicycle}};
\end{tikzpicture}
\end{frame}
\end{document}

答案1

另一个选择是使用\resizebox

\documentclass[T]{beamer}

\definecolor{links}{HTML}{2A1B81}
\hypersetup{colorlinks,linkcolor=,urlcolor=red}

\usetheme{Frankfurt}
\usecolortheme{dolphin}
\usefonttheme{structuresmallcapsserif}
\usefonttheme{serif}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\usepackage[graphics,tightpage]{preview}

\setbeamertemplate{button}{\tikz
\node[
inner xsep=10pt,
draw=structure!80,
fill=structure!50,
rounded corners=4pt]  {\Large\insertbuttontext};}


\title{Presentation Template}
\setbeamercolor{author}{fg=yellow}
\author{asdfasdfa}
\setbeamercolor{date}{fg=yellow}
\date\today



\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section*{Outline}


\begin{frame}
\begin{multicols}{2}
\frametitle{Contents}
\tableofcontents
\end{multicols} 
\end{frame}

\section{Timeline}
\begin{frame}
\frametitle{ Timeline}
\centering

\end{frame}

\begin{frame}
\resizebox{\textwidth}{!}{%
\begin{tikzpicture}
            \path[mindmap,concept color=blue, text=white, transform shape]
            node[concept,scale=0.8]{bicycle}
            child[grow=0, concept color=red]{node[concept]{road bicycle}
                child[grow=30]{node[concept]{time trial bicycle}}
                child[grow=90]{node[concept]{road racing bicycle}}}
            child[grow=60, concept color=black]{node[concept]{mountain bicycle}}    
            child[grow=120, concept color=orange]{node[concept]{tandem bicycle}};
        \end{tikzpicture}%
}
\end{frame}
\end{document}

在此处输入图片描述

答案2

您可以改变scale=<whatever you like>其中的一些nodes- 将其包装起来也有\makebox[\textwidth]一点帮助。

截屏

如果您愿意,您还可以进行更改 -level distance这是一个相当手动的过程,但对于演示文稿来说这是可以的,因为它们与常规文档有很大不同。

% arara: pdflatex
% !arara: indent: { overwrite: on}
\documentclass{beamer}

\usetheme{Frankfurt}
\usecolortheme{dolphin}
\usefonttheme{structuresmallcapsserif}
\usefonttheme{serif}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}

\begin{frame}
    \makebox[\textwidth][c]{%
        \begin{tikzpicture}
            \path[mindmap,concept color=blue, text=white, transform shape]
            node[concept,scale=0.8]{bicycle}
            child[grow=0, concept color=red]{node[concept]{road bicycle}
                child[grow=30]{node[concept]{time trial bicycle}}
                child[grow=90]{node[concept]{road racing bicycle}}}
            child[grow=60, concept color=black]{node[concept]{mountain bicycle}}    
            child[grow=120, concept color=orange]{node[concept]{tandem bicycle}};
        \end{tikzpicture}
    }
\end{frame}
\end{document}

相关内容