In my document I have several tikz pictures (in different sizes) with explanation next to the tikz picture. To put some text at the side of the picture I use a \parbox{}
.
My document looks like this
There are two things I don't know how to fix
- [see RED LINE:] I want some space between the picture and the text (let's say 1cm)
- [see RED BOX:] I want that the text goes until the end of the line (the parbox should have a relative size, e.g. parboxwidth = \textwidth - picture width - space between picture and text)
MWE
\documentclass[parskip=full]{scrartcl}
\usepackage{blindtext}
\usepackage{tikz}
\begin{document}
\Blindtext[1]
\begin{tikzpicture}[scale=\linewidth/20cm,baseline=(current bounding box.north)]
\draw[step=1,help lines,black!20] (-4.95,-3.45) grid (4.95,3.45);
\draw[thick] (-2.5,0) ellipse [x radius=2.25, y radius=3.4];
\draw[thick] (2.5,0) ellipse [x radius=2.25, y radius=3.4];
\end{tikzpicture}
\parbox[t]{0.45\textwidth}{\vskip0pt
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
}
\Blindtext[1]
\begin{tikzpicture}[scale=\linewidth/30cm,baseline=(current bounding box.north)]
\draw[step=1,help lines,black!20] (-4.95,-3.45) grid (4.95,3.45);
\draw[thick] (-2.5,0) ellipse [x radius=2.25, y radius=3.4];
\draw[thick] (2.5,0) ellipse [x radius=2.25, y radius=3.4];
\end{tikzpicture}
\parbox[t]{0.45\textwidth}{\vskip0pt
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
}
\end{document}