# LaTeX formatting with Tikz

I am pretty new to Tikz. I am wondering how one would go about separating their text from a diagram. For example, if I were to write a short geometric proof, and I have a diagram and an explanation, how do I seperate the two? How can I neatly format my diagram below my text? Is there any specific command? (I am using LaTeX by the way).

This is what I have thus far:

\documentclass{article}
\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{geometry}
\geometry{a4paper}
\usepackage[frenchb]{babel}
\usepackage{mathptmx}
\usepackage{tikz}

\title{Homework problem set 3} \author{Marcus} \date{}

\begin{document} \maketitle

\paragraph*{1}
\large

With this figure, we can see that it is represented in the 2 dimensional euclidean plane; therefore, the group of proper rotations, $G \cong C_2$. Furthermore, based on the symmetries of this figure, we can see that the set of all proper are the only rotations; hence, the group is $C_2$\\

\begin{tikzpicture}
\draw (0,0) -- (1,0) -- (1,1) -- (2,1);
\end{tikzpicture}

\end{document}

• Some text here. \begin{figure} your figure code here\caption{Foo}\end{figure}? – Sigur Jul 22 '19 at 22:47
• I have tried this, but the text is placed too close to the diagram. I am looking for a way to expand the space between my text and diagram. – Marcus Jul 22 '19 at 22:50

(to long for comment) Considering @Sigur comment, using 12pt font size and after removed command large in document body gives expected nice lookout of your document:

\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{a4paper}
\usepackage[frenchb]{babel}
\usepackage{mathptmx}
\usepackage{tikz}

\title{Homework problem set 3}
\author{Marcus}
\date{}

\begin{document}
\maketitle

\paragraph*{1}
With this figure, we can see that it is represented in the 2 dimensional euclidean plane; therefore, the group of proper rotations, $G \cong C_2$. Furthermore, based on the symmetries of this figure, we can see that the set of all proper are the only rotations; hence, the group is $C_2$.

\begin{figure}[htb]
\centering
\begin{tikzpicture}
\draw (0,0) -- (1,0) -- (1,1) -- (2,1);
\end{tikzpicture}
\caption{My figure}
\label{fig:myfig}
\end{figure}
\end{document}

• I noticed that you used \centering and [htb] after \begin{figure}. The \centering part is pretty self explanatory, but what is the use for [htb]? – Marcus Jul 22 '19 at 23:47
• @Marcus, [htb] are options for positioning of float figure (here, top, bottom). With them figure is positioned in a text, where is inserted, if there is enough space, if it is not, it is moved to the top of the next page. for more explanation see tex.stackexchange.com/questions/39017/… – Zarko Jul 23 '19 at 3:22