|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
parallel arrows: what about "raise"?Not sure, what the current status of drawing parallel arrows is (I've seen solutions using xshift which become cumbersome once I want to shift perpendicular to the direction of an arbitrary arrow), but today found another construction in the manual that looks promising: the description of /pgf/decoration/mirror= <boolean> on page 243 of my version of the manual contains an example, where a decorating brace is shifted by 5pt perpendicular to the connecting line from A to B via
\draw[decorate,decoration={brace,mirror,raise=5pt} (a) -- (b); If this is feasible for decorated paths, what about undecorated ones, i.e., just plain arrows or lines? Or do we need to dress these up as decorations? -- Jürgen |
|
|
Re: parallel arrows: what about "raise"?Hi,
The lineto decorations cannot be used for such things as they use special points like \pgfpointdecoratedinputsegmentlast and \pgfpointdecoratedpathlast which ``survive'' any transformations specified by the mirror and raise keys. This has many advantages, but not in this case. Fortunately it is possible to define a very simple decoration which replaces the entire path with a single straight line and observes any transformations. Everything can then be tied up in a style: \usepackage{tikz} \usetikzlibrary{decorations} \begin{document} \pgfdeclaredecoration{single line}{initial}{ \state{initial}[width=\pgfdecoratedpathlength-1sp]{\pgfpathmoveto{\pgfpointorigin}} \state{final}{\pgfpathlineto{\pgfpointorigin}} } \tikzset{ raise line/.style={ decoration={single line, raise=#1}, decorate } } \begin{tikzpicture} \draw [red, very thick] (0,0) -- (3,2); \foreach \r in {-20,-15,...,20} \draw [raise line=\r, ->] (0,0) -- (3,2); \end{tikzpicture} \end{document} Hope this helps, Mark 2009/9/28 koslowj <koslowj@...>: > > Not sure, what the current status of drawing parallel arrows is (I've seen > solutions using xshift which become cumbersome once I want to shift > perpendicular to the direction of an arbitrary arrow), but today found > another construction in the manual that looks promising: the description of > /pgf/decoration/mirror= <boolean> on page 243 of my version of the manual > contains an example, where a decorating brace is shifted by 5pt > perpendicular to the connecting line from A to B via > > \draw[decorate,decoration={brace,mirror,raise=5pt} (a) -- (b); > > If this is feasible for decorated paths, what about undecorated ones, i.e., > just plain arrows or lines? Or do we need to dress these up as decorations? > > -- Jürgen > -- > View this message in context: http://www.nabble.com/parallel-arrows%3A-what-about-%22raise%22--tp25653217p25653217.html > Sent from the pgf-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > pgf-users mailing list > pgf-users@... > https://lists.sourceforge.net/lists/listinfo/pgf-users > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
| Free embeddable forum powered by Nabble | Forum Help |