Tag Info

Hot answers tagged

12

Just playing around without really knowing what I am doing... \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \filldraw[fill=orange,line width=1pt] (0,0) -- (1,1) -- (1.05,.7) -- (7.5,0) -- (1.3,-.7) -- (1.35,-1) -- cycle; \filldraw[fill=orange,line width=1pt] (12.1,-.7) -- (11.85,.7) -- (4.7,.4) -- cycle; ...


9

\documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture} [scale=.8,auto=left,every node/.style={circle,fill=blue!20}] \node (n1) at (9,8) {1} edge [in=100,out=80,loop] (); \node (n2) at (6,7) {2} edge [in=150,out=130,loop] (); \node (n3) at (5,5) {3} edge ...


6

If you are happy with circular placement things get pretty simplified with foreach loops for n>4 nodes. Then you need to tweak the loop drawing which is also possible but I got a little bored :P \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}\def\myn{9} \foreach \x in {1,...,\myn}{\node[circle,fill=blue!20,inner sep=1pt] (n\x) at ...


5

\documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation*} \pi_1(X,x_0) \xrightarrow{\mathmakebox[1.5cm]{f_{x_0}}} \pi_1(Y,y_0) \xrightarrow{\mathmakebox[1.5cm]{g_*}} \pi_1(X,x_1) \xrightarrow{\mathmakebox[1.5cm]{f_{x_1}}} \pi_1(Y,y_1) \end{equation*} \end{document}


5

Here are two options: \documentclass{article} \usepackage{mathtools} \newcommand{\lbarrow}{\mathrel{{\ooalign{$\rightarrow$\cr\hidewidth$($\hidewidth}}}} \newcommand{\rbarrow}{\mathrel{{\ooalign{$\rightarrow$\cr\hidewidth$)$\hidewidth}}}} \makeatletter \newcommand{\lrparen}[1]{% \settowidth{\@tempdima}{#1}% ...


5

I'd consider this a bug both in unicode-math, which should provide a good equivalent of \std@minus when amsmath is loaded and of Latin Modern Math, that doesn't provide a glyph for \harrowextender (U+23AF HORIZONTAL LINE EXTENSION). See the related question Why fontspec breaks extarrows package For your problem, you can do \documentclass{article} ...


4

The relevant line is \path [line] (decision1.south) -- +(0,-10pt) -| node [near start] {No} ([xshift=20pt, yshift=-5pt]my coord)|- (decision3.west); Complete code: \documentclass{article} \usepackage{tikz} \usepackage{fixltx2e} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning} \usepackage[active,tightpage]{preview} ...


4

This doesn't look like the image but your code suggests that you are modifying it somewhat and I worked with that. \documentclass{article} \usepackage{tikz} \usepackage{subcaption} \usepackage[scale=.8]{geometry} \usetikzlibrary{positioning,arrows} \tikzset{ block/.style={ draw, rectangle, minimum height=1.5cm, minimum width=3cm, ...


3

Just the basics, a lot needs to be parametrized to make a decent solution but the following shows one way using a decoration and the \pgfnodepositionlater trick. As I've used the node contents key, this requires the latest PGF release: \documentclass[tikz,border=5]{standalone} \usetikzlibrary{decorations} \def\pgfdimgetwidth{% ...


3

A solution not using the library but made by hand. \documentclass[margin=10px]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[fill=gray,line width=1pt] (0:1cm) arc (0:-180:1cm) -- (-180:1.25cm) -- (-.75,.75) -- (-180:.25cm) -- (-180:.5cm) arc (-180:0:.5cm)--cycle; \end{tikzpicture} \begin{tikzpicture} ...


2

Maybe something like this? \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} [scale=.8,auto=left,every node/.style={circle,fill=blue!20}] \node (n1) at (9,8) {1}; \node (n2) at (6,7) {2}; \node (n3) at (5,5) {3}; \node (n4) at (6,3) {4}; \node (n5) at (9,2) {5}; \node (n6) at (12,3) ...


2

Can you use arrows.meta TiKZ 3.0 library? Is it the inset value for your arrows 0 like in LaTeX (latex) kind of arrows? If your answer was yes to both questions you can use an arrow like -{.Latex}. In arrows.meta syntax . forces the line to stop just before the arrow tip. Next figure shows the result, top most arrows is declared with -{.Latex} and the ...


2

The hooked arrow in xy is one of the ugly parts of this package. It just looks wrong. You could write this issue to the maintainer (if still active) or you switch to the more modern and much easier (to read) tikz-cd. In my MWE I am showing both in order to show the difference between their hooked arrows: % arara: pdflatex \documentclass{article} ...


1

One possibility: \documentclass{article} \usepackage{tikz} \usepackage{fixltx2e} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt}% %%%> \begin{document} \pagestyle{empty} % Define block styles \tikzstyle{decision} = [diamond, draw, ...


1

Here I \stackinset a paren within the horizontal extent of the \rightarrow. The horizontal placement of the paren is controlled by the 2nd parameter to \stackinset. By using the {c} anchors, the horizontal (2nd argument) and vertical (4th argument) offsets are taken relative to the center of the \rightarrow. \documentclass{article} ...


1

You can get the arrows to be at the same vertical height it you apply a \vphantom{<text>} with <text> being the tallest content, and if you want them to be the same width you can typeset the content into a fixed width \makebox. In this case x^2 is the tallest content, so we get: In the above, I fixed the width of the \makebox to be 2.0em. ...



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