Andy | 17 Jul 22:52 2014
Picon

document class change causes tikz errors

I have a flowchart that works in the article document class, but when I
change document class to mnthesis, it does not recognize tikZ.  Any ideas? 
Does the document class file (mnthesis.cls) have to inside the Latex program
file to be activated, or does it just need to be in the same folder as the
test1.tex file?  Here is a file of my flow chart (test1.tex).  Next is a
file of the 'mnthesis.cls' file.  Any help is appreciated.

% thesis.tex: Primary TeX control file for thesis.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt, oneside]{article} % change to 'mnthesis' to run U of M
thesis document
\usepackage{epsfig,epic,eepic,units}
\usepackage{hyperref}
\usepackage{url}
\usepackage{longtable}
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{bigstrut}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{float}
\usepackage{booktabs}
\usepackage{chngcntr}
\usepackage{pgfplots}  %pgfplots.sourceforge.net\pgfplots.pdf
\pgfplotsset{compat=1.8}
\usepackage{rotating}
\usepackage{pdfpages}
(Continue reading)

Susan Dittmar | 14 May 13:23 2014
Picon
Picon

pgfpages: reordering of pages

Hi folks,

I use pgfpages a lot, but there's one feature I would like to use which I don't 
know how to access (or whether it's possible at all): Is there a way to place a 
shipout command between the created logical pages? I would like to use this for 
example for the creation of booklets.

Here's a short non-working example. It creates two logical pages (A4), which I 
would like pgfpages to output unchanged, but with their order reversed:

\documentclass[a4paper]{scrartcl}
\usepackage[a4paper,margin=5mm]{geometry}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{switch 2}
{
     \edef\pgfpageoptionheight{\the\paperwidth}
     \edef\pgfpageoptionwidth{\the\paperheight}
     \def\pgfpageoptionborder{0pt}
}
{
     \pgfpagesphysicalpageoptions
     {%
         logical pages=2,%
         physical height=\pgfpageoptionheight,%
         physical width=\pgfpageoptionwidth,%
     }
     \pgfpageslogicalpageoptions{2}
     {%
         resized width=\pgfpageoptionwidth,%
         resized height=\pgfpageoptionheight,%
(Continue reading)

Michael Hallgren | 24 Apr 15:08 2014
Picon

Problem compiling the PGF manual from CVS

Hi,

Attempting to build the PGF manual from fresh CVS sources, I die as
follows:

! LuaTeX error .../generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua:26: m
odule 'pgf.gd.routing.NecklaceRouting' not found:
        no field package.preload['pgf.gd.routing.NecklaceRouting']
        [kpse lua searcher] file not found: 'pgf.gd.routing.NecklaceRouting'
        [kpse C searcher] file not found: 'pgf.gd.routing.NecklaceRouting'
        no file '/usr/local/lib/lua/5.2/pgf.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './pgf.so'
        [oberdiek.luatex.kpse_module_loader]-eroux Search failed
stack traceback:
        [C]: in function 'require'
        .../generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua:26: in main chunk
        [C]: in function 'require'
        [\directlua]:1: in function 'lookup'
        [\directlua]:1: in function 'pgf_lookup_and_require'
        [\directlua]:1: in main chunk.
<argument> ...drawing library '\pgf <at> temp ' not found}}') end}
                                                   \fi
l.102 ...yered,examples,force,phylogenetics,routing}
                                                 
?

Known problem?


Cheers,
mh

p, li { white-space: pre-wrap; }
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Christoph Weyer | 3 Apr 15:35 2014
Picon

TikZ 3.0 & preview

Hello,

I have a problem with the new TikZ 3.0, it produces the same "error" by
using MikTeX or an updated TeXLive.

The following document:

\documentclass{article}

\usepackage{tikz}
\usepackage[delayed,tightpage]{preview}

\listfiles
\begin{document}
\begin{preview}
XXX
\end{preview}
\end{document}

Produces the following error:
! Undefined control sequence.
\ <at> EveryShipout <at> Output ...EveryShipout <at> Org <at> Shipout
                                                  \box \ <at> cclv
l.11 \end{document}

If the preview package is active, then there will be no error.

There is a hack of handling the preview package in the file
pgfutil-latex.def (in line 136):
\AtBeginDocument{
  \ <at> ifpackageloaded{preview}{%
    \let\pgf <at> temp\pr <at> shipout%
    \let\pr <at> shipout\ <at> EveryShipout <at> Shipout%
    \let\ <at> EveryShipout <at> Org <at> Shipout\pgf <at> temp%
  }{}%
}

