TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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'm trying to export some full-page SVG images via inkscape2tikz, and then trying to include these tikz-code images in a Latex document; but there seems to be a slight problem with xelatex.

After checking

... I came up with the following MWE:






\begin{tikzpicture}[overlay,remember picture,anchor=north west,inner sep=0pt, outer sep=0pt]

\node at (current page.north west) {%

  \begin{tikzpicture}[overlay,remember picture,y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt,anchor=north west]

    \begin{scope}[shift={(0,0.34461553)}]% layer1

      % rect3016
      \path[color=black,fill=cff0000,line width=0.800pt,rounded corners=0.0000cm]
        (0.0000,-0.3446) rectangle (524.4094,743.7499);






Now, if I build this with pdflatex:

  • after first build, the rectangle is positioned wrong - but
  • after second build, the rectangle is correctly positioned

But, if I build with xelatex:

  • after first build, the rectangle is positioned way out
  • after second build, the rectangle is positioned differently, but still wrong.

Here is what xelatex produces after multiple runs (kinda hard to see here, but download the image to see the positioning of the red rectangle vs. the white background):

xelatex rectangle fail

Obviously, I'd like to have the red rectangle centered on page (or aligned at top left corner, doesn't matter) - so that the red rectangle takes up most of the page.

Any ideas on how to do that?

Many thanks in advance for any answers,

share|improve this question
@sdaay Just \usepackage{hyperref}. – Yiannis Lazarides May 11 '12 at 11:03
Thanks for that, @YiannisLazarides - hyperref works great as well! Cheers! – sdaau May 11 '12 at 11:09
Another option would be to use \documentclass[tikz=true]{standalone} to create a pdf from your svg and then include the pdf with \includegraphics{} in your article – matth May 11 '12 at 11:16
Thanks for that, @matth - that sounds good; however, I wanted to avoid also having .pdf in addition to the tikz code (and having to then scale and align the .pdf's to entire page).. Cheers! – sdaau May 11 '12 at 11:29
up vote 4 down vote accepted

Add \usepackage[pass]{geometry} to your preamble: this will pass the drivers the correct page size.

share|improve this answer
Many thanks for that, @egreg - works great! Cheers! – sdaau May 11 '12 at 11:08

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.