[XeTeX] Strange tikz behaviour with xetex

Akira Kakuto kakuto at fuk.kindai.ac.jp
Tue Sep 29 06:00:36 CEST 2015


> 
> \documentclass{article}
> 
> \usepackage[cmyk]{xcolor}
> \usepackage{tikz}
> \usepackage{pgf}
> \usetikzlibrary{fadings}
> 
> \usepackage{pgfpages}
> \pgfpagesuselayout{resize to}[a4paper]
> 
> \begin{document}
> 
> \begin{tikzpicture}[remember picture,overlay]
>     \shade [top color=yellow,bottom color=red!50] (current page.north west) rectangle (current page.south east);%
> \end{tikzpicture}
> 
> \centerline{\Huge Hi Parsi\LaTeX{}}
> \end{document}
> 
> 
> It didn't produce the result of pdflatex! and it is so weird!

A similar output as that of pdflatex is obtained by xelatex
with the following for your special example.
Don't expect that it is applicable to other cases.

%
% xelatex
%
\documentclass{article}
\usepackage[cmyk]{xcolor}
%
%
\def\pdftexversion{140}
\def\pgfsysdriver{pgfsys-dvipdfm.def}
%
%
\usepackage{tikz}
\usepackage{pgf}
%
%
\makeatletter
\def\pgfsys at papersize#1#2{%
  \pdfpageheight#2\relax%
  \pdfpagewidth#1\relax}
\makeatother
%
%
\usetikzlibrary{fadings}

\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper]

\begin{document}

\begin{tikzpicture}[remember picture,overlay]
    \shade [top color=yellow,bottom color=red!50] (current page.north west) rectangle (current page.south east);%
\end{tikzpicture}

\centerline{\Huge Hi Parsi\LaTeX{}}
\end{document}

-- 
Best regards,
Akira KAKUTO


More information about the XeTeX mailing list