2

I use geometry package for preparing a book with bleeds. This book would contain a simple graphics done by tikz.

Firstly, a space above my tikz picture has been observed (in overlay mode), although the position is set to (0mm,0mm). Of couse, I know about a space above tikz picture in this mode, but how to eliminate it?

Secondly, I want to use specific commands, like \textwidth etc., so I am looking for a simple solution. Existing replies on stackexchange.com have not worked in my case.

\begin{tikzpicture}[remember picture,overlay]
\node[shape=rectangle, fill=blue, minimum height=40mm, opacity=0.2, minimum width=\textwidth, anchor=north  west] at (0mm,0mm) {};
\end{tikzpicture}

Thanks!

Screenshot

0

1 Answer 1

5

That's the \topskip: The base of the first line is always a bit below the top of the text body. You need to move your picture up:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\begin{document}
\noindent
\begin{tikzpicture}[overlay]
\node[shape=rectangle, fill=blue, minimum height=40mm, opacity=0.2, minimum width=\textwidth, anchor=north  west] at (0mm,\topskip) {};
\end{tikzpicture}


\end{document}

enter image description here

0

You must log in to answer this question.

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