I use the following code to fill a specific area with dots. Can the dots positions be randomized, and can the dots size be altered.      \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{tikz} \usepackage{pgfplots} \usepackage{tkz-fct} \begin{document} \begin{frame}[fragile,t] \frametitle{} \begin{tikzpicture}[scale=.9, transform shape] \fill[pattern=dots,pattern color = blue] (1.,.46) -- ++ (4.,1.66) -- ++ (-.6,.8) -- ++ (-3.68,-1.84) -- cycle; \end{tikzpicture} \end{frame} \end{document}
44123
I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape.  The density should be like what you see on this page  with values 80-100. (But I do not need so many circles, 30 should be enough, I could repeat the pattern).   I cannot use a grid and "wobble" the circles a bit: The circles are too large and it simply does not look randomly.   Currently I am thinking about a random attempt: Get some random point, measure its distance to existing circles, either paint or throw the point away. Try 100 times and hope that you get the right number of circles (and that it does not take too long). But perhaps someone has a better idea.   The example draws the circles simply manually:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document}   \begin{tikzpicture}[framed,gridded,radius=0.5cm]  \draw[red](0,0) rectangle (5,5);   \draw (1,1) circle;   \draw (2.3,1.1) circle ;   \draw (4.5,0.8) circle ;   \draw (5.1,1.8) circle ;   \draw (0.4,3.3) circle ;   \draw (2.1,2.8) circle ;   \draw (3.8,3.5) circle ;   \draw (4.8,4.2) circle ;   \draw (0.8,4.9) circle ;   \draw (2.1,4.1) circle ;   \draw (3.8,2.0) circle ;   \draw (3.5,0.6) circle ;   \draw (3.0,5.0) circle ;      \draw (4.1,5.1) circle ;             \draw (0.9,2.1) circle ;  \end{tikzpicture}  \end{document}
15262
So I am trying to insert a functioning tikz image into a beamer project and it keeps giving me an error.  \documentclass{beamer} \usetheme{Warsaw} \usepackage{tikz} \usetikzlibrary{shapes,trees,positioning} \begin{document} \begin{frame}{Examples} \begin{center} \begin{tikzpicture}[level/.style={sibling distance=60mm/#1},minimum size=20pt,scale=.8, every node/.style={transform shape}] % If you want to scale the picture insert ``scale= (something), every node/.style={transform shape}'' Ex:[level/.style={sibling  distance=60mm/#1},minimum size=20pt,scale=.8, every node/.style={transform shape}] would  scale to 80% of original size \node [circle,draw] (z){\textbf{$u$}}   child {node [circle,draw,fill=black,text=white] (a) {\textbf{$v$}}     child {node [circle,draw,fill=black,text=white] (c) {}}     child {node [circle,draw] (d) {}     }   }   child {node [circle,draw,fill=black,text=white] (b) {\textbf{$w$}}     child {node [circle,draw,fill=black,text=white] (e) {}}      child {node [circle,draw] (f) {}}   }; \end{tikzpicture} \end{center} \end{frame} \end{document}   The error I keep getting is:   ./SDN Presentation.tex:61: Illegal parameter number in definition of \iterate. &lt;to be read again&gt;                     1 l.61 \end{frame}   If I delete the /#1 at the beginning of the picture I get an image though not the one I am looking for.  Not sure how to fix this issue since the code works for the amsart document class.
11547
\begin{tikzpicture} \node [draw=black, anchor=south west] (label) at (0,0){\includegraphics[width=300mm]{th.jpg}}; \coordinate (ZX) at (157mm,104mm); \coordinate (YB) at (249mm,39mm); \coordinate (YY) at ($(ZX)!1.5!(YB)$); \coordinate (ZZ) at ($(YB)!2.5!(ZX)$); \draw[blue!20,very thick] (ZZ)--(YY); \draw[red!20,very thick, rotate around={90:(ZX)}] (157mm,104mm)--(249mm,39mm);%It works \draw[red!20,very thick, rotate around={-90:(ZX)}] (ZX)--(YB);%It doesn't work \filldraw[white] (ZX) circle (2mm); \filldraw[white] (YB) circle (2mm); \end{tikzpicture}   a working example       \documentclass{minimal} \usepackage{tikz,tikz-3dplot}  \begin{document}    \tdplotsetmaincoords{70}{115}    \begin{tikzpicture}[scale=4,tdplot_main_coords] \pgfmathsetmacro{\rvec}{.8} \pgfmathsetmacro{\thetavec}{30} \pgfmathsetmacro{\phivec}{60}  \tdplotsetrotatedcoords{\phivec}{\thetavec}{0}   \coordinate (O) at (1,1,1);   %these 2 lines overlap \draw[thick,-&gt;] (O) -- (0,.5,0); \draw[thick,tdplot_rotated_coords,-&gt;] (O) -- (0,.5,0);   %these 2 lines dont overlap \draw[thick,-&gt;] (1,1,1) -- (0,.5,0); \draw[thick,tdplot_rotated_coords,-&gt;] (1,1,1) -- (0,.5,0); \end{tikzpicture} \end{document}
103395
I was quite impressed by the figures generated by TikZ and wanted to try TikZ to generate a few figures (please see the attached image drawn using an external WYSWYG program). When I tried to reproduce the figures myself using TikZ I found it very difficult to control the shapes in required positions. What is the simplest method to draw!these figures using TikZ?
40077
I'm making some slides where I want to show permutations with little diagrams of dots and arrows. Here is my attempt to depict the permutation 12345 --> 31245:  \documentclass{article}  \usepackage[all]{xy}  \begin{document} \[ \left( \xymatrix@R=1 em@C=1 em{ \bullet \ar[rrd] &amp; \bullet \ar[ld] &amp; \bullet \ar[ld] &amp; \bullet \ar[d] &amp; \bullet \ar[d]  \\ \bullet &amp; \bullet &amp; \bullet &amp; \bullet &amp; \bullet } \right) \] \end{document}   As you can see, there is a lot of white space at the top. How can I get the height of the xymatrix to only go up to the top of the dots?
76223
\documentclass{minimal} \usepackage{tikz} \begin{document} \pgfmathparse{random(-5,5)} \pgfmathresult \end{document}   Works, but I have a .0.0 that not supposed to be here.
59595
I have a map with small circles for over 200 cities. I need to change all of the circles into map pins. Is there a way to do this? I think it's a script maybe.   I know how to select all objects of the same appearance and give them a new graphic style but that will only let me change the color, stroke, etc. not replace with a new shape.
101003
I used the following code to draw a picture. I want to make the region insde (0,7), (0,11),(3,8),(3,4) to be red, and the region above it to be gray, but I don't know how to do this.   \documentclass{article} \usepackage{tikz} \begin{document} \pagestyle{empty} \begin{tikzpicture}[scale=0.5]  \draw (1.05cm,2pt) node[above];  %  {$\displaystyle\int_0^{3/2} \!\!x^2\mathrm{d}x$};  \draw[style=help lines] (0,0) grid (3.9,11.9);   % [step=0.25cm]      (1,2) grid +(1,1);  \draw[-&gt;] (-1,0) -- (4,0) node[right] {$i$}; \draw[-&gt;] (0,-1) -- (0,12) node[above] {$j$};  \foreach \x/\xtext in {1/1, 2/2, 3/3} \draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {$\xtext$};  \foreach \y/\ytext in {1/, 2/, 3/,4/,5/,6/,7/7,8/, 9/, 10/, 11/11} \draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {$\ytext$};  \draw  {(0,11) -- (3,8)} node[below right] ; \draw  {(0,7) -- (3,4)} node[below right] ; \draw  {(3,8) -- (3,4)} node[below right] ; \end{tikzpicture}  \end{document}
37151
I am making a presentation using beamer, and I want to be able to position a certain image the way I want in a frame. I am not sure how to do that. Is there some way you can specify coordinates in the frame and then set an image there?  Is there a better way to place images in various places with the beamer class?
56803
Is possible to place/spawn objects along curve with randomized scale and rotation? I'm looking for lazy way to create flowers and randomized procedural patterns. Thanks
9795
This code:  \documentclass[10pt]{beamer} \setbeamertemplate{itemize item}[circle] \setbeamertemplate{itemize subitem}[triangle] \setbeamertemplate{itemize subsubitem}[square]   \begin{document} \begin{frame} \begin{itemize} \item first level     \begin{itemize}     \item second level         \begin{itemize}         \item third level         \end{itemize}     \end{itemize} \end{itemize} \end{frame} \end{document}    produces this output:    I expected the symbol of the first level item to be a circle, not a square. Is there an error in my code? The log file was too long to include in the question, so I .
65540
I've made a matrix in a beamer presentation and I'm trying to style the nodes.  \newcommand\foo{row 1/.style={inuse}} \begin{frame}{Chunks}   \tikzset{     inuse/.style={text=red},     free/.style={text=green},     addr/.style={minimum width=3em},     data/.style={nodes=draw,minimum width=6em},   }   \scalebox{0.6}{   \begin{tikzpicture}[node distance=2mm]     \matrix(magic) [matrix of nodes,ampersand replacement=\&amp;,row sep=-\pgflinewidth,                     column 1/.style={addr},                     column 2/.style={data, column sep=1em},                     %row 1 column 2/.style={inuse},                     %\foo ,                     %\foreach \r in { 1,2,3 } {row \r column 2/.style={inuse}, }                     column 3/.style={addr},                     column 4/.style={free, data, column sep=1em},                   ]     {       100: \&amp; 00000010 \&amp; 110: \&amp; 12345678 \&amp; 120: \&amp; 12345678 \&amp; 130: \&amp; 12345678    \\       101: \&amp; 00000001 \&amp; 111: \&amp; 12345678 \&amp; 121: \&amp; 12345678 \&amp; 131: \&amp; 12345678    \\       102: \&amp; 00000002 \&amp; 112: \&amp; 12345678 \&amp; 122: \&amp; 12345678 \&amp; 132: \&amp; 12345678    \\       103: \&amp; 00000003 \&amp; 113: \&amp; 12345678 \&amp; 123: \&amp; 12345678 \&amp; 133: \&amp; 12345678    \\     };   \end{tikzpicture} } \end{frame}   Of the three commented out lines, the first works and the other two fail. For the \foo macro I get:  Package pgfkeys Error: I do not know the key '/tikz/row 1/.style={inuse}' and I am going to ignore it. Perhaps you misspelled it.   But if I stick the macro body where I tried to use it, no problem. Clearly I'm missing something fundamental about macros, but what?  Invoking \foo in the tikzset gave the same result.  The foreach gives me something totally cryptic:  ! Undefined control sequence. \foreach ...reach \let \pgffor@assign@before@code                                                    =\pgfutil@empty \let \pgff...   Any help much appreciated.
37021
I need an appearing effect for text like the one (in javascript) here .  However I don't know how to insert js code into LaTeX (apart from using the AcroTeX Bundle) and that would also force me to use Acrobat Reader, so I'd like to implement a similar effect in Beamer. Is it possible?  (of course I would love to see alternative approaches to this)
108080
I want to include a tikzpicture (mindmap) in beamer and I want the children to appear one after the other.  So I use \visible but it don't works -- also not with \pause command. I get errors regarding forgotten semicolons. When I insert semicolons, not all of the mindmap is created.  Is there an easy way to realize that?  \begin{frame} \frametitle{Charakteristika} \begin{tikzpicture}[mindmap, concept color=gray!50, font=\sf, text=white]    \tikzstyle{level 1 concept}+=[font=\sf, sibling angle=90,level distance = 30mm]   \visible&lt;1-&gt;{   \node[concept,scale=0.7] {Gedächtnis}     [clockwise from=135]}       \visible&lt;2-&gt;{         child[concept color=orange]{ node[concept,scale=0.7]{Musik} } }       \visible&lt;3-&gt;{         child[concept color=orange]{ node[concept,scale=0.7]{Kunst} } }       \visible&lt;4-&gt;{         child[concept color=orange]{ node[concept,scale=0.7]{Mathematik} } }       \visible&lt;5-&gt;{         child[concept color=orange]{ node[concept,scale=0.7]{Seltenere} } };  \end{tikzpicture}  \end{frame}
80170
I'm thinking of making a puzzle game where the objective is to fill a grid with shaped puzzle pieces (for example, the classic Tetris shapes).  How can I go about generating a set of pieces that can be guaranteed to be used to fill the grid, leaving no gaps? How could I adapt this algorithm to scale the difficulty of the resulting puzzle?
93604
First of all sorry because this question may be duplicated. I don't know why the question was uploaded with another user's name and I can't edit it (may be you can delete the previous question with the same title). The question is the following:  I am creating a beamer presentation where I have a lot of formulas. Between the packages used I have \usepackage{amsmath} and the theme for the presentation is \usetheme{Warsaw}.  As it can be seen in the attached picture, the size of the sub(super)script is bigger than the normal writting.     Anyone knows a set of basic packages in order to get the classical formulas, without these size changes?  The code is the following  \documentclass[]{beamer}  \setbeamercovered{transparent}   %--------------------------% % To add enumeration index %--------------------------% \addtobeamertemplate{navigation symbols}{}{%     \usebeamerfont{footline}%     \usebeamercolor[fg]{footline}%     \hspace{1em}%     \insertframenumber / \inserttotalframenumber  } \setbeamercolor{footline}{fg=black} \setbeamerfont{footline}{series=\bfseries}   %---------------------------------------------------------------------------------%  \usepackage{amsmath,amssymb}    % Theme for the presentation \usetheme{Warsaw} % Change the colour \usecolortheme{spruce}  \setbeamertemplate{footline}{}  % Delete the footline with the names    \begin{document}    \begin{frame} \frametitle{\textbf{Algorithm}: step \texttt{s}}   \scriptsize  \textbf{STEP \texttt{s}}  \vspace{0.25cm}  Let $B^{(s-1)}$ be the variable  for the $\mathit{(s-1)}$-th step, let's take the sets $I_+^{(s-1)}$ and $I_-^{(s-1)}$ of length $r_+^{(s-1)}$ and $r_-^{(s-1)}$ respectively,and define:\\  \vspace{0.25cm}  \begin{center}  $B^{(s+)}= \sqrt{\tfrac{(r_+^{(s-1)} + 1)*r_-^{(s-1)}}{r_+^{(s-1)} + r_-^{(s-1)} + 1}} $  \end{center}   \end{frame}  \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}