I have tried some of the solutions to similar questions, but none of them included minipages, which seems to be the problem (I`m fairly new to LaTeX)  So, here's the coding:  % Definition of circles \def\firstcircle{(0,0) circle (1.5cm)} \def\secondcircle{(0:2cm) circle (1.5cm)}  \colorlet{circle edge}{black!50} \colorlet{circle area}{grey!20}  \tikzset{filled/.style={fill=circle area, draw=circle edge, thick},     outline/.style={draw=circle edge, thick}}  \setlength{\parskip}{5mm}  % Set A or B \begin{tikzpicture} \begin{minipage}[t][2cm][t]{.48\textwidth}     \draw[filled] \firstcircle node {$A$}                   \secondcircle node {$B$};     \node[anchor=south] at (current bounding box.north) {$M$}; \end{minipage} \end{tikzpicture} % Set A and B \begin{tikzpicture} \begin{minipage}[t][2cm][t]{.48\textwidth}     \begin{scope}         \clip \firstcircle;         \fill[filled] \secondcircle;     \end{scope}     \draw[outline] \firstcircle node {$A$};     \draw[outline] \secondcircle node {$B$};     \node[anchor=south] at (current bounding box.north) {$M$};     \node[anchor=west] at (current bounding box.east) {$A \cap B$} \end{minipage} \end{tikzpicture}     Also, if you know how to put the "B" in the center of the circle on the right I`d appreciate your help! Thank you.
44163
How can I add a centered caption to the venn-diagram below the rectangle?   \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \draw (-2,-1.5) rectangle (3.5,1.5) node[below left]{$U$}; \fill[gray] (0,0) circle (1cm); \fill[gray] (1.5,0) circle (1cm); \draw (0,0) circle (1cm) node {$A$}; \draw (1.5,0) circle (1cm) node {$B$}; \end{tikzpicture} \end{center} \end{document}
1962
I tried to use Tikz to draw large graphs with specific toologies and I am running into some problems. Since not all nodes can be represented explicitly, I am forced to use an ellipsis. I tried to define this ellipsis as a node, but the dots appear horizontally and not as shown in figure, i.e., it would be great if the ellipsis are three adjacent points on  the circumference of the circle where other nodes rest.  The same problem arises even when I have a complete graph. Can someone help me out with this? Thanks!     Code so far:  \begin{tikzpicture}[-&gt;,&gt;=stealth', shorten&gt;=1pt, auto, node distance=2.8cm, semithick]  \tikzstyle{peer}=[draw,circle,violet,bottom color=\lav, top color= white, text=violet, minimum width=8pt]  \tikzstyle{superpeer}=[draw, circle, burntorange, left color=\oran, text=violet, minimum width=25pt]   \node[superpeer] (A) {$0$};   \node[peer]         (B)  at ($ (A) + (20:4) $) {$1$};   \node[peer]         (C)  at ($ (A) + (-52:4) $) {$2$};   \node[peer]         (D)   at ($ (A) + (-124:4) $){$3$};   \node[draw=none] (F)  at ($ (A) + (-176:4) $){$\cdots$};     \node[peer] (E) at ($ (A) + (92:4) $) {$N$};    \path (A) edge [color=blue, sloped] node[]{$\lambda_{01}, \mu_{01}$} (B);   \path (A) edge [color=blue, sloped] node[] {$\lambda_{02}, \mu_{02}$} (C);   \path (A) edge [color=blue, sloped] node[] {$\lambda_{03}, \mu_{03}$}(D);   \path (A) edge [color=blue, sloped, below] node[] {$\lambda_{0N}, \mu_{0N}$} (E);   \path (B) edge [color=blue, sloped] node[] {$\lambda_{10}, \mu_{10}$}(A);   \path (C) edge [color=blue, sloped] node[] {$\lambda_{20}, \mu_{20}$}(A);   \path (D) edge [color=blue, sloped] node[] {$\lambda_{30}, \mu_{30}$}(A);   \path (E) edge [color=blue, sloped, above] node[] {$\lambda_{N0}, \mu_{N0}$}(A); \end{tikzpicture}
71228
I asked a question  but, rather stupidly, added extra information after it had been answered.  My additional question is this: I have a table with varying lengths of words. I want to encircle different groups of cells, including diagonals. If possible, it would be great if the rectangles don't overlap each other where possible.  I looked at the answer , which, whilst tedious, worked except for the overlap.    This is where I've got to so far:  \documentclass[fleqn,12pt,a4paper,landscape]{article}  \usepackage{tikz} \usepackage{tabularx}  \begin{document}  % Introduce a new counter for counting the nodes needed for circling \newcounter{nodecount} % Command for making a new node and naming it according to the nodecount     counter \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node     (\arabic{nodecount}) {#1};}  % Some options common to all the nodes and paths \tikzstyle{every picture}+=[remember picture,baseline] \tikzstyle{every node}+=[inner sep=0pt,anchor=base, minimum width=1.8cm,align=center,text depth=.25ex,outer sep=1.5pt] \tikzstyle{every path}+=[thick, rounded corners]  \begin{table}[ht]   \begin{minipage}[b]{1 \linewidth}\centering    \begin{tabular}{cccccc} % Turn the cells needed for defining the circling paths into nodes with our     custom command \tabnode{Long ago}&amp; \tabnode{A few days ago}&amp; \tabnode{Day before         yesterday}&amp; \tabnode{Yesterday} &amp;  &amp;  \\      &amp; &amp; &amp;  &amp; \tabnode{Today} &amp; \tabnode{Now}\\      \tabnode{Long time in the future}&amp; \tabnode{A few days on}&amp;     \tabnode{Day after tomorrow}&amp; \tabnode{Tomorrow} &amp;  &amp; \\      \end{tabular}    \end{minipage}   \begin{tikzpicture}[overlay] % Define the circle paths \draw [blue](1.north west) -- (1.north east) -| (7.north east) |- (7.south     west) |- (1.north west); \draw [red](8.south west) -| (2.north east) -| (2.south west) |- (8.south     west); \draw [yellow](9.south west) -| (3.north east) -| (3.south west) |- (9.south     west); \draw [green](8.south west) -| (3.north east) -| (2.south west) |- (8.south     west);   \end{tikzpicture}  \end{table} \end{document}  %%% Local Variables:  %%% mode: latex %%% TeX-master: t %%% End:
82513
I am using the TikZ package to show a set of complex numbers where those I want are in the outer part of a circle with a radius 2, and where the circle with radius 1 is not in the set:   I want to let the inner circle be white, with the axes showing completely, but I am not able to find out how. I am using two circles with semi-transparent fillings. Is there any way to make only the outer part filled? Relevant code below.  (This is where I got most of the code: )  \begin{tikzpicture}     \begin{scope}[thick,font=\scriptsize][set layers]     \draw [-&gt;] (-4,0) -- (4,0) node [above left]  {$\Re\{z\}$};     \draw [-&gt;] (0,-4) -- (0,4) node [below right] {$\Im\{z\}$};     \iffalse% Single     \draw (1,-3pt) -- (1,3pt)   node [above] {$1$};     \draw (-1,-3pt) -- (-1,3pt) node [above] {$-1$};     \draw (-3pt,1) -- (3pt,1)   node [right] {$i$};     \draw (-3pt,-1) -- (3pt,-1) node [right] {$-i$};     \else% Multiple     \foreach \n in {-3,...,-1,1,2,...,3}{%         \draw (\n,-3pt) -- (\n,3pt)   node [above] {$\n$};         \draw (-3pt,\n) -- (3pt,\n)   node [right] {$\n i$};     }     \fi     \end{scope}     \draw[solid] (0,-1) circle (1);     \draw[solid] (0,-1) circle (2);     \path [draw=none,fill=gray, fill opacity = 0.1] (0,-1) circle (2);     \path [draw=none,fill=white, fill opacity = 0.7] (0,-1) circle (1);     \node [below right,black] at (1.2,1.2) {$A=\{z\in\mathbb{C}:1\leq|z-(-i)|\leq2\}$}; \end{tikzpicture}
73796
I am using this LaTeX code to generate three tables side by side. However, it showing errors and not giving satisfactory result. Can anyone please help me to short out the problem.  \begin{table} \centering \makebox[0pt][c]{\parbox{1.2\textwidth}{% \begin{minipage}[b]{0.265\hsize}\centering \begin{tabular}{ | c | c |c | } \multicolumn{3}{c} \hline {$q=1/10$} \\ \hline T &amp; $r_h$ &amp; $\omega$ \\  \hline 0.233 &amp; 0.135 &amp; 2.38486-0.34667I  \\  0.256 &amp; 0.140 &amp; 2.38092-0.35837I \\ 0.273 &amp; 0.145 &amp; 2.38049-0.35982I \\  0.278 &amp; 0.146 &amp; 2.38007-0.36130I \\  0.281 &amp; 0.147 &amp; 2.37964-0.36282I \\  \hline 0.284 &amp; 0.761 &amp; 2.54150-2.03209I \\ 0.285 &amp; 0.765 &amp; 2.54515-2.04292I \\ 0.289 &amp; 0.800 &amp; 2.57799-2.13761I \\ 0.302 &amp; 0.900 &amp; 2.67987-2.40712I \\ 0.312 &amp; 1.000 &amp; 2.79214-2.67552I \\ \hline \end{tabular} \end{minipage} \hfill \begin{minipage}[b]{0.265\hsize}\centering \begin{tabular}{ | c | c | c | } \multicolumn{3}{c} \hline {$q=1/9$} \\ \hline T &amp; $r_h$ &amp; $\omega$ \\ \hline 0.227 &amp; 0.150 &amp; 2.34385-0.41094I  \\  0.245 &amp; 0.155 &amp; 2.34215-0.41723I \\ 0.260 &amp; 0.160 &amp; 2.34056-0.42416I \\  0.271 &amp; 0.165 &amp; 2.33908-0.43175I \\  0.276 &amp; 0.167 &amp; 2.33852-0.43497I \\  \hline 0.280 &amp; 0.720 &amp; 2.50248-1.92299I \\ 0.283 &amp; 0.750 &amp; 2.52893-2.00424I \\ 0.286 &amp; 0.780 &amp; 2.55660-2.08533I \\ 0.289 &amp; 0.800 &amp; 2.57568-2.13931I \\ 0.302 &amp; 0.900 &amp; 2.67807-2.40842I \\ \hline \end{tabular} \end{minipage} \hfill \begin{minipage}[b]{0.265\hsize}\centering \begin{tabular}{ | c | c | c |} \multicolumn{3}{c} \hline {$q=1/8$} \\ \hline T &amp; $r_h$ &amp; $\omega$ \\  \hline 0.246 &amp; 0.180 &amp; 2.29733-0.50611I  \\  0.255 &amp; 0.185 &amp; 2.29654-0.51364I \\ 0.263 &amp; 0.190 &amp; 2.29589-0.52172I \\  0.269 &amp; 0.195 &amp; 2.29534-0.53033I \\  0.273 &amp; 0.199 &amp; 2.29496-0.53758I \\  \hline 0.275 &amp; 0.675 &amp; 2.46067-1.80426I \\ 0.277 &amp; 0.700 &amp; 2.48131-1.87194I \\ 0.288 &amp; 0.800 &amp; 2.57245-2.14170I \\ 0.302 &amp; 0.900 &amp; 2.67555-2.41027I \\ 0.317 &amp; 1.000 &amp; 2.78870-2.67796I \\ \hline \end{tabular} \end{minipage}% }} \end{table}
63680
I am interested in outputting  this graph in  latex using tikz:    So far I got this:    and my tikz code is   \begin{tikzpicture}     \node[shape=circle,draw=black] (A) at (0,0) {A};     \node[shape=circle,draw=black] (B) at (0,3) {B};     \node[shape=circle,draw=black] (C) at (2.5,4) {C};     \node[shape=circle,draw=black] (D) at (2.5,1) {D};     \node[shape=circle,draw=black] (E) at (2.5,-3) {E};     \node[shape=circle,draw=black] (F) at (5,3) {F} ;      \path [-&gt;] (A) edge node[left] {$5$} (B);     \path [-&gt;](B) edge node[left] {$3$} (C);     \path [-&gt;](A) edge node[left] {$4$} (D);     \path [-&gt;](D) edge node[left] {$3$} (C);     \path [-&gt;](A) edge node[right] {$3$} (E);     \path [-&gt;](D) edge node[left] {$3$} (E);     \path [-&gt;](D) edge node[top] {$3$} (F);     \path [-&gt;](C) edge node[top] {$5$} (F);     \path [-&gt;](E) edge node[right] {$8$} (F);    \end{tikzpicture}   I want to know how to draw the arc between nodes B and E and also thicker  arcs with their lengths in center. Any help is appreciated
62360
I used some of the solution proposed in this post:    and my code is as follows:  \documentclass{standalone} \begin{document}  \begin{tabular}{c*{11}{@{\,}c}}       2&amp;:&amp;7&amp;=&amp;0&amp;,&amp;$\overline{2}$&amp;$\overline{8}$&amp;$\overline{5}$&amp;$\overline{7}$&amp; $\overline{1}$&amp;$\overline{4}$       \\       {\color{red} 2} &amp;{\color{red} 0 } &amp; &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp; \\       1 &amp; 4 &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\  \cline{1-2}        &amp; 6&amp; 0 &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\        &amp; 5 &amp; 6 &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\   \cline{2-3}        &amp;  &amp; 4 &amp; 0 &amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\        &amp;  &amp; 3 &amp; 5 &amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\  \cline{3-4}        &amp;  &amp;      &amp; 5 &amp; 0 &amp;&amp;&amp;&amp;&amp;&amp; \\        &amp;  &amp;      &amp; 4 &amp; 9 &amp;&amp;&amp;&amp;&amp;&amp;  \\  \cline{4-5}        &amp;  &amp;      &amp;   &amp; 1 &amp; 0 &amp;&amp;&amp;&amp;&amp; \\        &amp;  &amp;      &amp;   &amp;   &amp; 7 &amp;&amp;&amp;&amp;&amp; \\ \cline{5-6}        &amp;  &amp;      &amp;   &amp;   &amp; 3 &amp; 0 &amp;&amp;&amp;&amp; \\        &amp;  &amp;      &amp;   &amp;   &amp; 2 &amp; 8 &amp;&amp;&amp;&amp; \\  \cline{6-7}        &amp;  &amp;      &amp;   &amp;   &amp;   &amp; { \color{red} 2} &amp;{\color{red} 0} &amp;&amp;&amp;     \end{tabular} \end{document}   The goal is to show the repeating decimal part with overline over the repeating decimals. The code does that, but each decimal is overlined in isolation, but I want a continuous overline!  But that does seem to infer with the mechanics of tabular ...
84002
I'm writing a manual for a class, and I never liked add images as files in my tex, so I'm drawning the logo with this code:   \documentclass{article} \usepackage{tikz} \begin{document} \definecolor{xdxdff}{rgb}{0.5,0.5,1.} \definecolor{qqqqff}{rgb}{0.,0.,1.} \definecolor{cqcqcq}{rgb}{0.75,0.75,0.75} \begin{tikzpicture} \clip(-4.42,-1.90) rectangle (8.03,4.69); \draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm); \draw [color=white,fill=white,fill opacity=1.0] (-0.66,1.71) circle (1.92cm); \draw [shift={(-0.05,2.21)},color=red]  plot[domain=2.01:4.03,variable=\t]({1.*1.40*cos(\t r)+0.*1.40*sin(\t r)},{0.*1.40*cos(\t r)+1.*1.40*sin(\t r)}); \draw [shift={(-1.60,0.27)},color=red]  plot[domain=-0.48:0.92,variable=\t]({1.*1.08*cos(\t r)+0.*1.08*sin(\t r)},{0.*1.08*cos(\t r)+1.*1.08*sin(\t r)}); \draw [shift={(-1.26,1.06)},color=red]  plot[domain=-1.12:0.68,variable=\t]({1.*1.43*cos(\t r)+0.*1.43*sin(\t r)},{0.*1.43*cos(\t r)+1.*1.43*sin(\t r)}); \draw [shift={(0.42,3.0)},color=red] plot[domain=2.72:4.22,variable=\t]({1.*1.18*cos(\t r)+0.*1.18*sin(\t r)},{0.*1.18*cos(\t r)+1.*1.18*sin(\t r)}); \end{tikzpicture} \end{document}   which gives me this image   How can I color red the thing in middle?
38916
I have the following code:  \documentclass[11pt]{article} \usepackage[a4paper]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance = 0.5cm, auto] \node (0) {Block 0}; \node (1) [below= of 0.south] {Block 1}; \node (2) [below= of 1.south] {Block 2}; \end{tikzpicture} \end{document}   It prints this:    I tried to do the same with pgf loop, but don't know how to decrease the counter:  \foreach \x in {0,...,2} {   \ifnum\x=0\relax       \node (\x) {Block \x};   \else       %\prev=\x - 1 &lt;- ???       \node (\x) [below= of \prev.south] {Block \x};   \fi }
95450
Here is the minimum working example:  \documentclass{article} \usepackage{tikz} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{textcomp} \usetikzlibrary{shapes,positioning} \begin{document} \centering \begin{tikzpicture}   \node[draw] (PersonLocation Graph) {     \begin{minipage}{.85\linewidth} \begin{lstlisting}[language=XML,escapechar=!]   &lt;collection name=PersonLocation BiMap&gt;   &lt;edge&gt;    &lt;ref&gt;//collection[name=Locations]/loc[name=XXYY]   ! \tikz \node[shape=circle,draw](srchead) {H};!   &lt;/ref&gt;   &lt;ref&gt;//collection[name=Persons]/person[id=4564]   ! \tikz \node[shape=circle,draw](deshead) {E};      %(srchead) edge[&lt;-&gt;, bend left] (deshead.south);    !     &lt;/ref&gt;    &lt;/edge&gt;   ...   ...   ...   &lt;/collection&gt; \end{lstlisting} \end{minipage}  }; \end{tikzpicture} \end{document}   I want to draw an edge from node H to E. I tried  using statement srchead) edge[&lt;->, bend left] (deshead.south); (commented out in the code). Thanks in advance for your input.
108078
I am trying to create a kind of pseudocode in Latex resembling the one shown below .   What I tried is:  1. Convert R to a binary region using the threshold $\theta_{0}$\\  2. Assume N is the sum of the number of non-zero pixels within $F_{l}$ and $F_{r}$.\\  3. If N is larger than a predefined threshold $\beta$, then\\              \begin{center}             $\theta_{0} = \theta_{0} + \Delta\theta$\\             Repeat the procedure from step 1             \end{center}    Else              \begin{center}             $\theta = \theta_{0}$             \end{center}    End   Its not turning out like I want though. Can anyone please suggest how to fix this?
77269
How do I let circle borders only grow to the outside? If I write  \node[circle, draw, minimum size=2cm, line width=4mm] {};   Then the inside of the circle has a diameter of 16mm, since 2mm of the 4mm grow inside the 2cm and 2mm of the 4mm grow outside of the 2cm. How do I get the circle to only grow to the outside? The trivial answer would be  \node[circle, draw, minimum size=2cm+4mm, line width=4mm] {};   Is there a better way of doing it? (Meaning a command that is intended for this?)
11829
Why the arc does not fit over the circle if we use -latex arrow tip? Maybe some bug or some bad math computations?    MWE  \documentclass[11pt,margin=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta}  \begin{document} \begin{tikzpicture} \draw         (0:1cm) arc (0: 180:1cm) arc (180:0:1cm and 2cm); \draw         (0:1cm) arc (0:-180:1cm); \draw[-&gt;]     (0:1cm) arc (0:  80:1cm); \draw[-latex] (0:1cm) arc (0:- 80:1cm); \end{tikzpicture} \end{document}
116976
I'm writing a Java app to generate tries for Latex using TikZ.  I'm struggling to typeset a  to follow example below:    Could someone provide me with an example how to properly nest children nodes and corresponding labels.  What I got now is:  \begin{tikzpicture} \node [circle] {}     child{ node [circle] {} edge from parent node[above left] {$B$} }     child{ node [circle] {} edge from parent node[above left] {$F$}             child [circle] {}         };  \end{tikzpicture}   But edge labels won't match to the right edges.
76108
When I tried to compile:  \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[very thin, red] (0,0) circle (2); \foreach \i in {0, 1, 2, ..., 46} \draw[very thin, red] ({360 * \i / 100}:1) circle (1); \end{tikzpicture} \end{document}   I got:  ! Dimension too large. &lt;recently read&gt; \pgfmath@x   l.6 ...thin, red] ({360 * \i / 100}:1) circle (1);  I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can.   And if I turn 46 to 45, say \foreach \i in {0, 1, 2, ..., 45}, that code will pass the compiling.  It seems that some value I was trying to calculate is larger than the TeX engine can handle.   After searching TeX.SX for about half an hour, I got ,  and . These questions have been solved, however, the origin and structure of the problem still remain unclear. Hence, I decide to raise this question: what is the limit (its origin and formation), and how can I avoid it.  Any clues would be appreciated.
39928
I am writing an Article in LaTeX.  Please suggest me how to create a highlight boxes like the ones shown below in LaTeX:
41863
Questions:   Why are the top corners of this number line missing? Why aren't the bottom corners or any other corners of this number line missing? How do I ensure the corners are always there?     \documentclass{article}  \usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry} \usepackage{tikz}   \begin{document}  \begin{tikzpicture}[line width=0.08cm]  \draw (0,0)--(5,0); \draw (0,0.3)--(5,0.3);  \foreach \x in {0,...,5}  {  \node at (\x,-0.55) {\x};  \draw (\x,-0.3)--(\x,0.3);  }  \foreach \x in {0,...,5}  \draw (\x,0)--(\x,0.3);  \end{tikzpicture}  \end{document}   That code yields this: