Tag Info

Hot answers tagged

24

UPDATE, 11/10/11: I've posted the code at https://github.com/blerner/auc-tikz -- the most recent version is auc-tikz-struct.el (the other files are older experimental versions). I haven't had time to update the code in a while, so if people want to tinker with the code, have at it! It's still rough, but it should sorta work if you'd like to try it out. ...


13

Here is a general solution... but not completely since it can not manage the content of nodes (see below for a simpler solution but less general). I create a new homothety option usable with a path. This options can store the result of an homothetic transformation applied to this path. Some subkeys control the parameters: scale is used to specify the ...


13

I modify my answer to get what you want ... My answer is not complete because I need more time ... My package is useful for french mathematics teachers. We never make tables like you want. Below I made the "traditional" table ... \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz} \usepackage{tkz-tab,tkz-fct} ...


10

I don't know if it is possible to give a precise consideration on which package is more powerful (TikZ or the tkz bundle): what is true is that they have a different syntax, but I think there are cases in which TikZ provides a simpler programming solution and others when tkz is more straightforward. For example, the macro \tkzMarkAngle, is one of the latter ...


10

As a typical counterpart to tikz drawings, here's a take on the pstricks version. \documentclass{article} \usepackage{pst-node}% http://ctan.org/pkg/pst-node \usepackage{multido}% http://ctan.org/pkg/multido \begin{document} \begin{pspicture}(10,10) \SpecialCoor \psset{unit=3cm,runit=3cm}% Scaling of x,y and r units \pnode(3,0){O}% Circle origin ...


10

You can use the shorten > and shorten < options. For example \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill (0,0) circle (0.05); \fill (2,0) circle (0.05); \draw[shorten >=0.5cm,shorten <=1cm,->] (0,0) -- (2,0); \end{tikzpicture} \end{document} produces . However, there are few situations ...


10

tkz-euclide manual, although is written in french, is full of examples. On page 112 you will find command \tkzFillSector. Whitin your first example you can use \tkzFillSector[fill=blue,opacity=0.3](O,S1)(S2) to fill the sector with center on O from S1 to S2.


9

You can get the tangents to extend by adding shorten >=<negative length>, and use the intersections library to locate the points of intersection and add the appropriate labels: If you use \coordinates for the poitns then using a \foreach is a convienent way to mark each of the points. Code: \documentclass[11pt, oneside]{article} ...


9

No there is nothing specific in tkz-fct. You need to use TikZ to do that. With simple functions like in your example, you can use fp. I think when you have complex functions , it's better to get the intersection with a real mathematics soft. Actually tkz-fct works only with gnuplot and perhaps it's possible to use tables created by gnuplot to find an ...


8

