# How to operate figures described by latex packages?

I am trying to write a go book using the latex package igo. here is the example given by the igo' User Manual:

I don't know how to operate the figure described by the igo statements, put it anywhere I want, for example, as in the manual, the figure are put on the right side of texts.I've tried the \begin{figure} statements, but it doesn't work.

\documentclass[12pt]{article}
\usepackage[top=1in,bottom=1in,left=1.25in,right=1.25in]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{igo}

\begin{document}
%  text
\begin{figure}[H]
\white{b4,c4,d4,e4,f4,g3,g2,c3}
\black{b3,b2,c2,d3,e3,f3,f2}
\shortstack{\showfullgoban\\White to kill}
\end{figure}
%  text
\end{document}


This is the result:

-
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Christian Hupfer Aug 11 '14 at 0:32
figure is a float environment. If you use it, you are telling TeX to move it to the 'best location'. If you want the diagram in a particular place, you do not want it to float so don't use a float environment. Note that you can always look at the source for the documentation of a package to see how something is done. – cfr Aug 11 '14 at 0:49

Perhaps what you are looking for is how to wrap a your text around your figure. This can be done with the wrapfigure environment (inspired by the LaTeX Wikibook)

\documentclass{report}

\usepackage{wrapfig}
\usepackage[demo]{graphicx}
\usepackage{kantlipsum} %To generate lipsum

\begin{document}

\kant %Lipsum

\begin{wrapfigure}{r}{0.5\textwidth}
\centering
\includegraphics[width=0.45\textwidth]{demo}
\end{wrapfigure}

\kant %Lipsum

\end{document}


This is the result:

You could also be interested in using the tabular environment, or as the other answer, the minipage.

-
Yes, the minipage and wrapfigure can satisfy all my needs, thanks! – user2857824 Aug 11 '14 at 2:18

Here is the relevant excerpt from the user manual:

Let's start with an exercise taken from a book by James Davies, \textit{Life and Death}\footnote{Elementary Go Series vol. 4, Kiseido Publishing Company, \copyright 1975, 1996}~:

\medskip
\begin{minipage}[c][1.0\height][c]{0.65\textwidth}
\begin{verbatim}
\white{b4,c4,d4,e4,f4,g3,g2,c3}
\black{b3,b2,c2,d3,e3,f3,f2}
\begin{center}
\shortstack{\showgoban\\White to kill}
\end{center}
\end{verbatim}
\end{minipage}
%
\begin{minipage}[c][1.0\height][r]{0.25\textwidth}
\white{b4,c4,d4,e4,f4,g3,g2,c3}
\black{b3,b2,c2,d3,e3,f3,f2}
\begin{center}
\shortstack{\showgoban\\White to kill}
\end{center}
\end{minipage}


Note that this code does not use the figure environment. figure is a float environment. If you use it, you are telling TeX to move it to the 'best location'. If you want the diagram in a particular place, you do not want it to float so don't use a float environment.

-
Great! thanks a lot! – user2857824 Aug 11 '14 at 1:03