1
\documentclass[a4paper, 12pt]{article}

\usepackage{amsfonts}

\usepackage{tikz}
\usepackage{amsmath}
\newtheorem{theorem}{Theorem}
\newtheorem{example}[theorem]{Example}
\begin{document}
\begin{example}
\begin{figure}[hbt!]
\begin{center}
\begin{tikzpicture}[scale=0.40,
       thick,
       acteur/.style={
         circle,
         fill=blue,
         thick,
         inner sep=2pt,
         minimum size=0.cm,scale=0.65
       }
     ] 




           \node (a1) at (0,0) [acteur,label=below:\scriptsize{1}]{}; 


           \node (a6) at (1.5,0) [acteur,label=below:\scriptsize{6}]{};
           \node (a7) at (3,1) [acteur,label=above:\scriptsize{7}]{};
           \node (a8) at (4.5,2) [acteur,label=right:\scriptsize{8}]{};
           \node (a9) at (3,-1) [acteur,label=below:\scriptsize{9}]{};
           \node (a10) at (4.5,-2) [acteur,label=right:\scriptsize{10}]{};

           \node (a2) at (-1.5,1) [acteur,label=above:\scriptsize{2}]{};
           \node (a3) at (-3,2) [acteur,label=left:\scriptsize{3}]{};
           \node (a4) at (-1.5,-1) [acteur,label=below:\scriptsize{4}]{};
           \node (a5) at (-3,-2) [acteur,label=left:\scriptsize{5}]{};
           \node at (-5.5,3) {\textit{$T$}};
            \draw  (a1) -- (a6);
            \draw  (a6) -- (a7);
            \draw  (a7) -- (a8);
            \draw  (a6) -- (a9);
            \draw  (a9) -- (a10);
            \draw  (a1) -- (a2);
            \draw  (a2) -- (a3);
            \draw  (a1) -- (a4);
            \draw  (a4) -- (a5);

\end{tikzpicture}
\caption{ A tree having property $\mathcal{R_E}$}\label{fig2}
\end{center}
\end{figure}
\end{example}
\end{document}


How I can place the example1 in above in left corner?

  • 1
    Could you please mak your code compilable. How is the example environment defined? – leandriis Jun 9 at 15:42
  • Now it will execute correctly – J.Doe Jun 9 at 16:32
  • Use \quad after \begin{example}. – ferahfeza Jun 9 at 16:41
1

You can use \quad after \begin{example} like:

\begin{example}
\quad
\begin{figure}[hbt!]

or ~ after \begin{example} like:

\begin{example}~
\begin{figure}[hbt!]

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.