# Tag Info

2

Tips to get it done: define a style for nodes with rectangle border and without (you may tune them) use a matrix of nodes for positioning the nodes, as they are fitting to a grid in the matrix you can apply styles by: ... & |[stylename]| text & ... after the matrix, draw arrows referring to implicit matrix node names, such as \draw[->] (m-1-1) ...

11

Here's one option using the powerful forest package; since its built upon TikZ the customization possibilities are enormous. For example one can easily simulate the style produced by dirtree: \documentclass[border=5pt]{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={ font=\ttfamily, grow'=0, child anchor=west, ...

2

Getting the final output requires running the accompanying rail program; the distribution provides an executable for Windows and the C sources. However, trying to make the program raises a lot of errors. Unless you are able to compile the program properly, I don't think you can use the package. Note that the banner in rail.c is defined by static char ...

3

The coordinates for the lower face are named A1,...,A4 and those for the upper face are B1,...,B4. You can simply put \nodes at those coordinates with the desired text; a little example; I used A,B,...,H as labels, but you can use whatever text you want: \documentclass[border=5pt]{standalone} \usepackage{tikz} \definecolor{myred}{RGB}{183,18,52} ...

1

Here's one option; since all vertices of the cube have names (that I asigned in the now deleted answer to the question linked), uncomment the commented out \foreach loop to see the names; I also changed the perspective and the color schema that I proposed to the other answer, but you can change it back if you want to. Since you have access to the names of ...

6

A generalisation of John Kormylo's comment above, all tied up in pic. \documentclass[tikz, border=5]{standalone} \usetikzlibrary{calc} \tikzset{pics/.cd, grid/.style args={(#1)#2(#3)#4(#5)#6(#7)#8}{code={% \tikzset{pics/grid/dimensions=#8}% \foreach \i in {0,...,\y} \draw [pic actions/.try] ($(#1)!\i/\y!(#7)$) -- ($(#3)!\i/\y!(#5)$); \foreach \i in ...

2

This can be easily done with tikz-3dplot. You can change the color of each side as you wish. Also, you can see the cube from different angles (i.e. change the view angles in the code). Moreover, you can carry out the rotation around an arbitrary axis (i.e. see my answer my answer). \documentclass[border={10}]{standalone} \usepackage{tikz} ...

7

Here is my attempt. Initially I started looking for a solution similar to the one proposed by John Kormylo in his comment, and ended up using the decorations.markings library. I hope it is not such an overkill :-) ! In every case the grid is self-adapting, as you can see from the following images: My code is: \documentclass{standalone} ...

10

Here's one better way, using Metapost, using the point x of y notation. TikZ has the same idea, but using a rather more compact notation. With this set up you can move your four points as much as you like, and the grid will adapt itself accordingly. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); z1 = origin; z2 = (80,0); z3 = (96,80); z4 = ...

1

The present code should solve your problem: \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture} [ scale=6.0, very thick, line join=round, y={(-1cm,0.5cm)}, x={(1cm,0.5cm)}, z={(0cm,1cm)}, ] \coordinate (A1) at (0,0,0); \coordinate (A2) at (0,1,0); ...

1

TeXample.net can be a good resource. Here is something adapted from the Dandelin Spheres example. \documentclass[border=2mm]{standalone} \usepackage{tikz} \tikzset{ MyPerspective/.style={scale=1.8,x={(-1cm,0cm)},y={(1cm,0cm)}, z={(0cm,1.2cm)}} } \begin{document} \begin{tikzpicture}[MyPerspective] \foreach \t in {0,15,...,165}% ...

2

