0

I am using minipage to divide a figure into two positions, on the left I have a figure made with pgf-pie that I would like the large text to be able to write outside and in the case of the text I would like it to be in the center (for please see the image)

example image

\documentclass[12pt,a4paper]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{pgf-pie}

\begin{document}

\section{example}

\hrule \begin{figure}[!h] \begin{minipage}[b]{0.3\textwidth} \caption{Example}\label{fig:ex1} \begin{tikzpicture}[scale=0.7] \pie[/tikz/nodes={text=white, font=\footnotesize\bfseries}, text=inside, explode={0.1,0.1,0.1,0.1},color={blue!70,cyan!70,red!70,orange!50}]{9.3/Cedro\rojo, 19.45/Café, 30.4/Cacao, 40.43/Tornillo } \end{tikzpicture} \end{minipage}\hfill\vrule\hfill \begin{minipage}[b]{0.6\textwidth} vallis augue. Etiam facilisis. Nunc elementum fermen- tum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pul- vinar elit purus eget enim. Nunc vitae tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae risus porta vehicula. \end{minipage} \end{figure} \hrule

\end{document}

remember to check the other answers on the forum and it appears to be unsupported. forum

royer
  • 361
  • 1
  • 14

1 Answers1

0
  • Using the [b] option you force your minipages to be bottom aligned. If that's not what you want, don't use this option

  • you could manually add the text outside of the pie chart using a normal tikz node


\documentclass[12pt,a4paper]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{pgf-pie}

\begin{document}

\section{example}

\hrule \begin{figure}[!h] \begin{minipage}{0.45\textwidth} \caption{Example}\label{fig:ex1} \centering \begin{tikzpicture}[scale=0.7] \pie[/tikz/nodes={text=white, font=\footnotesize\bfseries}, text=inside, explode={0.1,0.1,0.1,0.1},color={blue!70,cyan!70,red!70,orange!50}]{9.3/, 19.45/Café, 30.4/Cacao, 40.43/Tornillo } \node[align=center,font=\footnotesize] at (4.2,0.8) {Cedro\rojo}; \end{tikzpicture}% \end{minipage}\hfill\vrule\hfill \begin{minipage}{0.5\textwidth} vallis augue. Etiam facilisis. Nunc elementum fermen- tum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pul- vinar elit purus eget enim. Nunc vitae tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae risus porta vehicula. \end{minipage}% \end{figure} \hrule

\end{document}

enter image description here