Mark Wibrow | 1 Feb 14:48

Re: [-LIKELY_SPAM-]Re: decorated text at center of path

Hi,

This is now possible with the latest CVS version:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\begin{document}

\begin{tikzpicture}
    \draw[->] (2,0.3) to [controls={+(-1.2,0.4) and +(1.2,0.4)}] (-2,0.3);
    \path decorate [decoration={text along
path,text={Diensterbringer}, text align=center},above=0.1cm]
       { (-2,0.3) to [controls={+(1.2,0.4) and +(-1.2,0.4)}] (2,0.3) };
\end{tikzpicture}

\end{document}

regards

Mark

2009/1/23 Goebel, Juergen <juergen.goebel <at> eads.com>:
> Stephan Hennig wrote:
>
>> I don't want to advertise MetaPost on this list :) , but
>> since there has
>> been no (public) reply to the question,
>
(Continue reading)

Gordon Royle | 2 Feb 02:34
Picon
Picon
Favicon

Re: line with arrow at its *center*


On 08/01/2009, at 4:49 PM, Goebel, Juergen wrote:

Till Tantau wrote: 
 
try the "mark" decoration, it does exactly what you are looking for. 
 
Thanks a lot.  I'm sure it should, but the example (or something quite
similar) from page 309 of the fine manual isn't working for me.
 
Running
 
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings}
\begin{document}
\begin{tikzpicture}
 \begin{scope}[decoration={markings,mark at position 0.5 with {\arrow{stealth}}}]
    \draw[postaction={decorate}] (0,0.43) -- (2.5,1.6) -- (5.93,0) -- (8,0.97);
 \end{scope}
\end{tikzpicture}
\end{document}


I happened to be drawing arrows in the middle of lines, and came across this - seemingly unanswered - question in my own search for answers... Fortunately I managed to figure it out...

So the answer is that you need 

"mark = at position 0.5"

rather than 

"mark at position 0.5"

(Yes, I don't know why either..)

Cheers

Gordon
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Goebel, Juergen | 2 Feb 08:44
Favicon

Re: decorated text at center of path

Mark Wibrow wrote:

> This is now possible with the latest CVS version:

Great, thanks a lot!  I'll try to get it, AFAIR this
should be possible from Kjell's fine website.

Regards,

Juergen

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
zulkifli | 2 Feb 11:21
Picon

Error in example p. 35 of manual

Dear PGF users,

I am learning pgf/tikz and try to run example in the manual p. 35 but the
copmiler complained error as below.
I tried to find some thread with the same error, I found none.
Any hints or pointers is highly appreciated, thank you in advance.

Regards,

zulkifli

ps:
I use pdflatex Version 3.1415926-1.40.9 (MiKTeX 2.7)
Windows XP SP2

=== error message
! Package pgf Error: No shape named x axis is known.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.103 ...white] {$\sin \alpha$} (30:1cm |- x axis)
                                                  ;