It is possible if you use TikZ directly to plot and combine it with the intersections library. \documentclass{article} \usepackage{tkz-fct} \usetikzlibrary{intersections} \tikzset{ name plot/.style={every path/.style={name path global=#1}} } \begin{document} \begin{tikzpicture} \tkzInit[ymax=15,xmax=4,ystep=5] \tkzAxeXY % \tkzFct[name ...


8

run with xelatex or latex->dvips->ps2pdf \documentclass[pstricks,border=15pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) \pspolygon[linecolor=red!60,fillstyle=solid,fillcolor=red!40!white](-2,-3)(-1,-1)(1,-1)% ...


8

Here is an attempt trying to stick closely to tkz-euclide commands. \documentclass[11pt]{standalone} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \tkzDefPoint(0,0){Origin} \tkzDefPoint(3.5,0){Q} \tkzDefPoint(14,0){O} \node [left] at (Origin) {$P$}; \node [right] at (O) {$O$}; \newcommand*{\Radius}{2cm}% ...


8

Some informations to complete Ignasi's answer. You can find in tkz-euclide some macros about arcs, some macro about sectors. Here it's possible to draw the sector and to fill it at the same time with \tkzDrawSector[color=blue, thick,fill=blue,fill opacity=0.3](O,S1)(S2) You need only to draw axis after. It's possible to use ...


7

A friend of mine once needed kind of a cake to visualize fractions. Adding rotated nodes wasn't hard: \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{intersections, calc, fpu, decorations.pathreplacing} \newcommand{\TikZFractionalCake}[5]{% Num, Denom, Color, Borders, Size \pgfmathsetmacro{\angle}{360/#2};% \foreach \x in {1,...,#1}% ...


7

I give my personal answer because It's preferable to avoid to mix syntaxes ( tikz and euclide ) and I added some remarks. I take big parts from hpesoj626's answer. Firstly, I prefer to use several parts in my code, I created tkz-euclide to do this: definition, calculations, drawings and labels. If you study tikz enough, you will be able to use only tikz and ...


7

Here is a solution using PSTricks drawings inside a table. (Compile using latex --> dvips --> ps2pdf.) \documentclass{article} \usepackage[ tableposition = top, labelformat = empty % Removes ``Table'' or ``Figure'' from caption. ]{caption} \usepackage{pstricks} \usepackage{booktabs} % Increasing function. \newcommand*\increase{ \raisebox{-1.2ex}{% ...


6

A possible solution: \documentclass[png,border=10pt,tikz]{standalone} \usepackage{tikz,tkz-euclide,pdftexcmds} \usetikzlibrary{backgrounds} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \usetkzobj{all} \makeatletter \pgfdeclareradialshading[tikz@ball]{my ball}{\pgfqpoint{5bp}{10bp}}{% color(0bp)=(tikz@ball!10!white); ...


6

Use the L= option for \Vertex to have a different label: \documentclass{article} \usepackage{tkz-berge} \usepackage{lipsum} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=0.75,transform shape] \tikzstyle{LabelStyle}=[fill=white,sloped] \Vertex[x=0,y=0]{A} \Vertex[x=-2,y=-1]{B} \Vertex[x=2,y=-1,L=B]{C} ...


6

A workaround I've just seen possible, without modifying the graphics, is this: Include package bigstrut Use the other parameters of multirow: bigstruts: value 2. fixup: value 2mm Add a call of \bigstrut for each row being spanned. Increasing \arraystretch to 3. The code for the main tex file is this: \documentclass[]{article} \usepackage{amsmath} ...


6

There are a few problems with the code: PGF uses degrees for trig functions Seems that the r at the end of the function f was intended to convert from radians to degree, but I changed it so that it is more obvious. Need to determine what happens at the end points of the piecewise domain, so note the slight tweaks for that. Not sure what the tkz portion of ...


6

You could use options when drawing, such as \tkzDrawCircle[R,very thick](S,\rSN pt) \tkzDrawPoints[color=black,shape=circle,fill=black](D,E,F,S) or set styles, such as by \tkzSetUpPoint and \tkzSetUpLine, which are explained in the tkz-euclide manual. Regarding the labels, you could set their style via an option to the tikzpicture or by \tikzset, such as ...


5

Stefan'answer is correct. I would like only elaborate some methods. First you can use generally most of the tikz's options, then specific macro for an object (here points) have two versions : tkzDrawPoint,and tkzDrawPoints. If all points use the same style (this is recommended) then you can use tkzDrawPoints else you need to use the first version. Finally I ...


5

There is a name conflict between nag.sty and tkz-tools-base.tex (which is input via tkz-euclide.sty). From nag.sty: \let\@xa\expandafter From tkz-tools-base.tex: \global\let\@xa\tkz@init@xmin Without one (or both) of the two package authors resolving the conflict by renaming things, I don't think you use the two packages together.


5

You can specify the length of the unit vectors using the keys x and y. In this case, you would use x=0.5cm, y=0.5cm/3 for the first plot and x=0.5cm, y=0.5cm/1.5. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ samples=60, domain=0:10, xmax=10.5, restrict y to domain=0:10, axis ...


5

You have several solutions : 1) you can mix tkz-euclide with tikz \documentclass{minimal} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture}[scale=1] \tkzDefPoint(0,0){O} \tkzDrawCircle[R](O,3 cm) \def\sectors{20} \foreach \i in {1,2,...,\sectors} { \tkzDefPoint({\i*360/\sectors}:3){P\i} \tkzDrawSegment[color=black](O,P\i) ...


5

The tkz-2d package has been replaced by the tkz-euclide package. You should download the latest version. When you unzip the folder you can move the contents to the the latex folder of your local texmf folder. See this answer for more details on how to set up your local folder, and where it is located.


5

There is a bug in the implementation that is patched by Daniel in his answer here callout and beamer In the meantime you can fake it via \documentclass[tikz]{standalone} \usepackage{kpfonts} \usepackage{tkz-fct} \usetkzobj{all} \usetikzlibrary{shapes.callouts,calc} \begin{document} \begin{tikzpicture}[>=stealth', remember picture, ...


5

run with xelatex. All important points are marked as nodes, see documentation. \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{pspicture}[showgrid=false](-4,-2)(5,3) \pscircle*[linecolor=red!30!white!100](0,0){1} \pscircle*[linecolor=green!30!white!100](3,0){2} \psCircleTangents(0,0){1}(3,0){2}% coordinates/radius of the 2 circles ...


5

This answer is not using the tkz-kiviat but still it does what it is supposed to do (without requiring additional packages). You have to manually indicate the number of axes as well as the positions of the nodes, and of course your label. \documentclass[]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[upright]{fourier} ...


4

You can use relative coordinates and then vertical lines. \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{shapes,arrows,positioning} \tikzset{ block/.style = {rectangle, draw, text width=6em, text centered, rounded corners}, line/.style = {draw, very thick, color=black!50, -latex'}, cloud/.style = {rectangle, draw, node distance=1.5cm, minimum ...



Only top voted, non community-wiki answers of a minimum length are eligible