if I change this into:
\AtBeginDocument{
  \ <at> ifpackageloaded{preview}{%
    \let\pgf <at> temp\pr <at> shipout%
    \let\pr <at> shipout\ <at> EveryShipout <at> Shipout%
    \ifPreview%
      \let\ <at> EveryShipout <at> Org <at> Shipout\pgf <at> temp%
    \fi%
  }{}%
}

everything works like expected. But I'm unsure if than something else is
broken, since I'm really unsure if this is really a solution for the
problem above.

Best regards
Christoph

Here is my file list:
 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
    tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)
     pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)
  pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
  pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)
 pgfkeys.sty
 pgfkeys.code.tex
 pgfmath.sty
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
 preview.sty    2010/02/14 11.87 (AUCTeX/preview-latex)
prtightpage.def
supp-pdf.mkii
 ***********

--

-- 
Institute of Telematics
Hamburg University of Technology
Schwarzenbergstrasse 95
21073 Hamburg, Germany

Tel.: (+49) 40 42878-3375
Fax:  (+49) 40 42878-2581

------------------------------------------------------------------------------
Matthias Nagel | 17 Mar 11:03 2014
Picon

Incompatible library "graphs" and "shapes"? -> Compilation error.

Hello,

I need to use the TikZ libraries "graphs" and "shapes" in the same document. But they seem to be incompatible. Here is a minimal example that makes active use of the "graphs" library, but does not need the "shapes" library. Anyway, the compilation fails as soon as the "shapes" library is loaded.

This is the minimal example:

\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

% If the TikZ library 'shapes' is loaded, compilation fails
\usetikzlibrary{shapes,matrix,graphs}
%\usetikzlibrary{matrix,graphs}

\begin{document}
\begin{tikzpicture}
\matrix { \node(foo) {foo}; \\ \node(bar) {bar}; \\ };
\graph[use existing nodes] { foo -> bar; };
\end{tikzpicture}
\end{document}

The error message is

! Missing \endcsname inserted
<to be read again>
\tikz <at> lg1
l.17 \graph[use existing nodes] { foo -> bar; };

I use the package versions that are bundled with my LaTeX distribution. This is to say:

- MikTex 2.9
- pgf 2008/01/15 v2.10 (rcs-revision 1.12)
- tikzlibraryshapes.code.tex 2008/01/09 v2.10 (rcs-revision 1.1)
- tikzlibrarymatrix.code.tex 2008/06/18 v2.10 (rcs-revision 1.2)
- tikzlibrarygraphs.code.tex 2010/10/23 v2.10 (rcs-revision 1.1)

Any ideas?

Best regards, Matthias Nagel
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Suresh Govindachar | 17 Mar 06:26 2014
Picon

\pgfmath<operation> works -- but \tikzmath does not


%% Plain TeX file
\input tikz.tex
\usetikzlibrary{mindmap,intersections,arrows,angles}
\usetikzlibrary{quotes,calc,decorations.pathmorphing}
\usetikzlibrary{backgrounds,positioning,fit,petri}
\usetikzlibrary{math}
\baselineskip=12pt
\hsize=6.5truein
\vsize=9.0truein
\parskip 6pt

The following calculates the angle PFQ.  Use of pgfmath<operation> 
results in the expected answer of 60 degrees.  However, use of 
tikzmath{} results in error message: Runaway argument?  ! Paragraph 
ended before ... was complete.

\vskip 0.5in

