TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to print an A4 page on B4 stock, with crop marks and bleeding square grid. I use memoir for crop marks, and background with TikZ for the grid. I would like the (0,0) in TikZ be placed at the bottom left corner: ideally of the cropped area (as I don't know how to do that, the example has it at the corner of the stock page).

I am having troubles positioning the grid relative to the where I need using the \SetBgAnchor command. The background documentation says that a typical use would be \SetBgAnchor{north east}, but that gives me

! Package pgfkeys Error: I do not know the key '/tikz/north east' and I am going to ignore it. Perhaps you misspelled it.

The code looks like this:

% a4 paper centerd on b4


% corner left bottom, span the grid over the page
% I will need about 3mm of bleed, but that's easy once bg is positioned
\SetBgContents{\tikz{\draw[step=5mm] (28mm,20mm) grid (225mm,315mm);}}
\SetBgPosition{current page.south west}
\SetBgAnchor{}  % should be {south west}


    Some text

Compiled code above

Questions are therefore:

  1. How to fix my code so that the grid is positions properly?
  2. Is there a way to have to TikZ coordinates start at the bottom left corner of the cropped page rather than stock page?
share|improve this question
Yes; it's a bug in background; I will correct it as soon as I can; I will give you a workarond shortly. – Gonzalo Medina Mar 13 '12 at 15:24
up vote 7 down vote accepted

It is a bug in the background package (thanks for detecting it). As a workaround while I upload a new version of the package, you can pass all your options directly to \bg@material, as the following example shows (I wasn't sure about the desired grid position):



\begin{tikzpicture}[remember picture,overlay]
\node [rotate=0,scale=1,opacity=0.6,color=blue!30,xshift=28mm,yshift=20mm]
at (current page.south west)  [anchor=south west]{\tikz{\draw[step=5mm] (28mm,20mm) grid (225mm,315mm);}};


Some text

Which results in:

enter image description here

share|improve this answer
Thanks. For question 2, is there no way? I can live without that, but it would be convenient. – eudoxos Mar 13 '12 at 16:40
@eudoxos: if I understand your question correctly, you can use \pgfsys@transformshift{x displacement}{y displacement} inside the tikzpicture environment: for example, \makeatletter \pgfsys@transformshift{30pt}{-100pt} \makeatother – Gonzalo Medina Mar 13 '12 at 18:07
I was thinking that background/TikZ perhaps pre-defines a rectangle for the "text area" of the page I could refer to (text area.south west). It probably does not, that is fine as well. Thanks. – eudoxos Mar 13 '12 at 18:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.