0

I'm using a descriptive diagram to display some equations, but I've faced a trouble when I make a longer equation, my text goes out of the description box, so my question is how to make the text start from the left corner of my descriptive box item or in generally how to fit it with the item box:

enter image description here

  \begin{frame}
    \begin{center}
   \smartdiagramset{
   description title font = \scriptsize,
   descriptive items y sep =  2cm,
   description title text width=2cm,
   description title width= 2cm,
   description width=8cm,
    description text width=4cm
}
      \smartdiagramanimated[descriptive diagram]{
      {  title1,
      { \begin{eqnarray*}
            my equation
    \end{eqnarray*}}},
  {  { title2},
      { \begin{eqnarray*}
    my equation2
 \end{eqnarray*}}},
  {  {title3},
{\begin{eqnarray*}
 equation 3
  \end{eqnarray*}}}} 
 \end{center}
\end{frame}
2
  • 1
    can you show some code to go with you image?
    – user190633
    Jun 9, 2019 at 16:10
  • sorry, I thought it was a known example about the descriptive diagram, I've made update, please take a look
    – Hamza Hsn
    Jun 9, 2019 at 16:19

1 Answer 1

3

The description text width was too small for the equation. Because it was much smaller than the description text, it was no longer centred but overflowed on the right. Make it the same width:

\documentclass{beamer}

\usepackage{smartdiagram}

\begin{document}

  \begin{frame}
    \begin{center}
   \smartdiagramset{
   description title font = \scriptsize,
   descriptive items y sep =  2cm,
   description title text width=2cm,
   description title width= 2cm,
   description width=8cm,
    description text width=8cm
}
      \smartdiagramanimated[descriptive diagram]{
      {  title1,
      { \begin{align*}
            f(x) &= a + b + c + d + e + f + g + h + i + j\\
            f(x) &= a + b + c + d + e + f + g + h + i + j
    \end{align*}}},
  {  { title2},
      { \begin{align*}
    my equation2
 \end{align*}}},
  {  {title3},
{\begin{align*}
 equation 3
  \end{align*}}}} 
 \end{center}
\end{frame}

\end{document}

enter image description here

(I would not use eqnarray, something like align might be better)

1
  • Thank you for your solution but I already handled it with \hspace :) but I'll just give you my thanks for taking your time to help me
    – Hamza Hsn
    Jun 9, 2019 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .