15 Dec 2013 12:50

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.

------------------------------------------------------------------------------
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!

4 Dec 2013 23:14

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

------------------------------------------------------------------------------
Develop, test and display web and hybrid apps with a single code base.
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net


3 Dec 2013 16:10

periodic table - new item

Hello!

I want to make an periodic table of the elements.
I have found an very good example on "texample".
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
%
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
------------------------------------------------------------------------------
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

2 Dec 2013 09:37

minimum height of boxes in multipart nodes

hi!
is it possible to determine minimal height of boxes which constitute rectangle shape with multiple text parts? something similarly to existed

/pgf/rectangle split empty part height=<...>

but with valid in boxes containing text even with it in more lines, i.e.: that height of boxes are independent from contained text? something as:

/pgf/rectangle split parts height=<...>

regards,    zarko

------------------------------------------------------------------------------
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

27 Nov 2013 02:11

error using \font

Hello,

I am facing an issue with styles in tikz. Using font= in a node with fixed width and right-aligned text causes
an unexpected indentation to be added. I have created a minimal working example to illustrate this behavior:

\documentclass{article}

\usepackage{tikz}

\tikzset{every node/.style={draw=black,thin}}

\begin{document}

\begin{tikzpicture}
\node [text width=16em,align=flush right] {\footnotesize This is OK};
\end{tikzpicture}

\begin{tikzpicture}[every node/.append style={font=\footnotesize}]
\node [text width=16em,align=flush right] {This is not OK};
\end{tikzpicture}

\end{document}

Why does this happen? Is it a bug or I'm doing something wrong?

Thanks,

Flavio Costa

------------------------------------------------------------------------------
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!

4 Nov 2013 20:44

data visualization: attaching a style sheet to a custom attribute

Hi all,

I'm using the CVS version of PGF and I'm trying the new data
visualization features. The manual says that style sheets are attached
to sets by default by the "style sheet" option, but they can also be
attached to custom attributes. I've tried to do that but it seems that
I've done something wrong because I always obtain curves that have the
same default style.

What I'm trying to do in the minimal example below is to define four
sets (s1,s2,s3,s4) but only use two styles from a style sheet, one for
sets s1 and s3, and another for s2 and s4. To do that I first add a
custom attribute myattr to the data points. This part seems to work: I
checked I can use it, for example, as the attribute for the x axis.
Then I try to attach a syle sheet to this attribute by adding the
following line to the options for datavisualization:
/data point/myattr/.style sheet=<name of a style sheet>
If I understand correctly the manual, this should give different
styles to the lines corresponding to different values of the attribute
myattr. However the following example gives me only black lines (and
no errors).
What I'm doing wrong?

Luca Donetti

%%%%%%

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{datavisualization}

\begin{document}
\begin{tikzpicture}
\datavisualization [
scientific axes,
% by uncommenting the following line I can check that myattr works
% x axis={attribute=myattr},
visualize as smooth line/.list={s1,s2,s3,s4},
% the following line does not work, all 4 lines are black
/data point/myattr/.style sheet=vary hue,
]
data [set=s1,/data point/myattr=1] {
0, 0
1, 0.5
}
data [set=s2,/data point/myattr=2] {
0, 0.2
1, 0.3
}
data [set=s3,/data point/myattr=1] {
0, 1
1, 1.5
}
data [set=s4,/data point/myattr=2] {
0, 1.2
1, 1.3
};
\end{tikzpicture}
\end{document}

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
Android apps secure.

4 Nov 2013 11:58

Section 56 of the manual (v2.10) claims that pgffor can be used independently of pgf. However, this claim seems to me misleading because, according to my tests, the 'evaluate' and 'count' keys require pgfmath. See the following code (compiled with pdftex):

\input pgffor % The following doesn't require pgfmath: \foreach [ var = \i, remember = \i as \lasti (initially -1) ] in {1,2,...,5}{\i\ } \input pgfmath % (comment this line in or out to see the effect) % However, the evaluate and count keys require pgfmaths % (pdftex returns an error if pgfmath is not loaded) \foreach \i [ evaluate = \i as \ii using 2*\i, count = \counti, ] in {1,2,...,5}{\counti: \ii\par} \bye
-----------------------------------------------------------------
Julien Cretel
PhD student (Marie Curie Actions)
University College Cork, Ireland
Lecturer for AM2032: Numerical methods & programming
Email: j.cretel <at> umail.ucc.ie
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

4 Nov 2013 12:09

