[Ipe-discuss] use library calc tikz in IPE
Otfried Cheong
otfried at ipe.airpost.net
Sun May 5 21:18:38 CEST 2019
Ah, sorry, I forgot that Ipe 7.2.12 isn't released yet. If you want to try it, it's here:
https://www.dropbox.com/sh/0wt762hai2lvv3w/AADhsm3p-ejcNaXoGC9XK9coa?dl=0
Otherwise, attached is a version of the file for 7.2.11.
Cheers,
Otfried
On Sun, May 5, 2019, at 20:52, Otfried Cheong via Ipe-discuss wrote:
> You can just do this one-to-one:
>
> \usepackage{tikz}
> \usetikzlibrary{calc}
> \usetikzlibrary{backgrounds}
>
> This goes in the Latex preamble (Edit -> Document properties).
>
> Then put the tikzpicture environment in a text object.
>
> Attached is the example.
>
> Cheers,
> Otfried
>
>
>
> On Sun, May 5, 2019, at 20:43, Tony via Ipe-discuss wrote:
> >
> > I would like to use some libraries du ipe to be able to draw simple
> > functions. in order to do this, you need to implement the TIKZ package
> > with the calc library.
> > Using Textstudio I can write this, getting a certain result (you can
> > compile to verify).
> > *\documentclass{article}
> > \usepackage{tikz}
> > \usetikzlibrary{calc}
> > \usetikzlibrary{backgrounds}
> >
> > \begin{document}
> > \begin{tikzpicture}[scale=1.5,
> > velocity/.style= {thick,blue!15!black},
> > terr/.style= {thick,gray!60}]
> > ]
> > \fill[terr] (-2,0) rectangle (3,-0.5);
> > \draw [thick, black,->] (-2,0)--(3,0) node[right, below] {$x$};
> > \draw [thick,black,->] (0,0)--(0,3.5) node[above, left] {$z$};
> > \draw [very thick,black] (-1.5,0)--(-1.5,2.7) node[above, above] {};
> > \fill[terr] (2.25,0) rectangle (2.15,3.5);
> > \draw [very thick,black] (2.15,0)--(2.15,3.5) node[above, above] {};
> >
> > \draw[thick,velocity] plot[domain=0:15] ({ 0},{ (.2*\x)});
> > \foreach \i in {1,2,...,14}
> > {
> > \draw[velocity,-latex] ($(-1.5,0) + {.2*(\i-0.5)}*(0,1)$) --++ (1,0);
> > }
> >
> > \draw[-] plot[domain=0:15] ({ 0},{ (0.2*\x)});
> > \foreach \i in {1,2,...,35}
> > {
> > \draw[rotate = 0,velocity,-] ($(2.15,0) + {.1*(\i-0.5)}*(0,1)$) --++
> > (0.1,0);
> > }
> > *
> > *
> > *
> > *\draw[thick,velocity] plot[domain=0:15] ( {(2*(1-exp(-\x/2)))*cos(5) +
> > (0.1*\x)*(sin(5))},
> > {-0*tan(5) + (-2*(1-exp(-\x/2)))*sin(5) + (.2*\x)*cos(5)});
> > \foreach \i in {1,2,...,14}
> > {
> > \draw[velocity,-latex] (${-sin(5)*1*(\i-0.5)}*(0.01,0) +
> > {cos(5)*.2*(\i-0.5)}*(0,1)$) --
> > ++ (${2.1*(1-exp(-(\i-0.5)/2))*cos(5)}*(1,0)$);
> > }
> > %%-----------Altro modo rettangolo
> > % \begin{scope}[on background layer]
> > % \path[fill=gray!60] plot[smooth,domain=0:4] (2.3,3.5) coordinate
> > (1,1)-- (2.15,3.5)|- (2.3,0);
> > % \end{scope}
> > %%--------------------------------
> >
> > % \node[] at (-1,2.9) {$U_\infty$};
> > % \node[draw=black,fill=white] at (1.1,2.1) {$\bar{u}$};
> > % %\node[] at (0.2,-0.15) {$0$};
> > \end{tikzpicture}
> > \end{document}*
> >
> > When I implement this on IPE (using the ipelet tikz) I can't get the
> > function to draw, because the calc library is essential. how should it
> > be implemented in the preamble? or in the sty file?
> >
> > Thanks
> >
> >
> > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Mail priva di virus. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <https://www.fastmail.com/mail/compose?u=196a41a1#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> > _______________________________________________
> > Ipe-discuss mailing list
> > Ipe-discuss at lists.science.uu.nl
> > https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss
> >
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss at lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/ipe-discuss
>
> Attachments:
> * tikzcalc.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tikzcalc.ipe
Type: application/octet-stream
Size: 7933 bytes
Desc: not available
URL: <https://mailman.science.uu.nl/pipermail/ipe-discuss/attachments/20190505/3a7ffbb5/attachment.obj>
More information about the Ipe-discuss
mailing list