2

I am trying to get tikz to work with auto-pst-pdf, but the hatched rectangle I am drawing is generated correctly only if I remove the package auto-pst-pdf from the preamble. I really need these two to work since I am using this package in the main code with psfrag.

Here is a minimum working example:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{tikzpicture}
\draw[pattern=north west lines, pattern color=blue] (0,0) rectangle (2,4);
\end{tikzpicture}

\end{document} 

If I use auto-pst-pdf, the output is just a rectangle filled completely with black color. If I remove the package, the output is as expected.

I must mention that lines, circles, etc are working ok with both packages loaded.

6
  • Isn't auto-pst-pdf cone to work with pstricks and friends?
    – Bernard
    Jun 29, 2017 at 10:39
  • Here, your MWE works fine with pdflatex --shell-escape myFile.tex. What distribution are you running ?
    – marsupilam
    Jun 29, 2017 at 10:42
  • can you check in another viewer ? And you should really consider not using psfrag.Don't tell David Carlisle I said this
    – percusse
    Jun 29, 2017 at 10:57
  • I use MiKTeX-pdfTeX 2.9.4902 (1.40.14) (MiKTeX 2.9 64-bit). I enabled --shell-escape under Execution Modes -> pdfLaTeX -> Switches. @percusse: what should I use if I want to replace eps text with latex text?
    – Andrei
    Jun 29, 2017 at 11:16
  • @marsupilam I ran your code in cmd, and also get wrong result
    – Andrei
    Jun 29, 2017 at 11:19

1 Answer 1

1

With an up-to-date TL2017 there is no problem, with or without auto-pst-pdf (xelatex and pdflatex)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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