\noindent
\tikzpicture

   \coordinate [label=above:$\bf P$]  (P) at (-3cm,  0cm);
   \coordinate [label=above:$\bf Q$]  (Q) at ( 3cm,  0cm);
   \coordinate [label=above:$\bf F$]  (F) at ( 0cm, 
-5.19615242270663188056cm);

   \path ($ (P) - (F) $);
   \pgfgetlastxy{\cx}{\cy}
   \path ($ (Q) - (F) $);
   \pgfgetlastxy{\bx}{\by}
   \path ($ (P) - (Q) $);
   \pgfgetlastxy{\ax}{\ay}

   \pgfmathdivide{\ax}{100.0} \xdef\sax{\pgfmathresult}
   \pgfmathdivide{\ay}{100.0} \xdef\say{\pgfmathresult}
   \pgfmathdivide{\bx}{100.0} \xdef\sbx{\pgfmathresult}
   \pgfmathdivide{\by}{100.0} \xdef\sby{\pgfmathresult}
   \pgfmathdivide{\cx}{100.0} \xdef\scx{\pgfmathresult}
   \pgfmathdivide{\cy}{100.0} \xdef\scy{\pgfmathresult}

   \pgfmathmultiply{\sax}{\sax} \xdef\dax{\pgfmathresult}
   \pgfmathmultiply{\sbx}{\sbx} \xdef\dbx{\pgfmathresult}
   \pgfmathmultiply{\scx}{\scx} \xdef\dcx{\pgfmathresult}
   \pgfmathmultiply{\say}{\say} \xdef\day{\pgfmathresult}
   \pgfmathmultiply{\sby}{\sby} \xdef\dby{\pgfmathresult}
   \pgfmathmultiply{\scy}{\scy} \xdef\dcy{\pgfmathresult}

   \pgfmathadd{\dax}{\day}  \xdef\dada{\pgfmathresult}
   \pgfmathadd{\dbx}{\dby}  \xdef\dbdb{\pgfmathresult}
   \pgfmathadd{\dcx}{\dcy}  \xdef\dcdc{\pgfmathresult}

   \pgfmathsqrt{\dada} \xdef\da{\pgfmathresult}
   \pgfmathsqrt{\dbdb} \xdef\db{\pgfmathresult}
   \pgfmathsqrt{\dcdc} \xdef\dc{\pgfmathresult}

   \pgfmathadd{\dbdb}{\dcdc}   \xdef\dbpdc{\pgfmathresult}
   \pgfmathsubtract{\dbpdc}{\dada} \xdef\dbpdcmda{\pgfmathresult}
   \pgfmathmultiply{\db}{\dc}   \xdef\dbtdc{\pgfmathresult}
   \pgfmathmultiply{\dbtdc}{2.0}   \xdef\dbtdcpdbtdc{\pgfmathresult}
   \pgfmathdivide{\dbpdcmda}{\dbtdcpdbtdc}   \xdef\cosangle{\pgfmathresult}
   \pgfmathacos{\cosangle}   \xdef\anglef{\pgfmathresult}

   \path let \p1 = ($ (F) - (P) $),
             \p2 = (P)
         in
         coordinate [label=left:$\bf Quarter PF\  \anglef $] 
(quarterpf) at ( {\x2 + 0.25*\x1}, {\y2 + 0.25*\y1} );

%-remove_me_for_error_message-% \tikzmath
%-remove_me_for_error_message-% {
%-remove_me_for_error_message-%       real \dbx; %, \dby, \dbdb, \db, 
\dcx, \dcy, \dcdc, \dc, \dax, \daay, \dada, \da;
%-remove_me_for_error_message-%
%-remove_me_for_error_message-%       \dbx = \bx/100.0 * \bx/100.0;
%-remove_me_for_error_message-%     % \dby = \by/100.0 * \by/100.0;
%-remove_me_for_error_message-%     % \dbdb = \dbx + \dby;
%-remove_me_for_error_message-%     % \db   = sqrt( \dbdb );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \dbx = \bx/100.0 * \bx/100.0;
%-remove_me_for_error_message-%     % \dby = \by/100.0 * \by/100.0;
%-remove_me_for_error_message-%     % \dbdb = \dbx + \dby;
%-remove_me_for_error_message-%     % \db   = sqrt( \dbdb );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \dcx = \cx/100.0 * \cx/100.0;
%-remove_me_for_error_message-%     % \dcy = \cy/100.0 * \cy/100.0;
%-remove_me_for_error_message-%     % \dcdc = \dcx + \dcy;
%-remove_me_for_error_message-%     % \dc   = sqrt( \dcdc );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \dax = \ax/100.0 * \ax/100.0;
%-remove_me_for_error_message-%     % \daay = \ay/100.0 * \ay/100.0;
%-remove_me_for_error_message-%     % \dada = \dax + \daay;
%-remove_me_for_error_message-%     % \da   = sqrt( \dada );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \anglef = acos( ( \dbdb + \dcdc - 
\dada ) / ( 2.0*\db*\dc ) );
%-remove_me_for_error_message-% }

\draw ($ (F) + (0, -0.5cm) $)
       node (example-align) [draw, align=left]
               {  \bf{angle PFQ:  \anglef } };

\endtikzpicture

\bye

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Suresh Govindachar | 16 Mar 23:52 2014
Picon

Circular arcs defined by an 'X' -- plain TeX (and TikZ)


%% Plain TeX file
\input tikz.tex
\usetikzlibrary{mindmap,intersections,arrows,angles}
\usetikzlibrary{quotes,calc,decorations.pathmorphing}
\usetikzlibrary{backgrounds,positioning,fit,petri}
\baselineskip=12pt
\hsize=6.5truein
\vsize=9.0truein
\parskip 6pt

% Here's the question on
% "Circular arcs defined by an 'X' -- plain TeX (and TikZ)":

Consider three points P, Q, and F, with F being below the line
joining P and Q.  So the two lines PF and QF would form a distorted
`V', and extending these two lines would result in a distorted `X'.
Introduce 5 points into the shorter of the two segments PF and QF,
so that this shorter segment is divided into six equal sub-segments.

Need to use these 5 points to draw circular arcs in {\bf TikZ} and
{\bf plain \TeX} ({\bf not} latex).

I can illustrate what needs to be done for the special case of P, Q
and F being (-3,  0), (3,  0), and (0, -3*sqrt(3)).

Would like pointers to extending this to the general case.

\vskip 0.5in

\noindent
\tikzpicture

   % Input: 3 noncollinear points P, Q, and F, with F below PQ
   \coordinate [label=above:$\bf P$]  (P) at (-3,  0);
   \coordinate [label=above:$\bf Q$]  (Q) at ( 3,  0);
   \coordinate [label=right:$\bf F$]  (F) at ( 0, -5.196);

   % All of the following need to be derived

   % P' is on PF extended so that F is the mid-point of PFP'
   \coordinate  (Pp) at ( 3, -10.392); % Pp is P-prime or P'

   % Q' is on QF extended so that F is the mid-point of Q'FQ
   \coordinate  (Qp) at (-3, -10.392);

   \draw [ultra thick]  (P) -- (F);
   \draw [ultra thick]  (Q) -- (F);
   \draw [dashed]       (F) -- (Pp);
   \draw [dashed]       (F) -- (Qp);

   % The various angles in the code below such as 30 and the
   % various start-angles are for the specific values of
   % the input P, Q, and F.

% foreach of 5 equi-spaced points on the smaller of PF or QF
\foreach \s in {1,2,...,5}
{
     \coordinate (left)  at ({-(6-\s)*sin(30)}, {-\s*cos(30)});
     \coordinate (right) at ({ (6-\s)*sin(30)}, {-\s*cos(30)});

     % the start and end angles below are chosen so that the
     % arc is inside the `V` formed by PFQ
     \draw [ultra thick]
         let \p1 = ($ (F) - (left) $),
             \n1 = {veclen(\x1, \y1)}
         in
               (left)
               arc [start angle=120, end angle=60, radius=\n1];

     % For general P, Q, and F, the delta-angles below could be
     % anything that makes the picture look OK.
     \draw [dashed]
           (left)
           arc [start angle=-60, delta angle=-60, radius=\s];

     \draw [dashed]
           (right)
           arc [start angle=-120, delta angle=60, radius=\s];
}

\draw [dashed]
     let \p1 = ($ (P) - (F) $),
         \n1 = {veclen(\x1, \y1)}
     in
           (F)
           arc [start angle=-60, delta angle=-60, radius=\n1];

\draw [dashed]
     let \p1 = ($ (Q) - (F) $),
         \n1 = {veclen(\x1, \y1)}
     in
           (F)
           arc [start angle=-120, delta angle=60, radius=\n1];

\def\sa{ atan( ((-6-\s)*1.732/2)/(3-\s/2) ) }
\def\ea{ 120 }

% foreach of 5 equi-spaced points on the smaller of FP' or FQ'
\foreach \s in {1,2,...,5}
{
     \coordinate (left)  at ({-(\s)*sin(30)}, {-(6+\s)*cos(30)});
     \coordinate (right) at ({ (\s)*sin(30)}, {-(6+\s)*cos(30)});
     \draw [very thick]
         let \p1 = ($ (F) - (left) $),
             \n1 = {veclen(\x1, \y1)}
         in
               (left)
               arc [start angle=-120, end angle=-60, radius=\n1];

    \draw [dashed]
        let \p1 = ($ (P) - (left) $),
            \n1 = {veclen(\x1, \y1)}
        in
              (left)
               arc [start angle={\sa}, delta angle={-\ea - \sa}, 
radius=\n1];

    \draw [dashed]
        let \p1 = ($ (Q) - (left) $),
            \n1 = {veclen(\x1, \y1)}
        in
              (right)
              arc [start angle={-180-\sa}, delta angle={\ea + \sa}, 
radius=\n1];
}

\endtikzpicture

