# Draw small cross at the center of the page

I want to draw a small cross at the horizontal and vertical center of my page. (at this position I want to glue in a CD). Should I create an image with a cross and center it or draw it directly with latex?

-
Cna you share with us your file to sse how you do ? – projetmbc Oct 28 '11 at 10:12
I just exactly the version from wh1t3 – strauberry Oct 28 '11 at 14:49

The easiest way I know of is using Tikz. You can use the current page node and its center anchor like this:

\documentclass{article}
\usepackage{tikz}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[overlay, remember picture]
\node at (current page.center) {$\times$};
\end{tikzpicture}
\end{document}


This will draw a small cross at the center of the page. You need to run it twice to get the correct location. The result looks like this:

Update As per @Dror's request some additional information on why the remember picture and overlay specification are required. This is specified in sections 75.3.2 and 75.4 of the manual. The gist of it is, the current page node resides in a virtual remembered picure. So when we use it in our picture, we are really referencing a node in a different picture. Therefore Tikz can't manage anymore with only the relative positions used within a picture, it also needs to know the relative position of the current picture and the virtual picture the current page node is in. Now because the absolute position on the page only becomes known after compiling the document, these positions have to be remembered. They are written to the aux file when we use the overlay and remember picture options. Why the overlay? The manual doesn't specify as far as I know, but I presume it's because if we don't use overlay two pictures could keep influencing each other on sequential passes (if they reference anchors inside each other). These remembered abolute positions then allow for references to nodes in different pictures on the next pass.

-
Very cool, thank you :-) – strauberry Oct 28 '11 at 7:48
@wh1t3: Can you add an explanation why did you used the overlay, remember picture options? – Dror Oct 28 '11 at 9:02
@Dror, I've added a 'short' explanation. Let me know if this answers your question. – Roelof Spijker Oct 28 '11 at 9:16
Option overlay produces a zero-width-zero-height box from tikzpicture environment. That is, it is overlaid over the page content. – AlexG Oct 28 '11 at 10:22
Yes, the manual does specify what the overlay option is for and what it does. It does not, however, explain why it is needed if we want to reference a node from a different picture. At least, to the best of my knowledge. So I can only guess, which is what I have done. – Roelof Spijker Oct 28 '11 at 11:34
\documentclass{article}
\usepackage{eso-pic}

\pagestyle{empty}

\begin{document}
\null\AddToShipoutPicture*{\AtPageCenter{$\times$}}
\end{document}

-
Is eso-pic package installed within a very basic MikTeX or TeX Live distro? – Sigur May 27 at 14:57