New answers tagged

2

Here is a sketch of the solution to adapt \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture} \node[draw,minimum height=2em, minimum width=8em](pred) {(1) Prediction}; \node[below=0em of pred](equa1) { $\left\{\begin{aligned} A_t&= F A_{t-1}\\ P_t&=F P_{t-1} ...


1

Metapost is a good tool for this sort of semi-numerical graph. Here I've shown it wrapped up with luamplib, so this example needs to be compiled with lualatex. \documentclass[border=5mm]{standalone} \usepackage{luamplib} \begin{document} \mplibtextextlabel{enable} \begin{mplibcode} beginfig(1); % unit size numeric u; u = 7mm; % axes path xx, yy; xx = ...


1

A version in Metapost and luamplib, adapted from my answer to a similar question simply by changing the images used for the targets and the hits. Compile with lualatex. \documentclass[border=5mm]{standalone} \usepackage{fontspec} \setmainfont{Tex Gyre Pagella} \usepackage{luamplib} \begin{document} \mplibtextextlabel{enable} \begin{mplibcode} ...


2

A PSTricks solution: \documentclass{article} \usepackage{pstricks-add} \def\target{% {\psset{fillstyle = solid} \pscircle[fillcolor = white](0.7,0.7){0.7} \pscircle[fillcolor = blue!60](0.7,0.7){0.5} \pscircle[fillcolor = white](0.7,0.7){0.3} \pscircle[fillcolor = red!80](0.7,0.7){0.1}}} \def\dots[#1](#2,#3){% \psRandom[ dotsize = 2pt, ...


8

You can begin with this \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \r/\col in {2.8 cm/white,2 cm/blue!50!white,1.2 cm/white,0.4 cm/red!50!white}{% \path[draw,fill=\col] (0,0) circle (\r) ;} \foreach \coords in {(0,.4),(.2,.5),(.1,.6),(-.2,.5)}{% \draw[fill=blue] \coords circle (.6mm);} ...


5

For this I would start by placing (and naming) nodes or coordinates at the desired locations. (A coordinate is basically a node with no size and no caption.) In the example below I name them according to location, with l/r meaning left/right, and t/m/b meaning top/mid/bottom. I would then connect the nodes as necessary. Using a thick line may be easier in ...


2

For completeness (and IMO, because the code is simpler) here is another way to do this in tikz (I didn't change the phi's) \documentclass[a4paper]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} 0 \arrow{r} \arrow{d} & A \arrow{r}{\phi} \arrow{d}{\eta_1} & B \arrow{r}{\psi} \arrow{d}{\eta_2} & C \arrow{r} \arrow{d}{\eta_3} ...


4

I would not use \chainin at all and would instead use \draw: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix,arrows} \begin{document} \begin{center} \begin{tikzpicture}[>=stealth,->,shorten >=2pt,looseness=.5,auto] \matrix (M)[matrix of math nodes,row sep=10mm,column sep=16mm]{ 0 & A & B & C & 0 \\ ...


2

\documentclass{article} \usepackage{pgf-umlsd} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \begin{figure} \centering \scalebox{1} { \begin{sequencediagram} \newthread{A}{\shortstack{Cliente\\ \\\begin{tikzpicture} \node [copy shadow,fill=gray!20,draw=black,thick ,align=center] {Aplicaciones \\ Cliente}; ...


4

It does not really add much to the complete @LaRiFaRi answer but I wanted to show a different approach to define the ending point of a line using a convenient syntax provided by the library calc. Let's say you want to end the arrow between policy and asset at 1/4 of the distance between (asset.north west) and (asset.south west) (i.e. the left hand side of ...


8

You can define your arrow entry point by a certain angle around your node. So instead of saying spending.south you can say spending.270 which will result in the same. Knowing this, you can define whatever entry angle you desire. I hope, this is what you meant: % arara: pdflatex \documentclass[tikz,border=5mm]{standalone} ...


1

Ok, I've found an answer here Here is a quick solution \documentclass{article} \usepackage{chemmacros} \begin{document} \newman{H,H,,H,,H}\hspace*{-4pt}\newman{H,,H,H,H} \bigskip \newman{H,H,C\rlap{\ch{H2}},H,C\rlap{\ch{H2}},H}\hspace*{10pt}\newman{H,,H,H,H} \end{document} Here is a looooong solution with tikz (i'm going to study it) ...


2

You can do that with a tabular environment and pstricks. It can be compiled with xelatex, or with pdflatex if it is launched with the --enable-write 18 switch (for MiKTeX) or -shell-escape (TeX Live, MacTeX): \documentclass[10pt]{amsart} \usepackage{array} \usepackage{pst-node} \usepackage{auto-pst-pdf} \begin{document} \begin{postscript} ...


3

As recreation after excellent lunch :-) \documentclass[boeder=5mm, tikz]{standalone} \usetikzlibrary{chains,positioning,shapes.multipart} \begin{tikzpicture}[ node distance = 2mm and 3mm, start chain = A going right, MN/.style = {%My Node shape=rectangle split, rectangle split horizontal, rectangle split ...


0

Overlays are the easiest way to replace an image. But you will have to find the right luminosity values yourself, when producing the gray scale version of your image. \documentclass{beamer} \usetheme{Warsaw} \setbeamercovered{transparent} \setbeamertemplate{navigation symbols}{} \usepackage{beamerthemeshadow} \usepackage{tikz} \begin{document} ...


4

Here's a Metapost + luamplib solution, showing an MP function to find the focus points of an arbitrary ellipse. The ellipse is only rotated to show that it works with any ellipse... \documentclass[border=5mm]{standalone} \usepackage{luamplib} \mplibtextextlabel{enable} \begin{document} \begin{mplibcode} vardef focus(expr e, n) = save a, b; numeric ...


4

A PSTricks solution: \documentclass{article} \usepackage{pstricks-add} \psset{dimen = m} \usepackage{expl3} \ExplSyntaxOn \cs_new_eq:NN \calc \fp_eval:n \ExplSyntaxOff \begin{document} % parameters \def\radiiA{3} \def\radiiB{2} \def\pointX{1.5} % |\pointX| < |\radiiA| \def\braceSize{4pt} \def\braceColor{red} % shortened code ...


14

While the other solution looks great as well, the code is needlessly complicated. This code is very minimal and allows for easy customization by defining the relevant parameters as macros. \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture}[dot/.style={draw,fill,circle,inner ...


11

Hope this example will help you \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture}[help lines/.style={blue!30,very thin},scale=0.6] \draw [help lines] (-7, -6) grid (7, 6); \draw[color=blue,very thick] (0, 0) ellipse (5cm and 4cm); \foreach \x/\y in ...


2

Metapost provides a normaldeviate command that will give you Gaussian random numbers that you can add to a given coordinate. Here's a way to use it to draw clusters. prologues := 3; outputtemplate := "%j%c.eps"; % draw n random points centered on Z with r scattering vardef draw_cluster(expr Z, n, r, marker) = for i=1 upto n: draw marker ...


1

You can temporarily disable the automatic labeling with \SetVertexNoLabel before drawing the vertices, then activate it again with \SetVertexLabel after, and then use \Vertex[Node]{u} etc. The Node option is necessary to indicate that u and v are referring to the already defined references u and v created with \Vertices. MWE: ...


5

A PSTricks solution: \documentclass{article} \usepackage{pstricks} \begin{document} \begin{pspicture}(4,3) \psset{fillstyle = solid} \psframe[fillcolor = orange](0,0)(4,3) \pscircle(2,1.5){1} \pscircle[fillcolor = cyan](2,1.5){0.8} \end{pspicture} \end{document} In case you want the fill color of the ring to be the same as the background ...


8

Here is a suggestion using the even odd rule to fill the orange area, i.e. the rectangle without the outer circle. \documentclass[margin=5mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[fill=orange,even odd rule] (-4, -4) rectangle (4,4) (0,0)circle[radius=2] ; \path[fill=blue] (0,0) circle [radius=1.5] ; ...


3

I think it's easiest to do this by shading the whole picture, and then drawing a white circle and a blue one. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} % fills entire rectangle \fill[orange] (-4, -4) rectangle (4,4); % removes filling inside circle \filldraw[fill=white, draw=black, very thick] (0,0) ...


1

You can use axis coordinate systems to put regular tikz commands in the pgfplot axes. To bring the axes to foreground, I used the same method to fake the axes. This is not a general solution for other plots. If you reverse the y axis, the system will not be right handed, and people generally expect axes to be right handed. It is better to bring the x axis ...


1

As you requested here is a solution usind tikz-cd. It uses a custom labeling macro \cdlabel that throws out the current line of the diagram and generates a label named by the first argument. You can \ref it as usual. \documentclass{article} \usepackage{amssymb} \usepackage{tikz} \usetikzlibrary{cd} \newcounter{cdrow} \newcommand\cdlabel[1]{% ...


2

This is an examply with tikz-cd. The code for the half dotted arrow is slightly modified from this answer by Ignasi, also including some additions. Output Code \documentclass[margin=10pt]{standalone} \usepackage{tikz-cd} \usetikzlibrary{decorations.pathreplacing,calc,arrows.meta} \tikzset{ triple/.style={ decoration={show path construction, ...


5

You can use alignat (in which the rows get numbered by default) instead of array. \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{graphicx} \begin{document} \begin{alignat}{10} 1 & \longrightarrow & A & \longrightarrow & B \times C & \overset{\pi}\longrightarrow & D & \longrightarrow & 1 \phantom{\, ,} ...


5

For starting point: \documentclass[border=3mm,tikz]{standalone} \usetikzlibrary{decorations.pathreplacing} \usepackage{amssymb} \tikzset{ pics/realline/.style 2 args = { code = {\draw [thick] (0,0) -- (6,0) node [right=2mm] {$\mathbb{R}$}; \fill[black] (1,0) circle (1mm) node[above=2mm] {$#1$} (3,0) ...


3

Another solution. It uses width function to define node's size. As the same parameter is used as node contents and size delimiter, node's name and position must be declared before options or inside options. \documentclass[border=2mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}% [square/.style={% draw, ...


1

Your question smell on "do-it-for-me" questions ... As starting point, if you like to use tikz package for drawing, can serve the following (pseudo)code: \documentclass[tikz, border=1ex]{standalone} \begin{document} \begin{tikzpicture} \draw[draw=green, very thick, rounded corners, fill=gray] (<coordinate 1>) -- (<coordinate 2>) -- %and so ...


3

The smartdiagram documentation lists numerous options for smartdiagramset, but many of those options are specific to each diagram type. The following may be close to what you want. \documentclass[border=10pt]{standalone} \usepackage{smartdiagram} \smartdiagramset{border color=none,uniform color list=blue for all items} \begin{document} ...


6

For simple and very smooth curves you can fake a simple derivative action as in Derivative of a tikz path? However TeX is not the place to do these CAS computations. If you have the closed form curves then you can plug the formulas into pgfplots otherwise it will always fail at some point. \documentclass[tikz]{standalone} ...


6

Just because I love a good challenge. Compiled using convert -delay 10 -loop 0 -density 300 -scale 400 -alpha remove <file>.pdf <file>.gif. Missing features/improvements: red line "curving", not sure how to easily do it. Some transitions should be paused more. Will try to fix later. Various repeated commands might be reduced. Output The ...


2

Well, there is nothing like best package or software to use. By interchanging them, you just change one set of problems against another one. Chose one way which seems appropriate to you and stick with it. Tikz is a powerful tool, which on the other hand can be quite time consuming sometimes even for producing simple pictures. However, it gives you the ...


2

The original code in the edited question compiled fine but produces frames for animated ellipse-drawing rather than animated circle-drawing. Assuming that 'doesn't workrefers to the fact that the picture draws an ellipse rather than a circle, this is relatively easily fixed, even with no knowledge ofpstricks. (I say this only because I have no such ...


5

That is a lot of work to get all the intermediate steps. It is much more easier to use a presentation class without the animation. Here is a starter: \documentclass{beamer} \usepackage{pstricks-add,multido} \begin{document} \begin{frame}[plain] \centering \def\Radius{3} \begin{pspicture}(-4,-4)(4,4) \psdot[dotsize=1mm,linecolor=red](0,0)\pause ...


0

An homothetic solution : \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{calc,intersections} \begin{document} \begin{tikzpicture} \def\Base{8} \def\Rect{6} \coordinate (A) at (-\Base/2,0) ; \coordinate (B) at (\Base/2,0) ; \begin{scope} \clip (0,0) rectangle (0,0) ; \draw[name path=C1] (\Base,0) arc (0:90:12); \draw[name ...


4

I have a partial drawing which I can't complete right now due to time constraints. I will however provide you with the source material and the method. First, the result: Second, the code \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \definecolor{c969696}{RGB}{150,150,150} \begin{tikzpicture}[y=0.80pt, x=0.80pt, ...


11

So here is a first partial solution. Probably way to complicated. I needed to figure out first, how the tqft package works... In case I find some time to think about this further, I'll go on working on this... Edit Some progress, but still room for improvements (simplifying and annotating code...) Edit2 Its more or less done. I leave the fine tuning and ...



Top 50 recent answers are included