Natan wrote:Would you elaborate a little on what I need to change and why?
Originally, LaTeX produces a .dvi file. This can be converted to Postscript, a .ps file. This can be converted to a .pdf file. That was the way for quite some time to get a PDF file. (dvi -> ps -> pdf). LaTex editors often have a compiler option that runs all of this by one click.
In contrast, pdfLaTeX produces .pdf output directly.
And XeLaTeX, that you used, produces .dvi and another tool (
dvipdfmx
) produces the .pdf file.
Different kind of engines (also LuaLaTeX) have been developed over time, hopefully not too confusing

but it's good and provides several options with different advantages. Most users are fine with pdfLaTeX, so this is often the default settings for LaTeX editors today.
XeLaTeX is usually good for Postscript and PStricks, such as here. Just in this case there may be an issue, perhaps in the dvi to pdf conversion process. So it's safer to use the original LaTeX and run
dvips
and
ps2pdf
. The editor should have an option to do that.
Natan wrote:Ps2PDF worked, but what if I need to use XeLaTeX for other requirements?
If the glitch is in
dvipdfmx
, you could use the .dvi file that XeLaTeX produces and run dvips and ps2pdf on it.
Stefan