! Package pgf Error: No shape named x axis is known.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.106     (30:1cm |- x axis)
                             -- node[below=2pt,fill=white] {$\cos \alpha$} (...

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
Ignasi Furió | 2 Feb 12:26
Favicon

Re: Error in example p. 35 of manual

Zulkifli

with CVS version and including \usetikzpackage{intersections} it works for  
me:

-----------------------
\documentclass[11pt,a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{intersections}

\begin{document}
\begin{tikzpicture}[scale=3]
	\clip  (-2,-0.2)  rectangle  (2,0.8);
	\draw[step=.5cm,gray,very  thin]  (-1.4,-1.4)  grid  (1.4,1.4);
	\filldraw[fill=green!20,draw=green!50!black]  (0,0)  --  (3mm,0mm)   
arc(0:30:3mm)  --  cycle;
	\draw[->]  (-1.5,0)  --  (1.5,0)  coordinate  (x  axis);
	\draw[->]  (0,-1.5)  --  (0,1.5)  coordinate  (y  axis);
	\draw  (0,0)  circle  (1cm);
	\draw[very  thick,red] (30:1cm)  --  node[left=1pt,fill=white]  {$\sin   
\alpha$}  (30:1cm  |-  x  axis);
	\draw[very  thick,blue] (30:1cm  |-  x  axis)  --   
node[below=2pt,fill=white]  {$\cos  \alpha$}  (0,0);
	\path  [name  path=upward  line]  (1,0)  --  (1,1);
	\path  [name  path=sloped  line]  (0,0)  --  (30:1.5cm);
	\draw  [name  intersections={of=upward  line  and  sloped  line,   
by=t}][very  thick,orange]  (1,0)  -- node  
[right=1pt,fill=white]{$\displaystyle  \tan  \alpha   
\color{black}=\frac{{\color{red}\sin  \alpha}}{\color{blue}\cos   
\alpha}$}  (t);
	\draw  (0,0)  --  (t);
	\foreach  \x/\xtext  in  {-1,  -0.5/-\frac{1}{2},  1}
		\draw  (\x  cm,1pt)  --  (\x  cm,-1pt)  node[anchor=north,fill=white]   
{$\xtext$};
	\foreach  \y/\ytext  in  {-1,  -0.5/-\frac{1}{2},  0.5/\frac{1}{2},  1}
		\draw  (1pt,\y  cm)  --  (-1pt,\y  cm)  node[anchor=east,fill=white]   
{$\ytext$};
\end{tikzpicture}
\end{document}
-------------------
Regards,

Ignasi

> Dear PGF users,
>
> I am learning pgf/tikz and try to run example in the manual p. 35 but the
> copmiler complained error as below.
> I tried to find some thread with the same error, I found none.
> Any hints or pointers is highly appreciated, thank you in advance.
>
> Regards,
>
> zulkifli
>
> ps:
> I use pdflatex Version 3.1415926-1.40.9 (MiKTeX 2.7)
> Windows XP SP2
>
> === error message
> ! Package pgf Error: No shape named x axis is known.
>
> See the pgf package documentation for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.103 ...white] {$\sin \alpha$} (30:1cm |- x axis)
>                                                   ;
>
> ! Package pgf Error: No shape named x axis is known.
>
> See the pgf package documentation for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.106     (30:1cm |- x axis)
>                              -- node[below=2pt,fill=white] {$\cos  
> \alpha$} (...
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users

--

-- 
----------------------------------------------------------------------
Ignasi Furió Caldentey
Universitat de les Illes Balears
Escola Politècnica Superior
Dep. Matematiques i Informatica
Cra. Valldemossa, km. 7,5. 07071-Palma. SPAIN
tel: (34) 971.173.196    fax: (34) 971.173.003
e-mail: ignasi dot furio at uib dot cat
http://www.uib.cat
----------------------------------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
zulkifli | 3 Feb 01:04
Picon

Re: Error in example p. 35 of manual

> Zulkifli
>
> with CVS version and including \usetikzpackage{intersections} it works for me:
>
> -----------------------
> \documentclass[11pt,a4paper]{article}
> \usepackage{tikz}
> \usetikzlibrary{intersections}
>
> \begin{document}
> \begin{tikzpicture}[scale=3]
> 	\clip  (-2,-0.2)  rectangle  (2,0.8);
> 	\draw[step=.5cm,gray,very  thin]  (-1.4,-1.4)  grid  (1.4,1.4);
\filldraw[fill=green!20,draw=green!50!black]  (0,0)  --  (3mm,0mm)
> arc(0:30:3mm)  --  cycle;
> 	\draw[->]  (-1.5,0)  --  (1.5,0)  coordinate  (x  axis);
> 	\draw[->]  (0,-1.5)  --  (0,1.5)  coordinate  (y  axis);
> 	\draw  (0,0)  circle  (1cm);
> 	\draw[very  thick,red] (30:1cm)  --  node[left=1pt,fill=white]  {$\sin
> \alpha$}  (30:1cm  |-  x  axis);
> 	\draw[very  thick,blue] (30:1cm  |-  x  axis)  --
> node[below=2pt,fill=white]  {$\cos  \alpha$}  (0,0);
> 	\path  [name  path=upward  line]  (1,0)  --  (1,1);
> 	\path  [name  path=sloped  line]  (0,0)  --  (30:1.5cm);
> 	\draw  [name  intersections={of=upward  line  and  sloped  line,
> by=t}][very  thick,orange]  (1,0)  -- node
> [right=1pt,fill=white]{$\displaystyle  \tan  \alpha
> \color{black}=\frac{{\color{red}\sin  \alpha}}{\color{blue}\cos
> \alpha}$}  (t);
> 	\draw  (0,0)  --  (t);
> 	\foreach  \x/\xtext  in  {-1,  -0.5/-\frac{1}{2},  1}
> 		\draw  (\x  cm,1pt)  --  (\x  cm,-1pt)  node[anchor=north,fill=white]
> {$\xtext$};
> 	\foreach  \y/\ytext  in  {-1,  -0.5/-\frac{1}{2},  0.5/\frac{1}{2},  1}
> 		\draw  (1pt,\y  cm)  --  (-1pt,\y  cm)  node[anchor=east,fill=white]
> {$\ytext$};
> \end{tikzpicture}
> \end{document}
> -------------------
> Regards,
>
> Ignasi
>

Thank you, it works now, but another error occurs from example CVS manual. But I
am not ask about it since it is CVS version.

Until now, I am still considering to learn tikz by reading manual and type the
examples. However, since there may be error from example in manual, I would like
to ask suggestions how to learn tikz reach the level of finishing all of the
tutorials.

Thank you in advance.

Regards,

Zulkifli

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
Axel E. Retif | 3 Feb 02:11
Picon
Gravatar

Re: Error in example p. 35 of manual

On  2 Feb, 2009, at 18:04, zulkifli <at> ee.its.ac.id wrote:

>> Zulkifli
>>
>> with CVS version and including \usetikzpackage{intersections} it  
>> works for me:
>> [...]
>> Regards,
>>
>> Ignasi
>>
>
> Thank you, it works now, but another error occurs from example CVS  
> manual. But I am not ask about it since it is CVS version.

I think is the other way around ---if you post the errors you get, it  
helps pgf/TikZ developers to debug the code and/or correct the manual  
before they upload a new version to CTAN.

> Until now, I am still considering to learn tikz by reading manual  
> and type the examples. However, since there may be error from  
> example in manual, I would like to ask suggestions how to learn tikz  
> reach the level of finishing all of the tutorials.

I believe the manual is the best way to learn, but see also

http://www.texample.net/tikz/examples/

http://altermundus.com/pages/tikz.html

Best,

Axel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
zulkifli | 3 Feb 12:04
Picon

Re: Error in example p. 35 of manual

> On  2 Feb, 2009, at 18:04, zulkifli <at> ee.its.ac.id wrote:
>
>>> Zulkifli
>>>
>>> with CVS version and including \usetikzpackage{intersections} it
>>> works for me:
>>> [...]
>>> Regards,
>>>
>>> Ignasi
>>>
>>
>> Thank you, it works now, but another error occurs from example CVS
>> manual. But I am not ask about it since it is CVS version.
>
> I think is the other way around ---if you post the errors you get, it
> helps pgf/TikZ developers to debug the code and/or correct the manual
> before they upload a new version to CTAN.
>
>> Until now, I am still considering to learn tikz by reading manual
>> and type the examples. However, since there may be error from
>> example in manual, I would like to ask suggestions how to learn tikz
>> reach the level of finishing all of the tutorials.
>
> I believe the manual is the best way to learn, but see also
>
> http://www.texample.net/tikz/examples/
>
> http://altermundus.com/pages/tikz.html
>
>
> Best,
>
> Axel
>

OK then, thanks a lot

Best,

Zulkifli

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
Loïc | 4 Feb 14:18
Picon
Favicon

trigonometric functions

Dear list
When I use trigometric funtion such as tan, cosine, sine we have to use
angle in degrees.

Is it possible to specify the pgf compiler that all values will be given
in radian?

I know I can write:
 cos (3.14 r) 

but I want to avoid this "r" translation.

and just write cos(3.14)

Is it possible?

thanks in advance

Loïc

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Matthew Leingang | 4 Feb 16:25
Picon

Forbidden sign is backwards

Hello,

The "forbidden sign" shape described in section 39.4 of the 2.00  
manual has the diagonal going the wrong way.  It should go from top  
left to bottom right.

See http://en.wikipedia.org/wiki/No_sign

I think artistically it's nicer if it goes from bottom left to top  
right--somebody told me that movement in art is supposed to go up and  
to the right otherwise the viewer feels forced away.  However, ISO has  
decided the other way.  I think the diagonal is supposed to invoke the  
diagonal of the letter N, so the symbol represents a superposition of  
N and O.

Sorry if this is fixed in CVS--I searched to see if it's come up on  
the list already and didn't find it.

--Matthew Leingang

--
Matthew Leingang
Clinical Associate Professor of Mathematics
leingang <at> cims.nyu.edu

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com

Gmane