# Tag Info

3

Run with xelatex: \documentclass[pstricks]{standalone} \usepackage{pst-solides3d} \begin{document} \psset{Decran=50,viewpoint=20 80 30,lightsrc=viewpoint,action=none} \begin{pspicture}[solidmemory](-4,-3)(3,3) \psSolid[r1=2.5,r0=1.5,object=tore,ngrid=18 36,fillcolor=green!30,name=tA] \psSolid[r1=2.5,r0=1.5,object=tore,ngrid=18 ...

9

You can plot 4 half tori like this : \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \pgfplotsset{ torus/.style 2 args={ surf, color=#1!50,faceted color=#1, samples=17, z buffer=sort, domain=0:360, y domain=#2:#2+180 } } \def\m{sin(x)} \def\n{(2+cos(x))*sin(y)} \def\p{(2+cos(x))*cos(y)} \begin{document} ...

3

Personally I would set such a simple data set as a plain table rather than a pie chart, but assuming we do want to do this as a pie chart, I recommend reading the manual available on CTAN carefully. Here's a slightly simpler way to achieve what I think you might want: prologues := 3 ; outputtemplate := "%j-%c.eps"; input piechartmp; beginfig(1); ...

5

Update Using your revised code, which incorporates my original answer below, to answer your follow-up question, you can add additional \tikzmark{}s wherever you wish and then annotate the equations in the tikzpicture overlay as desired. For example: \documentclass[11pt,a4paper]{article} \usepackage[margin=1.1in]{geometry} \usepackage{amssymb} ...

0

A good way to approach this would be the following: Spend some time going through the TikZ manual and studying some examples. Get started drawing the basic structure, like the lines, dots, and starburst (explosion icon). Try to incorporate the 3D cones to which you linked. If you get stuck, come back here and post a more appropriate question, providing an ...

0

This might help. One can use an american resistor or cute inductor for springs, and a european resistor for mass. \documentclass{standalone} \usepackage{circuitikz} \makeatletter % ************************* mechanical dashpot ************************** \ctikzset{bipoles/dashpot/height/.initial=.6} \ctikzset{bipoles/dashpot/width/.initial=.8} ...

1

If I add \nopagenumbers to the code above, saved as graph.tex, then do pdftex graph pdfcrop graph I get the following Getting an EPS from the PDF is easy, if you really need EPS. A rather straightforward translation into TikZ/PGF: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[x=.6mm,y=1.1mm] \draw[->] ...

5

Your question is one among set of "do-it-for-me" ... Edit: anyway, @AboAmmar was faster few seconds with the almost the same solution. So In dilema what to do, I fors erase my answer, then activate, erase and on the end, decide doue to small dei+ferences activate it Above picture is drawn by: \documentclass[border=3mm, tikz, ...

2

Try this decoration method: \documentclass[tikz]{standalone} \usetikzlibrary{decorations.pathmorphing} \begin{document} \scriptsize \begin{tikzpicture} \draw (0,0) circle (1cm); \draw[decorate,decoration={coil,segment length=4pt},rotate=92] (0,0) circle(1cm); \draw[fill] (0,1) node[above=.2cm]{$F_d(t)$} circle(3pt) (0,-1) circle(3pt); \draw [<->] ...

2

Your answer will work but is needlessly verbose as you can simply use relative node names to specify the edge path. \noexpand\path[\forestoption{edge}](!u.parent anchor) -- +(5pt,0) |- (.child anchor)\forestoption{edge label};}, (!u) refers to the parent of the current node. () refers to the current node. You can also align the terminal nodes for ...

1

Actually, tikz is not that bad... After looking a little more at the manuel and few test here it is -- +(8pt,0) |- or complete version: edge path={\noexpand\path[\forestoption{edge}] (\forestOve{\forestove{@parent}}{name}.parent anchor) -- +(8pt,0) |- (\forestove{name}.child anchor)\forestoption{edge label};} From what i understand, -- is for drawing ...

4

Here's a lightning bolt decoration. It's not hugely customizable as it stands, as all the dimensions of the bolt are determined by the distance between the two points: \documentclass[tikz,border=5]{standalone} \usetikzlibrary{decorations} \pgfdeclaredecoration{lightning bolt}{draw}{ \state{draw}[width=\pgfdecoratedpathlength]{ ...

3

Here a starting point for you usgin the pic environment. You can pass two coordinates to the pic and so control the start- and end-point of your lightning-path. The following code uses static offsets to draw the zig-zag (-.25 and .25) whicht could be replaced by a dynamically calculated value. This could pretty up the lighting when used in different ...

1

Making use of the even odd rule for the shaded part, and defining a \cellsize to make the size easily modifiable. Also, here you can play around with it. Code \documentclass[tikz, border=2mm]{standalone} \begin{document} \pgfmathsetmacro{\cellsize}{4} \begin{tikzpicture} \draw[-latex] (-0.25*\cellsize,\cellsize) -- ++ (2.5*\cellsize,0) node[below] ...

2

My solution, very easy: \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture}%[scale=1] \fill [purple!10] (-4,4) -- (0,4) -- (-4,0); \fill [purple!10] (0,0) -- (0,4) -- (2,0); \fill [purple!10] (0,0) -- (-4,0) -- (0,-2); \fill [purple!10] (0,-2) -- (0,-4) -- (4,-4); \fill [purple!10] (2,0) -- (4,0) -- (4,-4); \draw [->] (-5,0) ...

8

Here is one option with pgfplots. I had to add some form of plot to make the axis customizations work, so I added one that isn't displayed at all. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ width=0.8\linewidth, axis lines=middle, grid, ymin=0, ymax=11, ytick={0,...,10}, xmin=6, ...

5

From your MWE to picture below was just small step: \documentclass[a4paper]{minimal} \usepackage[centering,margin=2cm]{geometry} \usepackage{tikz} \pagestyle{empty} \begin{document} \noindent\begin{tikzpicture}[> = stealth] \draw[gray,step=1cm] (0,0) grid +(9cm,6cm); \draw[ultra thick,red, ->] (1,4) -- node[above] {$\vec{a}$} +(2,0); ...

1

I solved my own problem. I just need to add % !TEX TS-program = latex in the first line of the LaTeX file.

1

The intersection between a surface and a plane: \documentclass{scrartcl} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[domain=0.01:30] \addplot3[surf] {min(0.,(1-0.3)*e^(-x*(y/100)*(1-0.3))-e^(-x*(y/100))}; \addplot3[surf] {max(0.,(1-0.3)*e^(-x*(y/100)*(1-0.3))-e^(-x*(y/100)))}; \addplot3[domain=4:30,samples=80,samples ...

5

Just using simple stacks. \documentclass{article} \usepackage{marvosym,amssymb,txfonts,stackengine,xcolor,scalerel} \def\hex{\kern.2pt\textcolor{green!80!black}{\scalerel*{$\Hexasteel$}{)}}} \def\btd{\textcolor{blue!30!red}{\scalerel*{\blacktriangledown}{)}}} \def\hrt{\textcolor{orange!80!red}{\scalerel*{\varheartsuit}{)}}} \def\topstik{\rule{1pt}{10pt}} ...

7

Your picture is (to me) more easily to draw without use of trees library: \documentclass[border=3mm,tikz]{standalone} \usetikzlibrary{chains, positioning, shadows, shapes.geometric } \begin{document} \begin{tikzpicture}[ node distance=5mm and 11mm, start chain = going below, ...

1

Here's a quick demonstration with TikZ, partly based on Thruston's Metapost answer. Starting with the squares, the simples way of making those is TikZ' rectangle operation, which is used as \draw (x1,y1) rectangle (x2,y2); So simply specify the coordinates of two opposite corners, with the word rectangle between. For the other shapes, you can draw the ...

2

Here's a simple approach in Metapost, that might get you started. Follow the link above for more details, and pointers to the excellent tutorials and manuals available. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u := 1cm; draw (0,0) -- (u,0) -- (u,u) -- (0,u) -- (0,2u) -- (u,2u) -- (u,3u) -- (0,3u); fill fullcircle scaled 5 ...

2

You can use a standard \node command and apply a specific style to a given node. For example: \documentclass[tikz,border=10pt,german]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz-qtree,mathtools} \usepackage{babel} \usetikzlibrary{shadows,trees} \begin{document} \tikzset { font=\small, edge from parent, level ...

3

The cause of the error in your original code is the syntax you used to call the sqrt function: ({\x},{\sqrt{\x}}) should be replaced with (\x,{sqrt(\x)})

3

There is no problem if you remove the nested equation/align environments, use only align (albeit there is nothing to align), and add [!htbp] as an option to the second figure. Here is a code which adds an \fbox around figures and shows you can hardly reduce the vertical spacing between text and figures: \documentclass{article} \usepackage[utf8]{inputenc} ...

3

The tikz-cd diagram is just a usual matrix of nodes. You can use the remember picture and overlay functionality to draw onto the existing drawing. The positions where the arrows enter and emanate from the chevron are determined in a kind of hackish way, namely by trial and error. Also, many dimensions are hardcoded, so scaling the drawing is not straight ...

7

If it is Document type definitions that you want, Pygments has support for it and produces a very neat output imo. For LaTeX documents you can harness it easily with the minted-package, e.g.: \documentclass{article} \usepackage{minted} \usemintedstyle{autumn} \begin{document} \begin{minted}{dtd} <!-- TEI P4 DTD. Generated 2004-07-15T16:23:29-04:00 ...

2

Time spent on learning something will never go a waste! As suggested in the comments, you have to use angles and quotes library. Let us say you have 3 points A, B and C. Then the angle ABC can be drawn like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,angles,quotes} \begin{document} \begin{tikzpicture} \coordinate (B); ...

4

ConTeXt needs to redefine some of the definitions of graph module. To use these redefinitions, you have to use MP instance graph. To do so, Add \usemodule[graph] in your preamble. If you are using the MPcode environment, use \startMPcode{graph}. If you are using MPpage environment, use \startMPpage[instance=graph]. You do not need to add begingraph(..) ... ...

1

Here's a simple solution. It relies on defining the coordinate axes in directions of 30°, 150° and 90°, so that you can easily find coordinates on the honeycomb grid. You then have several parameters influencing the bubble and box shapes. To help with the finding of appropriate coordinates, you can use the \MarkCoordinates macro, which also shows the ...

1

This is straight forward in most of the TeX-friendly drawing tools. Here for example is a Metapost example: which was produced with this: prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; path xx, yy; xx = (left--5 right) scaled u; yy = xx rotated 90; draw xx withcolor .7 white; draw yy withcolor .7 white; z1 = (4u,u); z2 = ...

2

Shamelessly using this great tangent line answer to sort out your problem. Try the following code: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[ tangent/.style={decoration={markings,mark=at position #1 with { \coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark ...

Top 50 recent answers are included