TransWikia.com

Looking for information pspicture/graphs with XeLaTeX

TeX - LaTeX Asked by ferzle on January 24, 2021

I draw a graph in one of my files as so:

...
usepackage{pstricks} % I assume relevant
usepackage{graphs} %Definitely relevant
usepackage{pifont, marvosym,amssymb,mathrsfs, manfnt, amsfonts, yhmath, moreverb, pseudocode,stmaryrd }
usepackage[tiling]{pst-fill}      % PSTricks package for filling/tiling
usepackage{pst-text}              % PSTricks package for character path
usepackage{pst-grad}              % PSTricks package for gradient filling
...
begin{pspicture}(0,0)(1,.25)
rput(2,0){begin{graph}(1,1) roundnode{A}(-1,1)
roundnode{B}(1,1)roundnode{C}(1,-1)roundnode{D}(-1,-1)
edge{A}{B}edge{B}{C}edge{C}{D}edge{D}{A}autonodetext{A}[w]{01}
autonodetext{B}[e]{11}autonodetext{C}[e]{10}autonodetext{D}[w]{00}
end{graph}
} 
rput(1.5,-1.95){$mathbf{Q_2}$} 
end{pspicture}

Since this is part of a 400 page book separated into dozens of files, I can’t include all of the details, but I am hoping I included the relevant ones.

This worked fine when I compiled with latex, dvips, and ps2pdf. But I have switched to using XeLaTeX so I could get forms to work with hyperref (one of those 3 steps didn’t like my TextFields). Everything compiles, but in all of the drawing done with graph/pspicture (most have a graph in a pspicture as above, but some just have a graph) the lines are missing (the values at the nodes are printed, however). This is code written by someone else (taken from an open source book) so I don’t know it at all, and I haven’t really ever used pspicture/graph before. I am hoping to avoid having to redraw all of the pictures using tikz or something else.

Any ideas as to why the lines won’t draw when compiled with XeLaTeX? Since this is my first attempt at using XeLaTeX, I am not certain of all of the subtle differences.

One Answer

It appears that something is different in the two processes of compiling (latex-->dvips-->ps2pdf versus XeLaTeX) that makes it so that PSTricks that work for the former do not always work for the latter. The solutions seem to be don't use XeLaTeX for such files or redraw them using TikZ, for instance.

Answered by ferzle on January 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP