I draw a figure by tikz but found it is not in the middle but a little
left of the page, and then I wrote a piece code and impoved my view.

And I tried to add some parameters to put the figure in the middle but failed.

Thanks for any tips and test code is below.

\usemodule[tikz]
\usetikzlibrary[positioning, shapes, shadows, arrows]
\usetikzlibrary[backgrounds]

\starttext

\placefigure[here][fig:pci]{PCI System}{
\framed{
\hbox{
        \tikzstyle{abstract}=[rectangle, draw=black, rounded corners,
fill=blue!40, drop shadow, text=white, font=\small]
        \tikzstyle{cache}=[rectangle, draw=black, rounded corners,
fill=green, drop shadow, text=white, font=\small]

        \starttikzpicture[background rectangle/.style={draw=blue}, framed]
                \draw[help lines] (-5, -4) grid (5, 1);

                \node (Processor) [abstract, rectangle split, rectangle split 
parts=2]
                        {
                                {Processor}
                                \nodepart{second}Cache
                        };

                \node (AuxNode01) [below=of Processor] {};
                \node (Coherency) [cache, left=of AuxNode01]
                        {
                                {Cache Coherency}
                        };
                \node (L2-Cache) [cache, right=of AuxNode01]
                        {
                                {Cache}
                        };
        \stoptikzpicture
        }
        }
}
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to