2

I think the example below best illustrates the issue I'm having. The line only appears to be broken, when the new tikzpicture would completely fall outside of the available space. How can I make LaTeX automatically insert a line break after the second tikzpicture?

\documentclass{article}
\usepackage[a4paper,textwidth=19cm,verbose]{geometry}
\usepackage{tikz}

\setlength{\parindent}{0pt}

\newcommand{\rect}{ %
\begin{tikzpicture}[x=1cm,y=1cm]
  \useasboundingbox (0,0) rectangle (9,5.2);
  \draw (0,0) rectangle (9,5.2);
\end{tikzpicture}}

\begin{document}
  \rect
  \rect
  \rect
  \rect
\end{document}

This code results in the following document: An example showing the problem

1

1 Answer 1

3

The line breaking treats a tikzpicture just like a big letter, so you can use \raggedright here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .