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{
(Continue reading)

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
milksea | 15 Dec 12:50 2013

Coordinate system intersection is undocumented?

Hello,

In pgf 2.00, the intersection coordinate is documented (12.2.4 Intersection Coordinate Systems). We can
then use, for example,

    \fill (intersection of 0,3--2,2 and 2,0--4,4) circle (2pt);

to draw the intersection point of two lines. Although the two line segments do not intersect, the extension
lines do.

However, in pgf 2.10 and later (3.00rc), only "name intersections" in intersections library is
documented, the old document of intersection coordinate system is erased. We cannot use

    % \usetikzlibrary{intersections}
    \draw[name path=a] (0,3) -- (2,2);
    \draw[name path=b] (2,0) -- (4,4);
    \fill[name intersections={of=a and b, by=x}] (x) circle (2pt); % error: No intersections

Therefore I think the old syntax is still useful and worth a document.

Leo.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Csikos Bela | 4 Dec 23:14 2013
Picon

touching curves/arrows

Hello:

I am new to tikz/pgf.

I would like to draw flowcharts. I learned how to make nodes and edges.

I would like to make arrows similar to shown in the attached png image.

Nodes A and B, and the arrow between them is fixed, and the other arrow
with nodes C and D should be drawn relative to it.

I could not find anything like this in the manual or elsewhere.

Any help is appreciated.

Thanks

bcsikos
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Arne Röhrs | 3 Dec 16:10 2013
Picon

periodic table - new item

Hello!

I want to make an periodic table of the elements.
I have found an very good example on "texample".
See the link:
http://www.texample.net/tikz/examples/periodic-table-of-chemical-elements/

Now I want to add some more items like electronegativity.
But I fail ... :-(


May be some code from the example can help you to find a solution:

The author make a new command with:

----->8---
\newcommand{\CommonElementTextFormat}[4]
{
 \begin{minipage}{2.2cm}
   \centering
     {\textbf{#1} \hfill #2}%
     \linebreak \linebreak
     {\textbf{#3}}%
     \linebreak \linebreak
     {{#4}}
 \end{minipage}
}
---->8----


and another new command


----->8------
\newcommand{\NaturalElementTextFormat}[4]
{
 \CommonElementTextFormat{#1}{#2}{\LARGE {#3}}{#4}
}

\newcommand{\OutlineText}[1]
{
\ifpdf
 % Couldn't find a nicer way of doing an outline font with TikZ
 % other than using pdfliteral 1 Tr
 %
 \pdfliteral direct {0.5 w 1 Tr}{#1}%
 \pdfliteral direct {1 w 0 Tr}%
\else
 % pstricks can do this with \pscharpath from pstricks
 %
 \pscharpath[shadow=false,
   fillstyle=solid,
   fillcolor=white,
   linestyle=solid,
   linecolor=black,
   linewidth=.2pt]{#1} 
\fi
}
------->8---------



Afterwards he created a node in which you can describe the elements.


------->8-----
%% Group 1 - IA
 \node[name=H, Element] {\NaturalElementTextFormat{1}{1.0079}{H}{Wasserstoff}};
------>8-------

How can I add a new item?

Or knows someone the mail adress of the author?


Greetings

Arne
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

Gmane