Your image can be simply drawn with help of trees TikZ library: \documentclass[border=3mm, tikz, preview]{standalone} \usetikzlibrary{arrows,shapes,trees} \usepackage[latin1]{inputenc} \begin{document} \begin{tikzpicture}[ every node/.style = {shape=rectangle, rounded corners, draw=blue!50, inner ...

3

I've rewritten the whole code to make it more manageable and readable. I've added the names of nodes in the diagram so that you can easily access the nodes in the code. Now you can easily change node distance=1cm if you want to increase or decrease the distance between nodes. \documentclass[border={10pt}]{standalone} \usepackage{tikz} ...

2

Perhaps this... \documentclass[tikz,border=5]{standalone} \usetikzlibrary{graphs,graphs.standard,arrows} \tikzgraphsset{ implies/.style={edges={double, double equal sign distance, -implies}}, not implies/.style={implies, edge node={ node [sloped, xscale=-1] {$\backslash$} } }, !/.style={not implies} } \begin{document} \tikz\graph [implies] { a ...

2

you can use double and implies (Note: the credit goes to @percusse for not implie command (i.e. degil). \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{graphs,decorations.pathmorphing,decorations.markings} \usetikzlibrary{arrows} \tikzset{degil/.style={ decoration={markings, mark= at position 0.5 with { ...

2

Load positioning library and change all of = to = of in the node specifications. Your problems will be solved. Always use this library for positioning as this is more accurate. Also, it is better to use tikzset instead of obsolete tikzstyle as I did. \documentclass{standalone} \usepackage[latin1]{inputenc} \usepackage{tikz} ...

22

\documentclass[border=2pt]{standalone} \usepackage{tikz,xcolor} \usetikzlibrary{calc} \definecolor{skyblue}{HTML}{B9E1FD} \begin{document} \begin{tikzpicture}[line width=.7pt, inner sep=7pt] \node [draw,rounded corners,dashed,fill=skyblue,text width=.6\textwidth] (B){% \bfseries Did you know? \par \bigskip Once upon a time ...

21

Using tcolorbox; adjust the settings according to your needs: The code: \documentclass[12pt]{article} \usepackage[many]{tcolorbox} \usepackage{graphicx} \definecolor{boxbg}{RGB}{179,222,255} \tcbset{ common/.style={ before=\vskip2\baselineskip\noindent, after=\vskip2\baselineskip, enhanced, colback=boxbg, frame code={}, ...

6

Not sure it is what is required, but here is a rectilinear decoration which sort of achieves the required effect: \documentclass[tikz,border=5]{standalone} \usetikzlibrary{decorations} \pgfdeclaredecoration{rectilinear}{start}{% \state{start}[width=\pgfdecorationsegmentlength/2, next state=draw above]{% \pgfpathmoveto{\pgfpointorigin}% ...

4


0

This can be done in Tikz. \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing, positioning, calc} \begin{document} \begin{tikzpicture}[blue] \node (A) {$\bf{P} \rightarrow F$}; \node (C) [below=of A] {$\bf{P'}$}; \node (B) [below=of A, ...

5

With tikz (decorations.pathreplacing library) \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} % define horizontal and vertical braces \newcommand{\horbrace}[4][->]{ \node (#2)[right of=#3]{$#2$}; \draw[#1](#2)--(#3); \draw [decorate,decoration={brace,amplitude=5pt},thick] (#2.south east) -- (#3.south ...

6

It's not a nice code but it may work \documentclass{article} \usepackage{mathtools} \begin{document} $\overset{\underbrace{p \to F}}{\quad\left.\begin{matrix}F'\\ \uparrow\\ p'\end{matrix}\right\}} \underbrace{F''\leftarrow p''}_{\quad\left.\begin{matrix}F'''\\ \uparrow\\ p'''\end{matrix}\right\}\displaystyle\mathrlap{\dots}}$ \end{document} ...

1

Here's a version in Metapost. It's mainly an exercise in the use of textual pictures and bounding boxes. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); % units u = 1cm; v = 18pt; % labels picture dig[], lab[]; dig1 = btex \strut\hbox to 1em{\hss 0\hss} etex shifted ( -u,0); dig2 = btex \strut\hbox to 1em{\hss 0\hss} etex shifted (-2u,0); ...

4

Here's one option: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,shapes.multipart} \newcommand\BoxInfo[2]{\makebox[2.3cm][l]{#1}\makebox[4cm][l]{(#2)}} \begin{document} \begin{tikzpicture}[node distance=1cm and 10pt] \node (b1) {$0$}; \node[left=of b1] (b2) {$0$}; \node[left=of b2] (b3) {$00$}; \node[left=of b3] (b4) ...

3

You already did it all the work, so I just will explain what I've changed in your code. You used tikset which has been deprecated in front of tikzstyle (see: Should \tikzset or \tikzstyle be used to define TikZ styles?). The second big change was to replace right of = syntax by the new right= of from positioning library (section "17.5.3 Advanced Placement ...

2

Here is a pstricks solution: \documentclass[a4paper,11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}% \usepackage{fourier} \usepackage{pst-node} \usepackage{auto-pst-pdf} \pagestyle{empty} \begin{document} \psset{arrows=<-, arrowinset=0.15, shortput=nab, labelsep=2pt} \[ \begin{psmatrix}[ colsep = 1.2] ...

2

This can be done using TikZ in a number of different ways. Here's an example using chains: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{chains} \begin{document} \begin{tikzpicture}[ mynode/.style={ draw, minimum size=1em }, every loop/.append style={-latex}, start chain=going right ] \foreach \Value in {1,...,5} ...

3

The basic concept is explained in Drawing on an image with TikZ. Add the image in a named TikZ node, and place stuff relative to that. (When you know the text should be in a corner there is no need to use the fancy stuff with the scope environment seen in the answers to that question.) To allow for line breaking, set the text width and/or the align of the ...

4

The pstricks way: \documentclass{standalone} \usepackage{mathtools} \usepackage{pst-node} \usepackage{auto-pst-pdf} \usepackage{mathrsfs} \begin{document} $\psset{arrows=->, arrowinset=0.15, linewidth=0.6pt, nodesep=3pt, rowsep=1cm, colsep=1cm} \everypsbox{\scriptstyle} \begin{psmatrix}[mnode = R] %%% nodes 0 & H^0(X, \mathscr G) & ... 5 Taking from Stefan's code for http://tex.stackexchange.com/a/95826/3929 \documentclass{article} \usepackage{tikz-cd} \usepackage{amsmath} \usepackage{calrsfs} \begin{document} \begin{tikzcd} 0 \rar & H^0(X,\mathcal{G}) \rar & H^0(X,\mathcal{O}_X(-m)^{\oplus N}) \rar & H^0(X,\mathcal{F}) \ar[out=0, in=180, looseness=2, overlay]{dll} ... 2 Below I show some possibilities: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) -- (13,0); \foreach \x in {0,2,4,6,8,12,13} \draw (\x cm,3pt) -- (\x cm,-3pt); \draw (0,0) node[below=3pt] (a) {$(i)\$} node[above=3pt] {}; \draw (2,0) ...

1

There is also the psmatrix solution, from pst-node. Here are two ways of writing this diagram. As opposed to tikz-cd, the structure of the code describes first the nodes, then the arrows; \documentclass[11pt]{amsart} \usepackage{mathtools} \usepackage{pst-node} \usepackage{auto-pst-pdf} \begin{document} \psset{linewidth=0.6pt, arrowinset=0.2, ...

2

As egreg mentions in his comment, tikz-cd makes the arrows extend to fill the available space and (I agree with him) this is a desirable feature. Regarding the second part of the question, you can use \tikzcdset to pass options to the path /tikz/commutative diagrams so they will affect all tikzcd diagrams; in the case of your question, you can use shorten: ...

3

An alternative approach is to use Metapost to create an external graphic and include it with includegraphics. Here's a version using the AMS Euler font to preserve something of the hand-drawn lettering. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 5mm; z.A = -z.M = (4u,u); z.C = -z.B = (u,u); z.D = -z.P = (-4u,u); z.E = -z.H = ...

12

And here's a version in Metapost for comparison. This exploits a feature of buildcycle with two circular paths that was discussed in my answer to this quesion. prologues := 3; outputtemplate := "%j%c.eps"; color venn_color; venn_color = 0.8[blue,white]; vardef venn(expr p, q, r, s) = save a, b, c, d, f, u; path a,b,c,d, f[]; u = 1cm; f1 = fullcircle ...

25

No clipping or even-odd-rule required: \documentclass[tikz,border=5]{standalone} \tikzset{% v 0/.style={fill=white}, v 1/.style={fill=blue!30}, pics/venn/.style args={#1#2#3#4}{code={% \fill [v #1/.try] (-2,-1.5) rectangle (2,1.5); \fill [v #2/.try] (90:sin 60) arc (120:-120:1) arc (-60:60:1); \fill [v #3/.try] (90:sin 60) arc (60:300:1) ...

5

You can use baseline option to tikzpicture \newcommand{\venn}[1]{% \begin{tikzpicture}[scale=0.15,baseline={(current bounding box.center)}] This will give In your approach using \raisebox, you have an extra space before the closing brace: \raisebox{-.35\height}{\venn{0010} } which should be \raisebox{-.35\height}{\venn{0010}} %<-- no space here ...

13

The areas in the diagrams are drawn with a combination of clip and fill commands. Each bit position encodes one of the four intersection free areas of the diagram. These areas are drawn independently. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\w{1.35} \def\h{1} \pgfmathsetmacro\rad{\h*.35} \def\sep{.2} ...

16

Well you can just remove the (C) and you are done \documentclass{article} \usepackage{tikz} \makeatletter \def\venn@strip#1#2\venn@STOP{\def\venn@next{#1}\gdef\venn@rest{#2}} \newcommand{\venn}[1]{% \begin{tikzpicture}[scale=0.2] \coordinate (A) at (0,0); \coordinate (B) at (2,0); \coordinate (S-SE) at (5,-3); \coordinate (S-NW) at (-3,{sqrt(3)+3}); ...

6

And here with tikz-cd: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[every arrow/.append style={dash,shorten >= -.1cm,shorten <= -.1cm},column sep={1cm,between origins}] L \arrow{rrrrrrr}\arrow{dd}\arrow{drrrr} &[-.5cm] &[-.5cm] & & & &[-.5cm] &[-.5cm] N \arrow{dd} \\ ...

2

This can be easily done with done with tikz/pgf. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} % left \node (f) at (0,0) {F}; \node (d) at (1,1) {D}; \node (k) at (2,0) {K}; \node (m) at (1,-1) {M}; % middle \node (e) at (3,1) {E}; \node (c) at (4,1) {C}; \node (b) at (3,-1) {B}; ...

6

One solution, without tikz-cd, would be to just use tikz nodes \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} \begin{document} \pagestyle{empty} \begin{tikzpicture}[auto] \node(L) at (0,0) {L}; \node[below of=L, node distance=2cm](F){F}; \node[below of=F, node distance=2cm](O){O}; ...

6

I present an alternative, more concise solution using the tikz-cd package that was made for commutative diagrams and has (in my opinion) very clear and simple syntax. With a bit of naive trickery, the spacing is also easily adjusted to yield whatever one likes: \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} ...

18

Since it's a tree, here's a possibility using the forest package; the code is considerably shorter now and you have the desired control over the separation of the two lower elements using, for exmaple, the calign options (see lines commented out in my example code): \documentclass{article} \usepackage{forest} \begin{document} \begin{forest} for ...

7

This does not yet adjust the positioning but is more concise: \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{chains,scopes} \begin{document} \begin{tikzpicture}[start chain=main going right, every on chain/.append style={join}, every join/.append style={->}] \node [on chain] (wrijving) {wrijving}; \node [on chain] (lading) ...

Top 50 recent answers are included