# I want to allow a picture (tikzpicture) to exceed bottom margin

I have a paragraph ending by the middle of the page. Then, I have a tikzpicture, which is just a bit too big to fit in the page. I want to allow it to stay there, even if it exceed the bottom margin.

Here is a (silly) example

\documentclass[a4paper]{article}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}

\lipsum[1-5]

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

\end{document}


In this example, the line jumps to the next page. I want the line to stay in the first page, even if it will exceed the margin.

This is what I get with this example:

This is what I want:

• Search for pgfinterruptboundingbox/\pgfresetboundingbox/remember picture,overlay. – Symbol 1 May 12 '17 at 19:09

In the following, I use the \raisebox command to (a) typeset the picture "to the bottom" (raise the content by -\height) and (b) specify it to have a height and depth of 0.

    \documentclass[a4paper]{article}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}

\lipsum[1-5]

\raisebox{-\height}[0pt][0pt]{%
\begin{tikzpicture}
\draw (0,0) -- (0,2);
\end{tikzpicture}
}
\end{document}


For an environment version, check out the adjustbox package, which provides all kinds of box manipulations.

As a last resort:

\documentclass[a4paper]{article}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}

\lipsum[1-5]
\enlargethispage{0.009cm}

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

\end{document}