Section 56 of the manual (v2.10) claims that pgffor can be used independently
of pgf. However, this claim seems to me misleading because, according to my
tests, the 'evaluate' and 'count' keys require pgfmath. See the following
code (compiled with pdftex):

\input pgffor
% The following doesn't require pgfmath:
\foreach
[
var      = \i,
remember = \i as \lasti (initially -1)
]
in {1,2,...,5}{\i\ }
\input pgfmath	% (comment this line in or out to see the effect)
% However, the evaluate and count keys require pgfmaths
% (pdftex returns an error if pgfmath is not loaded)
\foreach \i
[
evaluate  = \i as \ii using 2*\i,
count     = \counti,
]
in {1,2,...,5}{\counti: \ii\par}
\bye

--
Sent from the PGF and TikZ mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
Android apps secure.

4 Nov 2013 00:29

using arrows change patter

Hi,
please see the following MWE, where i try to draw small rectangle on
line with arrow. the rectangle i like to have filled with customized
pattern. this MWE shows two discrepancies:
1. why the declared pattern is changed, if i declare tip of arrow
separately (if i put tip of desired arrow to line, the pattern is as
expected line)
2. from where arise arrow on beginning of the second line?
do i make something wrong in my declarations? i use recent cvs of TikZ.

regards,    Zarko

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{patterns}
\makeatletter% as proposed Mark Wibrow, 2013-03-24 07:20
\pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{flexible
north east hatch}% name
{\pgfqpoint{0pt}{0pt}}% below left
{\pgfqpoint{\hatchdistance}{\hatchdistance}}% above right
{\pgfpoint{\hatchdistance-1pt}{\hatchdistance-1pt}}%
{
\pgfsetcolor{\tikz <at> pattern <at> color}
\pgfsetlinewidth{\hatchthickness}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
\pgfpathlineto{\pgfqpoint{\hatchdistance}{\hatchdistance}}
\pgfusepath{stroke}
}
\makeatother
\begin{document}
\begin{tikzpicture}[
> = stealth,% if you omit this declaration, the pattern is correct.
why?
hatch distance/.store in=\hatchdistance,    hatch distance=4pt,
hatch thickness/.store in=\hatchthickness,  hatch thickness=1pt,
X/.style = {draw=teal!40!black, very thin,
pattern color=teal, pattern=flexible north east hatch,
minimum width=6mm, minimum height=2mm, inner sep=0mm,
above=0.5mm, pos=0.75, sloped},
]
%-------
\draw[->] (0,1) to node[X]    {} (4,1);
\draw[->] (0,0) to node[X]    {} (4,0);
%-------
\end{tikzpicture}

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
Android apps secure.

27 Oct 2013 22:20

Just started using TikZ

hello all,

I have just started using TikZ. I'm going to make block diagrams of my thesis using TikZ.

I have a small problem with arrows and lines.
1) what is the best way to begin an arrow from no block? Consider a multiplier block, an arrow going into it and on top of the arrow there is the multiplying value. I prefer not to make the value a node, because then I can't anchor it by "south west", can I? My first attempt works fine, I used an empty node! but is it a good way?

2) There are several branches, and the output of all them are going to be added. I don't want to use only horizontal and vertical arrows. I want the arrow to start from its origin node, go right a bit and then go straight and at a slant into the sum block. (I hope my English is not too bad)

I attached the code and Thanks for the help!

Saeed
Attachment (cmt-modulator.tex): application/x-tex, 1623 bytes
------------------------------------------------------------------------------
October Webinars: Code for Performance
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

23 Oct 2013 18:31

ConTeXt and ampersand

Hi,

When I run the tex file attached below using texexec', both
occurrences of \show& give, as expected, something like

> &=macro:
->\let \pgf <at> matrix <at> signal <at> cell <at> end =\pgf <at> matrix <at> signal <at> cell <at> end \pgfutil <at> ifnext
char [{\pgf <at> matrix <at> cell <at> cont }{\pgf <at> matrix <at> cell <at> cont [0pt]}.

which is the contents of the \pgfmatrixnextcell macro.   But if I
process that file with the context' command, then the ampersand
inside the matrix of math nodes is let to

> &=macro:
->&.

Does anybody else see the same problem?  I am using TeXLive 2013 and
the CVS version of pgf.

------------------------------------------------

\usemodule[tikz]
\usetikzlibrary[matrix]
\starttext

\starttikzpicture
\matrix[matrix of nodes]{\show &\\};
\matrix[matrix of math nodes]{\show &\\};
\stoptikzpicture

\stoptext

------------------------------------------------

------------------------------------------------------------------------------
October Webinars: Code for Performance