Take the 2-minute tour ×
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.
Package pgf Warning: Your graphic driver pgfsys-xetex.def does not support patterns. 

.tex:

\documentclass[10pt]{article}‎
‎%\usepackage{pgfplots}‎‎
\usepackage{‎tikz‎‎}‎‎
\usetikzlibrary{arrows,backgrounds,positioning,fit,‎petri}‎
\usetikzlibrary{decorations.shapes}‎‎‎
‎‎\usetikzlibrary{patterns} % LATEX and plain TEX when using Tik Z\usetikzlibrary[‎patterns]‎‎‎
‎\begin{document}‎
\begin{tikzpicture}
\draw[pattern color=red,pattern=fivepointed stars] (0,0) circle (1cm);
\draw[pattern color=blue,pattern=fivepointed stars] (0,0) rectangle (3,1);
\end{‎tikzpicture}‎
\begin{tikzpicture}
\def\mypath{(0,0) -- +(0,1) arc (180:0:1.5cm) -- +(0,-1)}
\fill [red] \mypath;
\pattern[pattern color=white,pattern=bricks] \mypath;
\end{‎tikzpicture}‎‎
‎‎‎‎‎‎\end{document}

Log

   This is XeTeX, Version 3.1415926-2.2-0.9997.4 (Web2C 2010) (format=xelatex 2011.3.23) 24 MAR 2011 13:41
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**tikz-patterns.tex
(./tikz-patterns.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,
icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,
lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol
ish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spani
sh, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.
(c:/texlive/2010/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(c:/texlive/2010/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(c:/texlive/2010/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
(c:/texlive/2010/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(c:/texlive/2010/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
\pgfutil@everybye=\toks14
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
\pgfutil@abb=\box26
(c:/texlive/2010/texmf-dist/tex/latex/ms/everyshi.sty
Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
))
Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
(c:/texlive/2010/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(c:/texlive/2010/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
(c:/texlive/2010/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks15
)
(c:/texlive/2010/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
(c:/texlive/2010/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(c:/texlive/2010/texmf-dist/tex/latex/latexconfig/graphics.cfg
File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
)
Package graphics Info: Driver file: xetex.def on input line 91.
(c:/texlive/2010/texmf-dist/tex/xelatex/xetex-def/xetex.def
File: xetex.def 2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(c:/texlive/2010/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks16
\pgfkeys@temptoks=\toks17
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
\pgfkeys@tmptoks=\toks18
))
\pgf@x=\dimen105
\pgf@y=\dimen106
\pgf@xa=\dimen107
\pgf@ya=\dimen108
\pgf@xb=\dimen109
\pgf@yb=\dimen110
\pgf@xc=\dimen111
\pgf@yc=\dimen112
\w@pgf@writea=\write3
\r@pgf@reada=\read1
\c@pgf@counta=\count88
\c@pgf@countb=\count89
\c@pgf@countc=\count90
\c@pgf@countd=\count91
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
File: pgf.cfg 2008/05/14 (rcs-revision 1.7)
)
Package pgfsys Info: Driver file for pgf: pgfsys-xetex.def on input line 900.
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
File: pgfsys-xetex.def 2010/02/16 (rcs-revision 1.3)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
File: pgfsys-common-pdf.def 2008/05/19 (rcs-revision 1.10)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-d
vi.def
File: pgfsys-common-pdf-via-dvi.def 2008/05/19 (rcs-revision 1.7)
)))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
File: pgfsyssoftpath.code.tex 2008/07/18 (rcs-revision 1.7)
\pgfsyssoftpath@smallbuffer@items=\count92
\pgfsyssoftpath@bigbuffer@items=\count93
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
File: pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
)) (c:/texlive/2010/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
(c:/texlive/2010/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package xcolor Info: Driver file: xetex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
\pgfmath@dimen=\dimen113
\pgfmath@count=\count94
\pgfmath@box=\box27
\pgfmath@toks=\toks19
\pgfmath@stack@operand=\toks20
\pgfmath@stack@operation=\toks21
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.te
x)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric
.code.tex)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.t
ex)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.co
de.tex)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.te
x)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex
))) (c:/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
\c@pgfmathroundto@lastzeros=\count95
))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
File: pgfcorepoints.code.tex 2010/04/09 (rcs-revision 1.20)
\pgf@picminx=\dimen114
\pgf@picmaxx=\dimen115
\pgf@picminy=\dimen116
\pgf@picmaxy=\dimen117
\pgf@pathminx=\dimen118
\pgf@pathmaxx=\dimen119
\pgf@pathminy=\dimen120
\pgf@pathmaxy=\dimen121
\pgf@xx=\dimen122
\pgf@xy=\dimen123
\pgf@yx=\dimen124
\pgf@yy=\dimen125
\pgf@zx=\dimen126
\pgf@zy=\dimen127
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.cod
e.tex
File: pgfcorepathconstruct.code.tex 2010/08/03 (rcs-revision 1.24)
\pgf@path@lastx=\dimen128
\pgf@path@lasty=\dimen129
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.te
x
File: pgfcorepathusage.code.tex 2008/04/22 (rcs-revision 1.12)
\pgf@shorten@end@additional=\dimen130
\pgf@shorten@start@additional=\dimen131
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
File: pgfcorescopes.code.tex 2010/09/08 (rcs-revision 1.34)
\pgfpic=\box28
\pgf@hbox=\box29
\pgf@layerbox@main=\box30
\pgf@picture@serial@count=\count96
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code
.tex
File: pgfcoregraphicstate.code.tex 2008/04/22 (rcs-revision 1.9)
\pgflinewidth=\dimen132
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.c
ode.tex
File: pgfcoretransformations.code.tex 2009/06/10 (rcs-revision 1.11)
\pgf@pt@x=\dimen133
\pgf@pt@y=\dimen134
\pgf@pt@temp=\dimen135
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
File: pgfcorequick.code.tex 2008/10/09 (rcs-revision 1.3)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
File: pgfcoreobjects.code.tex 2006/10/11 (rcs-revision 1.2)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.co
de.tex
File: pgfcorepathprocessing.code.tex 2008/10/09 (rcs-revision 1.8)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
File: pgfcorearrows.code.tex 2008/04/23 (rcs-revision 1.11)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
File: pgfcoreshade.code.tex 2008/11/23 (rcs-revision 1.13)
\pgf@max=\dimen136
\pgf@sys@shading@range@num=\count97
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
File: pgfcoreimage.code.tex 2010/03/25 (rcs-revision 1.16)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
File: pgfcoreexternal.code.tex 2010/09/01 (rcs-revision 1.17)
\pgfexternal@startupbox=\box31
))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
File: pgfcorelayers.code.tex 2010/08/27 (rcs-revision 1.2)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code
.tex
File: pgfcoretransparency.code.tex 2008/01/17 (rcs-revision 1.2)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
File: pgfcorepatterns.code.tex 2009/07/02 (rcs-revision 1.3)
)))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
File: pgfmoduleshapes.code.tex 2010/09/09 (rcs-revision 1.13)
\pgfnodeparttextbox=\box32
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
File: pgfmoduleplot.code.tex 2010/10/22 (rcs-revision 1.8)
)
(c:/texlive/2010/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.st
y
Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
\pgf@nodesepstart=\dimen137
\pgf@nodesepend=\dimen138
)
(c:/texlive/2010/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.st
y
Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
)) (c:/texlive/2010/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(c:/texlive/2010/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
\pgffor@iter=\dimen139
\pgffor@skip=\dimen140
\pgffor@stack=\toks22
\pgffor@toks=\toks23
))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.co
de.tex
File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
\pgf@plot@mark@count=\count98
\pgfplotmarksize=\dimen141
)
\tikz@lastx=\dimen142
\tikz@lasty=\dimen143
\tikz@lastxsaved=\dimen144
\tikz@lastysaved=\dimen145
\tikzleveldistance=\dimen146
\tikzsiblingdistance=\dimen147
\tikz@figbox=\box33
\tikz@tempbox=\box34
\tikztreelevel=\count99
\tikznumberofchildren=\count100
\tikznumberofcurrentchild=\count101
\tikz@fig@count=\count102
(c:/texlive/2010/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
File: pgfmodulematrix.code.tex 2010/08/24 (rcs-revision 1.4)
\pgfmatrixcurrentrow=\count103
\pgfmatrixcurrentcolumn=\count104
\pgf@matrix@numberofcolumns=\count105
)
\tikz@expandcount=\count106
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarytopaths.code.tex
File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
)))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
braryarrows.code.tex
File: tikzlibraryarrows.code.tex 2008/01/09 v2.10 (rcs-revision 1.1)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex
File: pgflibraryarrows.code.tex 2008/10/27 v2.10 (rcs-revision 1.9)
\arrowsize=\dimen148
))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarybackgrounds.code.tex
File: tikzlibrarybackgrounds.code.tex 2010/02/08 v2.10 (rcs-revision 1.2)
\pgf@layerbox@background=\box35
\pgf@layerboxsaved@background=\box36
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarypositioning.code.tex
File: tikzlibrarypositioning.code.tex 2008/10/06 v2.10 (rcs-revision 1.7)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
braryfit.code.tex
File: tikzlibraryfit.code.tex 2008/06/21 v2.10 (rcs-revision 1.3)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarypetri.code.tex
File: tikzlibrarypetri.code.tex 2008/06/18 v2.10 (rcs-revision 1.2)
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarydecorations.shapes.code.tex
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarydecorations.code.tex
(c:/texlive/2010/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.t
ex
\pgfdecoratedcompleteddistance=\dimen149
\pgfdecoratedremainingdistance=\dimen150
\pgfdecoratedinputsegmentcompleteddistance=\dimen151
\pgfdecoratedinputsegmentremainingdistance=\dimen152
\pgf@decorate@distancetomove=\dimen153
\pgf@decorate@repeatstate=\count107
\pgfdecorationsegmentamplitude=\dimen154
\pgfdecorationsegmentlength=\dimen155
)
\tikz@lib@dec@box=\box37
)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydec
orations.shapes.code.tex))
(c:/texlive/2010/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzli
brarypatterns.code.tex
File: tikzlibrarypatterns.code.tex 2008/01/15 v2.10 (rcs-revision 1.2)
(c:/texlive/2010/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.t
ex
File: pgflibrarypatterns.code.tex 2008/03/03 v2.10 (rcs-revision 1.13)
)) (./tikz-patterns.aux)
\openout1 = `tikz-patterns.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
ABD: EveryShipout initializing macros
Package pgf Warning: Your graphic driver pgfsys-xetex.def does not support patt
erns. This warning is given only once on input line 9.
[1
] (./tikz-patterns.aux) )
Here is how much of TeX's memory you used:
9748 strings out of 494522
202180 string characters out of 3159442
235815 words of memory out of 3000000
12838 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
670 hyphenation exceptions out of 8191
56i,5n,57p,460b,357s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on tikz-patterns.pdf (1 page).
share|improve this question
    
Welcome to tex.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). Also please do not simply post you warning, code and log without any question text. Try to only post the relevant pieces to make the question more readable. –  Martin Scharrer Mar 24 '11 at 10:11
    
And mention in the text that you are using XeLaTeX. Thanks. –  Martin Scharrer Mar 24 '11 at 10:12
    
pgf with dvipdfmx supports patterns. And XeTeX uses xdvipdfmx, which is based on dvipdfmx. In fact, pgfsys-xetex.def is quite simple. I guess it is possible to modify pgfsys-xetex.def to support patterns, but not yet implemented. –  Leo Liu Mar 24 '11 at 11:54
1  
well, the code of xdvipdfmx seems not up-to-date to support \special{pdf:stream ...} and some other new features of dvipdfmx. –  Leo Liu Mar 24 '11 at 12:19
    
Is there any update available for this problem? I would like to use a special font (hence using XeLaTeX) inside the TikZ picture. –  Ronny Feb 14 '13 at 19:49
add comment

1 Answer 1

up vote 3 down vote accepted

You are using XeLaTeX which seems not to support patterns in TikZ. It works well when the font macros are removed and the document is compiled with pdflatex.

My tip: Compile the TikZ picture as a standalone file using pdfLaTeX (e.g. using the standalone class) and include it as a PDF image into the main document which can be compiled using XeLaTeX. This should work as long you don't have anything XeTeX specific (like special fonts) in the TikZ picture. If you need that and patterns in the same picture you might be just out of luck.


You can use the standalone class to compile the TikZ Picture to a tight PDF suitable to be included to your document:

% tikzpic.tex  -- compile with pdflatex which supports patterns
\documentclass{standalone}
%\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds,positioning,fit,petri}
\usetikzlibrary{decorations.shapes}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\draw[pattern color=red,pattern=fivepointed stars] (0,0) circle (1cm);
\draw[pattern color=blue,pattern=fivepointed stars] (0,0) rectangle (3,1);
\end{tikzpicture}
\begin{tikzpicture}
\def\mypath{(0,0) -- +(0,1) arc (180:0:1.5cm) -- +(0,-1)}
\fill [red] \mypath;
\pattern[pattern color=white,pattern=bricks] \mypath;
\end{tikzpicture}
\end{document}

The main file can be compiled with XeLaTeX to allow the Persian font you are using:

\documentclass[10pt]{article}
\usepackage{graphics}
\usepackage{xepersian}
\settextfont[Scale=1.1]{XB Zar}
\setdigitfont{Yas}
\begin{document}

Text including Persian language ...

% include picture
\includegraphics{tikzpic}

\end{document}
share|improve this answer
    
thanks , plz have you sample ? –  mehdi jalali Mar 24 '11 at 10:34
    
thanks , I'm : Compile the TikZ picture as a standalone file using pdfLaTeX and build pdf but what are you doing? "include it as a PDF image into the main document which can be compiled using XeLaTeX" plz, have you sample code? –  mehdi jalali Mar 24 '11 at 10:39
    
thanks martin, i need a picture that include Persian text, when i used Xelatex i can't apply Persian text in my picture.please guide me how can i add xepersian to a main document as picture. –  mehdi jalali Mar 24 '11 at 14:29
    
@mehdi jalali: Are your sure you need the patterns? The simplest thing would be to avoid them. One other idea would be two overlay two pictures. One compiled using pdflatex and included as image and the other one in xelatex. –  Martin Scharrer Mar 24 '11 at 14:45
1  
@mehdi: It is simply not possible with the current version of TikZ to use xepersian (and hence XeLaTeX) and patterns at the same time. The only thing you can do is to create the picture without the text as a separate pdf (with standalone) and then include it as in tex.stackexchange.com/questions/9559/… and add the text to it. –  Caramdir Mar 24 '11 at 17:37
show 1 more comment

Your Answer

 
discard

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.