How can I adjust this tikzpicture to my a4 page? I write this after my paragraph. But it goes to before my title, to the top of my page.
\documentclass{ltxdoc}
\usepackage[demo]{tikzpeople}
\usepackage[OT1]{fontenc}
\usepackage{hyperref}
\usepackage{microtype}
\usepackage{xspace}
\usepackage[most]{tcolorbox}
\usepackage[title]{appendix}
\usetikzlibrary{shapes.callouts}
\begin{document}
\section{Commintment}
//explanation some
\begin{figure}
\begin{tikzpicture}[font=\small]
\node[alice,minimum size=1.5cm] (A) {};
\node[bob,right=3cm of A,minimum size=1.5cm,mirrored] (B) {};
\node[anchor=north east] at (A.north west) (a2) {$(\mathsf{com},\mathsf{dec}) \gets \mathsf{Com}(a)$};
\node[anchor=south] at (a2.north) (a1) {$a\gets\{0,1\}$};
\node[anchor=south west] at (B.south east){$a \gets \mathsf{Opn}(\mathsf{com},\mathsf{dec})$};
\draw (A.35) edge[->] node[above] {$\mathsf{com}$} (B.145);
\node[anchor=south west] at (B.east |- B.180) {$b\gets\{0,1\}$};
\draw (A.0) edge[<-] node[above] {$b$} (B.180);
\draw (A.325) edge[->] node[above] {$\mathsf{dec}$} (B.215);
\draw (A.270) ++(0,-.5) node {$a\oplus b$} edge[<-] (A.270);
\draw (B.270) ++(0,-.5) node {$a\oplus b$} edge[<-] (B.270);
\end{tikzpicture}
\caption{A secure coin flipping protocol constructed from bit commitment.}
\label{fig:protocolexample}
\end{figure}
\end{document}
\documentclassand ends with\end{document}. Those trying to help you will need this information. – Nov 29 '17 at 01:58\maketitle. – cfr Nov 29 '17 at 02:18\begin{figure}[t!]...\end{figure}, then obviously the figure will be at the top of the page. – Ilbant Nov 29 '17 at 10:09\begin{figure}[htbp]– samcarter_is_at_topanswers.xyz Nov 29 '17 at 14:58