[pstricks] PST-PDF & TikZ
Мариян Христов
marian359 at networx-bg.com
Fri Nov 6 18:51:12 CET 2009
Hi,
I'm having a hard time making "pst-pdf" cut the bounding box of the
flowchart that I'm making. I have used TikZ package for the flowchart
itself, but decided to cut it with pst-pdf. Unfortunately it only cuts
three sides, leaving the right side whith a large blank spot.
Best regards: M. Hristov
Here the source code:
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[english,bulgarian]{babel}
\usepackage{pifont}
\usepackage{pstricks}
\newpsstyle{gridstyle}{subgriddiv=0,gridcolor=lightgray,griddots=10,gridlabels=0pt}
\usepackage{pst-pdf}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,calc}
\begin{document}
\begin{pspicture}[showgrid=true](0,-1)(9,14)
% Define block styles
\tikzstyle{dia} = [diamond, draw, fill=blue!20,text width=5em, text
badly centered, node distance=2.5cm, inner sep=0pt,]
\tikzstyle{rec} = [rectangle, draw, fill=blue!20,text width=14em, text
centered, rounded corners, minimum height=2.5em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{round rec} = [draw, rounded
rectangle,fill=orange!20,draw=orange, thick, node distance=3cm,minimum
height=2em, text width=5em, text centered]
\tikzstyle{del} = [draw=none,fill=none, inner sep=-5pt, minimum
size=2pt, node distance=6.3em,minimum height=0.1mm]
\pgfsetendarrow{\pgfarrowlargepointed{2.5pt}}
\begin{tikzpicture}[node distance = 1.5cm, auto]
% Place nodes
\node [round rec] (A) {1 node};
\node [rec, below of=A] (B) {PC \ding{213} 2 node};
\node [rec, below of=B] (C) {3 node \ding{213} IR};
\node [dia, below of=C] (D) {4 node};
\node [dia, below left of=D, node distance=8em] (E) {6 node};
\node [rec, below right of=D, node distance=8em, text width=6em] (F)
{7 node};
\node [dia, below of=D, node distance=12em] (G) {8 node};
\node [rec, below left of=G, text width=8em, node distance=8em] (H)
{PC = 9 node};
\node [rec, below right of=G, text width=8em, node distance=8em] (I)
{PC = 10 node};
\node [del, below of=E] (zero_1) {};
\node [del, below of=F] (zero_2) {};
\node [del, below of=H, node distance=4em] (zero_3) {};
\node [del, below of=I, node distance=4em] (zero_4) {};
\node [del, below of=A, node distance=2em] (zero_6) {};
% Draw edges
\path [line,thick] (A) -- (B);
\path [line,thick] (B) -- (C);
\path [line,thick] (C) -- (D);
\path [line,thick] (D) -| node [near start,above] {yes} (E);
\path [line,thick] (D) -| node [near start,above] {yes} (F);
\path [line,thick] (E) -| node [near start] {no} (G);
\path [line,thick] (E) -- node [near start, left] {no} (H);
\path [line,thick] (G) -- node [near start] {yes}(zero_1);
\path [line,thick] (F) -- (I);
\path [line,thick] (G) -- node [near start] {no}(zero_2);
\path [line,thick] (H) -- (zero_3);
\path [line,thick] (I) -- (zero_4);
\draw [line,thick] ($ (zero_3.south) + (0mm,0pt) $)-- ++(6.2,0) --
++(0,12) |- ($ (zero_6.east) + (0mm,0pt) $);
\end{tikzpicture}
\end{pspicture}
\end{document}
More information about the PSTricks
mailing list