\bye

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Alain Matthes | 13 Mar 18:24 2014
Picon

Problem with a path between pgf 2.1 and pgf 3.0

Hello

I asked this question on the site tex.stackexchange :
With the next code and pgf 2.1 I get identical pictures but
with pgf 3.0 the pictures are different. It seems it is a bug
with external gnuplot function plot but I would like to find some explanations

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

  \begin{tikzpicture}[domain=0:2]
    \path[fill=blue]  (0,0) -- plot function{x+1} -- (2,0);   
 \end{tikzpicture}

\begin{tikzpicture}[domain=0:2] 
\path[fill=blue]  plot function{x+1} -- (2,0) -- (0,0);    
\end{tikzpicture}

\end{document}

Best regards
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Suresh Govindachar | 9 Mar 19:14 2014
Picon

How to rebuild the manual pgfmanual.pdf?


Hello,

On Windows 7, 64 bit with MikTeX, the installed pgfmanual.pdf  (Manual 
for version 3.0.0 dated December 20, 2013) has a page size of 8.27 x 
11.69 and 1165 pages.

I tried to build the manual from sources as follows:

      cp -iar /c/opt/miktex_2.9/doc/generic/pgf  .
      cd  pgf/version-for-pdftex/en/
      make

The preceding command compiled the sources twice and ended with success. 
  However, the resulting pgfmanual.pdf has less than 1000 pages and is 
still of size 8.27 x 11.69.

How do I get all the content of the deployed manual but with page size 
of 8.5 x 11?

Thanks,

--Suresh

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
Paul Zinn-Justin | 1 Feb 19:03 2014
Picon

multiple arguments with \pic ?

I'm playing with the new \path pic or \pic that was introduced in recent versions of tikz.
Is there any way to have multiple arguments, i.e., make a call \pic{mypicture={red}{green}} ?

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Amadeus W.M. | 31 Jan 05:22 2014
Picon
Picon

how to position children along a line in mindmap

I have a mindmap with 4 level 1 nodes that grow at 0, 90, 180 and 270, 
each with its own level 2 children. All nodes are arranged in a circle 
around their parents but I would like to change the circle to a straight 
line for the level 2 children only. How would I do that? Is there an 
option or some style I can modify? There are many level 2 nodes and I 
would not like to set the coordinates to each node individually. I guess 
I can do that in foreach, but I'm thinking there has to be a way to 
achieve this with styles. Here is the current code:

    \def\clustSpan{135}
    \def\clustOffset{(180-\clustSpan)/2}

    \begin{tikzpicture}[small mindmap, text=white, minimum size=0,
        text width=1.5cm, concept color=blue!90,
        %% root concept/.style={concept color=blue!90,fill=cyan},
        root concept/.append style={
          %% minimum size=0, text width=3cm,
          concept color=blue!90,text=black
        },
        level 1/.append style=
        {every child/.style={concept color=blue!60,
            sibling angle=360/\the\tikznumberofchildren,
            level distance=2cm,
            minimum size=0, text width=1cm}},
        level 2/.append style=
        {every child/.style={concept color=blue!30,
            sibling angle=135/(\the\tikznumberofchildren -1),
            level distance=1.5cm,
            minimum size=0, text width=0.5cm}},
        grow cyclic
      ]
      \node[concept] {Root}
      [counterclockwise from=0]
      child[concept] {node[concept] {child 1}
        [counterclockwise from=-90+\clustOffset]
        child[concept] foreach \x in {1,2,3} {node[concept] {\x}}
      }
      child[concept] {node[concept] {child 2}
        [counterclockwise from=0+\clustOffset]
        child[concept] foreach \x in {4,...,7} {node[concept] {\x}}
      }
      child[concept] {node[concept] {child 3}
        [counterclockwise from=90+\clustOffset]
        child[concept] foreach \x in {7,...,11} {node[concept] {\x}}
      }
      child[concept] {node[concept] {child 4}
        [counterclockwise from=180+\clustOffset]
        child[concept] foreach \x in {12,...,17} {node[concept] {\x}}
      };
    \end{tikzpicture}

Oh, and one more question. How do I compute (programatically) the 
"clockwise from=" angle for the level 2 children? Right now I hardcoded 
-90, 0, 90 and 180 and that works for 4 children, but I want something 
general. I'm guessing a custom grow function that depends on the 
\tikznumberofcurrentchild of the parent node. Mathematically this would 
be 90*(n-1) where n=0,1,2,3 is the index of the level 1 child, but how do 
I code that up?

Thanks!

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk

Gmane