2

I was trying to achieve this but unable so any help appreciated thanks. enter image description here

This is the code I tried:

\begin{figure}[h]

\renewcommand{\arraystretch}{1.5}

\centering

\scalebox{.8}

{
    \begin{tabular}{>{\center}p{10cm}}

                \framebox[10cm]{Some text here} \\
                \framebox[10cm]{\{Some text here\}} \\
                \framebox[10cm]{Some text here} \\
                \framebox[10cm]{Some text here} \\
                \framebox[10cm]{Some text here} \\
                %\framebox[8cm]{\colorbox{BlueGreen}{Some text here}} \\
                %\colorbox{BurntOrange}{Some text here} \\

    \end{tabular}
}
\caption{User registration phase of proposed scheme}
\label{fig:User registration phase}
\end{figure}

1 Answers1

5

With the help of the tcolorbox package:

enter image description here

\documentclass{article}
\usepackage[dvipsnames]{xcolor}

\usepackage{tcolorbox}
\newtcolorbox{mybox}[2]{
    arc=0pt,
    boxrule=#2pt,
    colback=#1,
    width=10cm,
    halign=center,
}

\begin{document}

\begin{figure}
\centering
  \begin{mybox}{green}{0}
     Some text
  \end{mybox}
  \begin{mybox}{white}{1}
     some text
  \end{mybox}
  \begin{mybox}{yellow}{0}
     some text
  \end{mybox}
  \begin{mybox}{white}{1}
     some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
  \end{mybox}
\caption{User registration phase of proposed scheme}
\label{fig:User registration phase}
\end{figure}

\end{document}
leandriis
  • 62,593