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,

  • 1
    @sdaay Just \usepackage{hyperref}. May 11, 2012 at 11:03
  • Thanks for that, @YiannisLazarides - hyperref works great as well! Cheers!
    – sdaau
    May 11, 2012 at 11:09
  • 1
    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, 2012 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, 2012 at 11:29

1 Answer 1


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

  • Many thanks for that, @egreg - works great! Cheers!
    – sdaau
    May 11, 2012 at 11:08

You must log in to answer this question.

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