Tag Info

Hot answers tagged

31

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


15

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


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


12

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


11

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

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

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

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


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

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


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

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

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}% ...


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)% ...


7

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


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

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); ...


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}{% ...


7

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

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


6

With PSTricks. Intersection is not necessary in this case as a simple logic can help you to find the angles at which the arcs start and stop. See the following explanation how to calculate the angles. \documentclass[pstricks,border=12pt]{standalone} \degrees[12] \psset{dimen=monkey} \begin{document} \begin{pspicture}(-3,-3)(3,3) \psframe(-3,-3)(3,3) ...


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

This Asymptote solution uses a function ABCD defined in asydef environment to draw a region of bounded by the four consecutively intersecting paths. However, some order of intersection is assumed. If the paths are absolutely random, (may not intersect, for example) than more checking is needed. % % xsect.tex : % \documentclass[10pt,a4paper]{article} ...


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

Get the point of intersection of line segments Ba and AC by \tkzInterLL(A,C)(B,a) \tkzGetPoint{b} And then draw the line segment Bb \documentclass{article} \usepackage{tikz,amsmath,amssymb,tkz-euclide} \begin{document} \begin{center} \begin{tikzpicture} \tkzDefPoint(0,0){A} \tkzLabelPoints[below,left](A) ...


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

tikz inside plot axis is not a general problem. However, tkz-euclide has a completely different set-up for coordinates etc. For labelling the right-angle it is easier just to use the calc library. I have named the two nodes you are interested in by adding name=A and name=B to their options. Then I have drawn the right angle symbol via \coordinate (X) at ...


5

Your code works : You need to read your .log file to verify two things: 1) the path for gnuplot . If the path is fine then you must find a line like gnuplot executed or something like that 2) if in your .log file, you have something like file.table not found, then you need to use the option --shell-escape or write18 in your script for the compilation. ...


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

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



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