Today I discovered the existence of this wonderful package called "standalone". I really love it because I have a lot of pictures in Tikz code and some of them have a very long code and it's very difficult to handle and annoying when I'm trying to concentrate on the text rather than on pictures. So here is my problem, I have some small pictures that I want to align in the same row (sometimes 2, 3 or 4 of them in the same row). Let's suppose that I have these stand alone pictures:
Picture1.tex:
\documentclass{standalone}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [domain=0.08:3.92] plot(\x,{(--1.04--0.32*\x)/1.96});
\draw (3.6,0.98) node[anchor=north west] {$l_a$};
\end{tikzpicture}
\end{document}
Picture2.tex:
\documentclass{standalone}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [domain=0.08:3.92] plot(\x,{(--1.04--0.32*\x)/1.96});
\draw (3.6,0.98) node[anchor=north west] {$l_b$};
\end{tikzpicture}
\end{document}
Within the body of my main Tex file:
%...
impute(Picture1.tex)
impute(Picture2.tex)
%
I want my pictures look like this:
Also I wanted that my pictures have a general description below them. My first try was by using "figure" environment (\begin{figure}…/end{figure}) but the pictures are put in a different position rather than just after a given line of text, I don't want that the picture appears anywhere else like at the top of the page or something. Thank you so much for your help and so sorry if my question is so naive but I'm just starting to learn these things.
Best Answer
As said by Chris in comments, you can use
minipage
s. To have caption and not to allow floating, you can avoidfigure
environment and use\captionof
macro from eithercaption
orcapt-of
packages.Or you can use
subfigure
fromsubcaption
package. In this case you will needfloat
package that provides[H]
position specifier.The same can be achieved with
subfig
package also. This is left as an exercise.