tag:blogger.com,1999:blog-320752722024-03-06T02:02:50.174-06:00Graph Theory in LaTeXA gallery of (combinatorial) graphs produced by using LaTeXRafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-32075272.post-44289711901548755502010-02-26T10:55:00.001-06:002010-02-26T10:56:10.547-06:00This blog movesThis blog will continue <a href="http://graphtheoryinlatex.wordpress.com">here</a>, for reasons explained there.Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-56920468854323474042009-09-05T11:30:00.002-05:002009-09-05T11:35:09.814-05:00A 3d graph<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0xMIymGHWkwXptYXllhOGL8CsXErZDF5mVI6qKWZnX83h3M7XARTPlA0cSalGR4PJthlfTBqHNaeeSMQGcuZjmXoQttXcL-p1emb7F2v3OPi4E6xdvVBEZiui3Jf9ikXSiS8L/s1600-h/page-1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 315px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0xMIymGHWkwXptYXllhOGL8CsXErZDF5mVI6qKWZnX83h3M7XARTPlA0cSalGR4PJthlfTBqHNaeeSMQGcuZjmXoQttXcL-p1emb7F2v3OPi4E6xdvVBEZiui3Jf9ikXSiS8L/s320/page-1.png" alt="" id="BLOGGER_PHOTO_ID_5378021975904932770" border="0" /></a><br />... after the example in the <a href="http://www.texample.net/tikz/examples/annotated-3d-box/">tikz gallery</a>.<br /><br /><span style="font-size:78%;"><span style="font-weight: bold;font-family:courier new;" >\usetikzlibrary{calc,3d}<br />\newcommand{\setxyz}[1]{%<br /> \pgfmathsetmacro{\xone}{cos(180+#1)}%<br /> \pgfmathsetmacro{\yone}{sin(180+#1)}%<br /> \pgfmathsetmacro{\xtwo}{cos(360-#1)}%<br /> \pgfmathsetmacro{\ytwo}{sin(360-#1)}%<br />}<br />\setxyz{17}<br />\begin{tikzpicture}%<br /> [x = {(\xone cm,\yone cm)},<br /> y = {(\xtwo cm,\ytwo cm)},<br /> z = {(0cm,1cm)}]<br /> \GraphInit[vstyle=Shade]<br /> \SetVertexNoLabel<br /> \begin{scope}[canvas is xy plane at z=-5]<br /> \Vertex{x}<br /> \end{scope}<br /> \begin{scope}[canvas is xy plane at z=0]<br /> \grEmptyCycle[prefix=a]{5}<br /> \end{scope}<br /> \EdgeFromOneToAll{x}{a}{}{5}<br /> \Edges(a0,a1,a2,a3,a4,a0)<br /> \begin{scope}[canvas is xy plane at z=5]<br /> \Vertex{y}<br /> \end{scope}<br /> \EdgeFromOneToAll{y}{a}{}{5}<br />\end{tikzpicture}<br /></span></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com1tag:blogger.com,1999:blog-32075272.post-90804957902971370482009-08-28T16:26:00.006-05:002009-08-28T17:05:54.037-05:00A circulant tournament<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgknye0bMY8vc5oO7ST78EC2Xk1JUE3bXNWNkiErmQKCam3fzKIwEL35QGnCB5VYJhpcOybjj9YbJlW0zh5paiDQeUHG_zFePGrCQD7fWJr0zrUxQbiwUyXmAfOZvX0gJZSfMcC/s1600-h/page-1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 247px; height: 251px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgknye0bMY8vc5oO7ST78EC2Xk1JUE3bXNWNkiErmQKCam3fzKIwEL35QGnCB5VYJhpcOybjj9YbJlW0zh5paiDQeUHG_zFePGrCQD7fWJr0zrUxQbiwUyXmAfOZvX0gJZSfMcC/s320/page-1.png" alt="" id="BLOGGER_PHOTO_ID_5375129678829509682" border="0" /></a><br /><span style="font-family:georgia;">This is the circulant C_9(1,2,3,4)</span><br /><span style="font-weight: bold;font-family:courier new;" ><br /><span style="font-size:85%;">\begin{tikzpicture}<br />\usepgflibrary{arrows}<br />\GraphInit[vstyle=Art]<br />\SetUpEdge[style={->,>=angle 45,bend right=10},color=red]<br />\grCirculant[RA=3]{9}{1,-2,3,-4}<br />\end{tikzpicture}</span><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com2tag:blogger.com,1999:blog-32075272.post-86123299543336706222009-08-18T19:24:00.003-05:002011-10-17T17:52:47.941-05:00Several options for the \Vertex macro<span style="color: rgb(255, 0, 0);"><span style="font-family: georgia;">UPDATE: </span></span><span style="color: rgb(0, 0, 0);">This example no longer works with the latest versions of tkz-graph and tkz-berge. For an updated version see <a href="http://graphtheoryinlatex.wordpress.com/2011/10/17/options-for-vertices/">this</a></span> post at my new blog.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb4rxvplGBfXVcCHDp85ze50ew6-rHecVQDoZq6YZu6kkcIl3aYrEbjlqIEKPmHj2mNS8PsE9Q2zfEvE0sc8EbHvKa0dLExHpmdw-J2e-9lbrhYi6MUD4vaDWQdyKAu1b_8G6I/s1600-h/page-1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 226px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb4rxvplGBfXVcCHDp85ze50ew6-rHecVQDoZq6YZu6kkcIl3aYrEbjlqIEKPmHj2mNS8PsE9Q2zfEvE0sc8EbHvKa0dLExHpmdw-J2e-9lbrhYi6MUD4vaDWQdyKAu1b_8G6I/s320/page-1.png" alt="" id="BLOGGER_PHOTO_ID_5371464458272740418" border="0" /></a><br /><span style="font-size:85%;"><span style="font-weight: bold;font-family:courier new;" ><br />\begin{tikzpicture}<br />\SetVertexNormal[LineColor=brown]<br />\Vertex[x=0,y=2.5,style=orange,LabelOut=true,Lpos=90]{A}<br />{\tikzstyle{every node} = [node distance=1.5cm]<br /> \Vertices[x=1.5,y=4,dir=\SO,LabelOut=true,Ldist=5pt]{B,C,D}}<br />\Vertices[x=3,y=5,dir=\SO,style={shape=coordinate}]{E,F,G,H,I,J}<br />\Vertices[x=4.5,y=5,dir=\SO,style={font=\bfseries}]{K,L,M,N,O,P}<br />{\tikzstyle{every node} = [node distance=1.5cm]<br /> \Vertices[x=6,y=4,dir=\SO,<br /> style={line width=2pt,<br /> inner sep=0pt,<br /> text=purple,<br /> fill=yellow,<br /> minimum size=12pt}]{Q,R,S}}<br />\Vertex[x=7.5,y=2.5,style={shape=rectangle,blue}]{T}<br />\Edges[color=red,lw=2pt](A,B,E,K,Q,T,S,P,J,D,A)<br />\Edges(B,G,L,R,T)<br />\Edges(D,H,O,R)<br />\Edges(A,C,F,M,Q)<br />\Edges(C,I,N,S)<br />\foreach \x/\y in {E/F,G/H,I/J,K/L,M/N,O/P}<br />{\Edge(\x)(\y)}<br />\Edge[style={bend left}](G)(N)<br />\Edge[style={bend right}](A)(T)<br />\end{tikzpicture}<br /></span><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com5tag:blogger.com,1999:blog-32075272.post-57165401224934872622009-08-03T20:32:00.003-05:002009-08-03T20:35:45.292-05:00Several options for the \Edge macro<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0q9r_Q-Oa6qTjFXIYltnynSxFFWtEv1EEuBsAjzOlpe0MFD8XWE2fvGKptt3PPWCcpVCrhQVq1FLYyQ7hwSstVUOZn-7tIuU2AlOKK93QI1-0Bheynh8MniRRK1YkMMLpVeTf/s1600-h/edgeoptions.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 222px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0q9r_Q-Oa6qTjFXIYltnynSxFFWtEv1EEuBsAjzOlpe0MFD8XWE2fvGKptt3PPWCcpVCrhQVq1FLYyQ7hwSstVUOZn-7tIuU2AlOKK93QI1-0Bheynh8MniRRK1YkMMLpVeTf/s320/edgeoptions.png" alt="" id="BLOGGER_PHOTO_ID_5365915906401170386" border="0" /></a><br /><span style="font-weight: bold;font-family:courier new;" ><br /><span style="font-size:85%;">\begin{tikzpicture}<br /> \SetVertexNormal<br /> \Vertex[x=0,y=2.5]{A}<br /> {\tikzstyle{every node} = [node distance=1.5cm]<br /> \Vertices[x=1.5,y=4,dir=\SO]{B,C,D}}<br /> \Vertices[x=3,y=5,dir=\SO]{E,F,G,H,I,J}<br /> \Vertices[x=4.5,y=5,dir=\SO]{K,L,M,N,O,P}<br /> {\tikzstyle{every node} = [node distance=1.5cm]<br /> \Vertices[x=6,y=4,dir=\SO]{Q,R,S}}<br /> \Vertex[x=7.5,y=2.5]{T}<br /> \Edges[color=red](A,B,E,K,Q,T,S,P,J,D,A)<br /> \foreach \x/\y in {E/F,G/H,I/J,K/L,M/N,O/P}<br /> {\Edge[color=green](\x)(\y)}<br /> \Edge[style=->](I)(P)<br /> \Edge[style=dashed](A)(C)<br /> \Edge[style=dotted](C)(F)<br /> \Edge[label=CD](C)(D)<br /> \Edge[label=BC,labelcolor=yellow](B)(C)<br /> \Edge[label=QR,labelcolor=orange,labeltext=cyan](Q)(R)<br /> \Edge[label=RS,labelstyle=right](R)(S)<br /> \Edge[label=OS,labelstyle={below=1pt,inner sep=0pt}](O)(S)<br /> \Edge[label=LQ,labelstyle={above,font=\bfseries}](L)(Q)<br /> \Edge[label=FL,labelstyle={font=\tiny\bfseries}](F)(L)<br /> \Edge[label=GN,labelstyle={sloped,above}](G)(N)<br /> \Edge[style={bend right}](A)(T)<br />\end{tikzpicture}</span><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com1tag:blogger.com,1999:blog-32075272.post-57002112164181976382009-08-03T00:01:00.014-05:002009-08-03T21:51:55.183-05:00Simulating KTikZ with EmacsI stumbled upon a piece of software called <a href="http://www.hackenberger.at/blog/ktikz-editor-for-the-tikz-language">KtikZ.</a> The screenshot in that page, together with the fact that Doc-View mode is included in the new <a href="http://www.gnu.org/software/emacs/">Emacs 23</a>, inspired me to try that idea with tikz2pdf. With help from folks from gnu.emacs.help, I came up with the following function:<br /><br /><span style="font-size:85%;"><span style="font-weight: bold;font-family:courier new;" ><br />(defun split-for-tikz2pdf ()<br />(interactive)<br />(TeX-run-style-hooks "tikz")<br />(TeX-run-style-hooks "tkz-berge")<br />(split-window-horizontally 60)<br />(other-window 1)<br />(split-window-vertically 15)<br />(find-file "tikz2pdf_temp.pdf")<br />(doc-view-mode)<br />(auto-revert-mode 1)<br />(other-window 1)<br />(let ((file-path (buffer-file-name)))<br />(when file-path<br /> (shell)<br /> (comint-send-string (get-buffer-process (current-buffer))<br /> (format "tikz2pdf -v %S \n" file-path))))<br />)<br /></span></span><br /><br />which gives something like this, when applied at a buffer with a .tex file:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXk-bcGobP0jwOqOmfjqK3kY5zJnNJV3wCnp0Pmv7NjAQcsVT_urdV1kCbw8fWNw1i9XzYgBafpLQL-g-HlpXBAD4SjgayjjlCpr6h1SHMkxgykMHpYWmiaj9nYv6Di45V3TQ/s1600-h/3774270402_f9ab40fc66.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 182px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXk-bcGobP0jwOqOmfjqK3kY5zJnNJV3wCnp0Pmv7NjAQcsVT_urdV1kCbw8fWNw1i9XzYgBafpLQL-g-HlpXBAD4SjgayjjlCpr6h1SHMkxgykMHpYWmiaj9nYv6Di45V3TQ/s320/3774270402_f9ab40fc66.jpg" alt="" id="BLOGGER_PHOTO_ID_5365601778538969218" border="0" /></a><br /><br />Unfortunately, the buffer for the .pdf file is not in Doc-View mode after executing the function. One has to go to that window and do <span style="font-family: courier new;">M-x doc-view-mode</span>. After that, sometimes the picture is not generated correctly and one has to reload manually with <span style="font-family: courier new;">g</span>. Other useful Doc-View key bindings are<span style="font-family: courier new;"> +</span> and -.<br /><br />You might want to use my simple AucTeX style files <a href="http://groups.google.com/group/seminariocimaarchivo/web/tikz.el">tikz.el</a> and <a href="http://groups.google.com/group/seminariocimaarchivo/web/tkz-berge.el">tkz-berge.el</a>.Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-36425380633137028742008-02-21T12:46:00.004-06:002009-08-03T20:23:06.688-05:00Using tikz2pdfWhen drawing graphs by trial and error, the script <a href="http://kogs-www.informatik.uni-hamburg.de/%7Emeine/tikz/process">tikz2pdf</a> by Hans Meine can be very useful.<br /><br />I have the following in ~/.tikz2pdf.tex:<br /><br /><span style="font-weight: bold;font-family:courier new;" >\documentclass{article}</span><br /><br /><span style="font-weight: bold;font-family:courier new;" >\usepackage{tikz}</span><br /><span style="font-weight: bold;font-family:courier new;" >\usepackage{tkz-berge}</span><span style="font-weight: bold;font-family:courier new;" ></span><br /><br /><span style="font-weight: bold;font-family:courier new;" >\usepackage[graphics,tightpage,active]{preview}</span><br /><span style="font-weight: bold;font-family:courier new;" >\PreviewEnvironment{tikzpicture}</span><br /><span style="font-weight: bold;font-family:courier new;" >\newlength{\imagewidth}</span><br /><span style="font-weight: bold;font-family:courier new;" >\newlength{\imagescale}</span><br /><br /><span style="font-weight: bold;font-family:courier new;" >\begin{document}</span><br /><br /><span style="font-weight: bold;font-family:courier new;" >\input{%s}</span><br /><br /><span style="font-weight: bold;font-family:courier new;" >\end{document}</span><br /><br /><span style="font-weight: bold;"></span>Then, I edit a file, say foo.tikz, with<br /><br /><span style="font-weight: bold;font-family:courier new;" >\begin{tikzpicture}</span><br /><span style="font-weight: bold;font-family:courier new;" > \grHeawood[RA=1]</span><br /><span style="font-weight: bold;font-family:courier new;" >\end{tikzpicture}</span><br /><br />and run<br /><br /><span style="font-family:courier new;">tikz2pdf -v foo.tikz<br /><br /><span style="font-family:georgia;">I can open then the generated</span> tikz2pdf_temp.pdf <span style="font-family: georgia;">with, say </span><a style="font-family: georgia;" href="http://blog.kowalczyk.info/software/sumatrapdf/">Sumatra</a>,<span style="font-family: georgia;">which is a viewer that, unlike Acrobat, does not complain if an opened file is modified. Next time I modify foo.tikz and save it, pdflatex is automatically run and I can press r in Sumatra to update the picture.</span><br /><br /><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-46110036921399592902007-05-10T17:14:00.000-05:002007-05-10T18:29:59.687-05:00New LaTeX package for graphs<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjscFWieOEci8B9P9vDwPHuRy41WzDpzBV5pG3HH_okDlvtBX9-Ey47CrsQARi8aCwv4b2cBOq9Z-uEmmAzQVnOUSYgbaLw5enFP-VkYEPksadSqqBLM9MF2hIyOQPji2Ib9DXZ/s1600-h/dodecaedro2.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjscFWieOEci8B9P9vDwPHuRy41WzDpzBV5pG3HH_okDlvtBX9-Ey47CrsQARi8aCwv4b2cBOq9Z-uEmmAzQVnOUSYgbaLw5enFP-VkYEPksadSqqBLM9MF2hIyOQPji2Ib9DXZ/s320/dodecaedro2.png" alt="" id="BLOGGER_PHOTO_ID_5063063630221433042" border="0" /></a><br />Alain Matthes has produced a package (tkz-berge.sty) which should become THE way to draw graphs in LaTeX. It is built on top of Tikz, and so can be easily integrated with beamer presentations. The package can be dowloaded from <a href="http://www.altermundus.fr/pages/downloads/tkz-berge.sty">here</a>, and the documentation (in French, but very nicely formatted and with lot of examples) can be obtained from <a href="http://www.altermundus.fr/pages/downloads/doc-TKZberge.pdf">here</a>. Alain's packages are all <a href="http://www.altermundus.fr/pages/download.html">here</a>.<br /><br />I plan to redraw all my examples using tkz-berge's syntax, but for the time being, I will show code for the dodecahedron above:<br /><br /><div style="text-align: left;"><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\documentclass{article}</span></span><br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\usepackage{tikz}</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\usepackage{tkz-berge}</span></span><br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\pagestyle{empty}</span></span><br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\tikzstyle{NormalVertexStyle}=[shape = circle,%</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> shading = ball,%</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> ball color = white,%</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> very thin,</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> inner sep=3pt,%</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> draw]</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\SetVertexNoLabel</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\tikzstyle{EdgeStyle}= [thick,%</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> double= orange,%</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> double distance = 1pt] </span></span><br /><br /><br /><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\begin{document}</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\begin{center}</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \begin{tikzpicture}</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \tikzstyle{every node} = [node distance=1.5cm]</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Vertex(A)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \EA{A}(C) \NO{C}(B) \SO{C}(D)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \tikzstyle{every node} = [node distance=1.2cm]</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \EA{B}(F) \NO{F}(E) \SO{F}(G)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \EA{D}(I) \NO{I}(H) \SO{I}(J)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \EA{F}(L) \NO{L}(K) \SO{L}(M)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \EA{I}(O) \NO{O}(N) \SO{O}(P)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \EA{L}(Q)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \tikzstyle{every node} = [node distance=1.5cm]</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \SO{Q}(R) \SO{R}(S) \EA{R}(T)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(A)(B) \Edge(A)(C) \Edge(A)(D)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(B)(E) \Edge(B)(G)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(C)(F) \Edge(C)(I)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(D)(H) \Edge(D)(J)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(E)(K) \Edge(E)(F) \Edge(F)(M)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(G)(L) \Edge(G)(H) \Edge(H)(O)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(I)(N) \Edge(I)(J) \Edge(J)(P)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(K)(Q) \Edge(K)(L)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(M)(Q) \Edge(M)(N)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(T)(Q) \Edge(L)(R)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(O)(R) \Edge(O)(P)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(T)(R) \Edge(N)(S)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \Edge(P)(S) \Edge(T)(S)</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;"> \end{tikzpicture}</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\end{center}</span></span><br /><span style="font-size:85%;"><span style="font-weight: bold; font-family: courier new;">\end{document}</span></span><br /></div><div style="text-align: left;"><span style="font-weight: bold;font-family:courier new;" ></span><br /></div>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com4tag:blogger.com,1999:blog-32075272.post-62652399836624763232007-02-27T18:45:00.000-06:002007-02-27T19:01:53.285-06:00A mistake in Tutte's 8-cageOnly after <span id="copyright">Kjell Magne Fauske posted in <a href="http://www.fauskes.net/pgftikzexamples/combinatorial-graphs/">his gallery</a> two (much improved) versions of two graphs found here, I realized there is a mistake in my picture of Tutte's 8-cage. There are 5-cycles among the "inner" 10 vertices. Kjell has posted a correct picture.<br /><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1157067391109043602006-08-31T18:33:00.000-05:002006-08-31T18:36:31.113-05:00The largest 3-regular graph of diameter 3<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/degreediameter33.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/degreediameter33.jpg" alt="" border="0" /></a><br />See <a href="http://www.combinatorics.org/Surveys/ds14.pdf">this</a> paper<br /><br /><span style="font-weight: bold;font-size:85%;" ><span style="font-family: courier new;">\documentclass{article}</span><br /><span style="font-family: courier new;">\usepackage{tikz}</span><br /><span style="font-family: courier new;">\pagestyle{empty}</span><br /><br /><span style="font-family: courier new;">\begin{document}</span><br /><span style="font-family: courier new;">\begin{center}</span><br /><span style="font-family: courier new;"> \begin{tikzpicture}[style=thick]</span><br /><span style="font-family: courier new;"> \foreach \x in {18,90,...,306}</span><br /><span style="font-family: courier new;"> {</span><br /><span style="font-family: courier new;"> \draw (\x:4cm) circle (2pt) -- (\x+72:4cm);</span><br /><span style="font-family: courier new;"> \draw (\x:4cm) -- (\x:3cm) circle (2pt);</span><br /><span style="font-family: courier new;"> \draw (\x:3cm) -- (\x+15:2cm) circle (2pt);</span><br /><span style="font-family: courier new;"> \draw (\x:3cm) -- (\x-15:2cm) circle (2pt);</span><br /><span style="font-family: courier new;"> \draw (\x+15:2cm) -- (\x+144-15:2cm);</span><br /><span style="font-family: courier new;"> \draw (\x-15:2cm) -- (\x+144+15:2cm);</span><br /><span style="font-family: courier new;"> }</span><br /><span style="font-family: courier new;"> \end{tikzpicture}</span><br /><span style="font-family: courier new;">\end{center}</span><br /><span style="font-family: courier new;">\end{document}</span></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com3tag:blogger.com,1999:blog-32075272.post-1157067061797240822006-08-31T18:28:00.000-05:002006-08-31T18:32:37.756-05:00The largest 4-regular graph of diameter 2<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/degreediameter42.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/degreediameter42.jpg" alt="" border="0" /></a>See <a href="http://www.combinatorics.org/Surveys/ds14.pdf">this</a> paper.<br /><br /><span style="font-weight: bold;font-size:85%;" ><span style="font-family:courier new;">\documentclass{article}</span><br /><span style="font-family:courier new;">\usepackage{tikz}</span><br /><span style="font-family:courier new;">\pagestyle{empty}</span><br /><br /><span style="font-family:courier new;">\begin{document}</span><br /><span style="font-family:courier new;">\begin{center}</span><br /><span style="font-family:courier new;"> \begin{tikzpicture}[style=thick]</span><br /><span style="font-family:courier new;"> \foreach \x in {0,30,...,330}</span><br /><span style="font-family:courier new;"> {</span><br /><span style="font-family:courier new;"> \draw (\x:2cm) circle (2pt) -- (\x+30:2cm);</span><br /><span style="font-family:courier new;"> }</span><br /><span style="font-family:courier new;"> \foreach \x in {0,60,...,300}</span><br /><span style="font-family:courier new;"> {</span><br /><span style="font-family:courier new;"> \draw (\x:2cm) circle (2pt) -- (\x+90:2cm);</span><br /><span style="font-family:courier new;"> }</span><br /><span style="font-family:courier new;"> \foreach \x in {0,30,...,150}</span><br /><span style="font-family:courier new;"> {</span><br /><span style="font-family:courier new;"> \draw (\x:2cm) circle (2pt) -- (\x+180:2cm);</span><br /><span style="font-family:courier new;"> }</span><br /><span style="font-family:courier new;"> \draw (60:0.7cm) circle (2pt) --</span><br /><span style="font-family:courier new;"> (180:0.7cm) circle (2pt) --</span><br /><span style="font-family:courier new;"> (300:0.7cm) circle (2pt) -- (60:0.7cm);</span><br /><span style="font-family:courier new;"> \end{tikzpicture}</span><br /><span style="font-family:courier new;">\end{center}</span><br /><span style="font-family:courier new;">\end{document}</span></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1157066468537157602006-08-31T18:17:00.000-05:002006-08-31T18:21:08.553-05:00The McGee graph<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/mcgee.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/mcgee.jpg" alt="" border="0" /></a><br /><span style="font-family: courier new;font-size:85%;" >\documentclass{article}<br />\usepackage{tikz}<br />\pagestyle{empty}<br /><br />\begin{document}<br />\begin{center}<br /> \begin{tikzpicture}[style=thick]<br /> \foreach \x in {0,15,...,345}<br /> {<br /> \draw (\x:3cm) circle (2pt) -- (\x+15:3cm);<br /> }<br /> \foreach \x in {0,45,...,135}<br /> {<br /> \draw (\x:3cm) circle (2pt) -- (\x+180:3cm);<br /> }<br /> \foreach \x in {15,60,...,330}<br /> {<br /> \draw (\x:3cm) circle (2pt) -- (\x+105:3cm);<br /> }<br /> \end{tikzpicture}<br />\end{center}<br />\end{document}</span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1156956186493943082006-08-30T11:40:00.000-05:002006-08-30T11:43:06.503-05:00The Hoffman-Singleton graph<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/hs.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/hs.jpg" alt="" border="0" /></a><span style="font-weight: bold; font-family: courier new;font-size:85%;" >\documentclass{article}<br /><br />\pagestyle{empty}<br />\usepackage{tikz}<br /><br />\begin{document}<br /><br />\begin{center}<br /> \begin{tikzpicture}[style=thick,scale=0.5]<br /> \def\pentagon{(18:1cm) circle (4pt) node[above right=-1.75pt]{\tiny $4$} --<br /> (90:1cm) circle (4pt) node[above]{\tiny $0$} --<br /> (162:1cm) circle (4pt) node[above left=-1.75pt]{\tiny $1$} --<br /> (234:1cm) circle (4pt) node[below]{\tiny $2$} --<br /> (306:1cm) circle (4pt) node[below]{\tiny $3$} -- (18:1cm)}<br /> \def\pentagram{(18:1cm) circle (4pt) node[above right=-1.75pt]{\tiny $4$} --<br /> (162:1cm) circle (4pt) node[above left=-1.75pt]{\tiny $1$} --<br /> (306:1cm) circle (4pt) node[below]{\tiny $3$} --<br /> (90:1cm) circle (4pt) node[above]{\tiny $0$} --<br /> (234:1cm) circle (4pt) node[below]{\tiny $2$} -- (18:1cm)}<br /> \draw[yshift=4cm] node{\tiny $P_{0}$} \pentagon;<br /> \draw[xshift=3cm,yshift=4cm] node{\tiny $P_{1}$} \pentagon;<br /> \draw[xshift=6cm,yshift=4cm] node{\tiny $P_{2}$} \pentagon;<br /> \draw[xshift=9cm,yshift=4cm] node{\tiny $P_{3}$} \pentagon;<br /> \draw[xshift=12cm,yshift=4cm] node{\tiny $P_{4}$} \pentagon;<br /> \draw node{\tiny $Q_{0}$} \pentagram;<br /> \draw[xshift=3cm] node{\tiny $Q_{1}$} \pentagram;<br /> \draw[xshift=6cm] node{\tiny $Q_{2}$} \pentagram;<br /> \draw[xshift=9cm] node{\tiny $Q_{3}$} \pentagram;<br /> \draw[xshift=12cm] node{\tiny $Q_{4}$} \pentagram;<br /> \draw (6,-2.5) node%<br /> {Vertex $i$ in $P_{j}$ is joined to vertex $i+jk\!\!\!\!\pmod{5}$ of $Q_{k}$};<br /> \end{tikzpicture}<br />\end{center}<br />\end{document}<br /><br />%%% Local Variables:<br />%%% mode: latex<br />%%% TeX-master: t<br />%%% End: </span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1155573373264983232006-08-14T11:14:00.000-05:002006-08-14T11:36:13.316-05:00Tutte's 8-cage<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/tuttecage.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/tuttecage.jpg" alt="" border="0" /></a><br />The unique smallest cubic graph of girth 8. Drawn from <a href="http://cuscus.math.uwaterloo.ca/agt/">Algebraic Graph Theory</a> by Godsil and Royle, p.72.<br /><br /><span style="font-weight: bold;font-size:85%;" ><span style="font-family: courier new;">\documentclass{article}</span><br /><span style="font-family: courier new;">\usepackage{tikz}</span><br /><span style="font-family: courier new;">\pagestyle{empty}</span><br /><br /><span style="font-family: courier new;">\begin{document}</span><br /><span style="font-family: courier new;">\begin{tikzpicture}[style=thick]</span><br /><span style="font-family: courier new;"> \foreach \x in {0,36,...,324}</span><br /><span style="font-family: courier new;"> {</span><br /><span style="font-family: courier new;"> \draw (\x:2cm) circle (2pt) -- (\x+144:2cm);</span><br /><span style="font-family: courier new;"> \draw (\x-10:3cm) circle (2pt) -- (\x+5:4cm);</span><br /><span style="font-family: courier new;"> \draw (\x-10:3cm) circle (2pt) -- (\x+36:2cm);</span><br /><span style="font-family: courier new;"> \draw (\x-10:3cm) circle (2pt) -- (\x+170:3cm);</span><br /><span style="font-family: courier new;"> \draw (\x+5:4cm) circle (2pt) -- (\x+41:4cm);</span><br /><span style="font-family: courier new;"> }</span><br /><span style="font-family: courier new;">\end{tikzpicture}</span><br /><span style="font-family: courier new;">\end{document}</span></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1154718214653920312006-08-04T14:01:00.000-05:002006-08-04T14:03:34.666-05:00A complete bipartite graph<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/bipartita.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/bipartita.png" alt="" border="0" /></a><br /><span style="font-family: courier new;font-size:85%;" >\documentclass{article}<br />\usepackage{tikz}<br />\pagestyle{empty}<br /><br />\begin{document}<br /> \begin{center}<br /> \begin{tikzpicture}[style=thick]<br /> \foreach \x in {0,1,2}<br /> \foreach \y in {0,1,2}<br /> {\draw (\y,0) -- (\x,1);}<br /> \foreach \x in {0,1,2}{<br /> \draw (\x,0) circle (2pt);<br /> \draw (\x,1) circle (2pt);}<br /> \end{tikzpicture}<br /> \end{center}<br />\end{document} </span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com2tag:blogger.com,1999:blog-32075272.post-1154627591988883172006-08-03T12:43:00.000-05:002006-08-03T12:59:00.430-05:00A cubic tree<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/treecage.0.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/treecage.0.png" alt="" border="0" /></a><br /><br />If it could be completed to a cubic graph, it would give a cubic Moore graph of diameter 3. I wish I knew how to produce a similar tree, but growing from an edge instead of from a vertex.<br /><span style="font-size:85%;"><br /><span style="font-family:courier new;">\documentclass{article}</span> <span style="font-family:courier new;"><br />\usepackage{tikz}</span> <span style="font-family:courier new;"><br />\thispagestyle{empty}</span> <span style="font-family:courier new;"><br />\begin{document}</span> <span style="font-family:courier new;"><br />\newcommand{\twochildren}{child{node{\null}}</span> <span style="font-family:courier new;"> child{node{\null}}}</span> <span style="font-family:courier new;"><br /><br />\begin{tikzpicture}[style=thick,scale=0.5]</span> <span style="font-family:courier new;"><br />\tikzstyle{every node}=[circle,inner sep=2pt,draw]</span> <span style="font-family:courier new;"><br />\tikzstyle{level 1}=[sibling distance=20mm]</span><br /><span style="font-family:courier new;"> \tikzstyle{level 2}=[sibling distance=10mm]</span> <span style="font-family:courier new;"><br />\tikzstyle{level 3}=[sibling distance=5mm]</span> <span style="font-family:courier new;"><br />\node{\null}[grow'=right]</span> <span style="font-family:courier new;"><br />child{node{\null}</span> <span style="font-family:courier new;"> <br /> child{node{\null}\twochildren}</span> <span style="font-family:courier new;"> <br /> child{node{\null}\twochildren}</span> <span style="font-family:courier new;"> }</span><br /><span style="font-family:courier new;"> child{node{\null}</span> <span style="font-family:courier new;"> <br /> child{node{\null}\twochildren}</span> <span style="font-family:courier new;"> <br /> child{node{\null}\twochildren}</span> <span style="font-family:courier new;"> }</span> <span style="font-family:courier new;"><br />child{node{\null}</span> <span style="font-family:courier new;"> <br /> child{node{\null}\twochildren}</span><br /> <span style="font-family:courier new;">child{node{\null}\twochildren}</span> <span style="font-family:courier new;"> };</span> <span style="font-family:courier new;"><br />\end{tikzpicture}</span> <span style="font-family:courier new;"><br />\end{document}</span><br /><span style="font-family:courier new;"></span></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1154558601671639282006-08-02T17:38:00.000-05:002006-08-03T09:27:39.710-05:00Petersen graph<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/petersen.2.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/petersen.0.png" alt="" border="0" /></a><br />The <a href="http://www.win.tue.nl/%7Eaeb/drg/graphs/Petersen.html">smallest cubic graph of girth 5</a>, drawn using <span style="font-weight: bold;">TikZ</span>.<br /><br /><span style="font-family:courier new;font-size:85%;">\documentclass{article}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\usepackage{tikz}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\pagestyle{empty}</span><span style="font-size:85%;"><br /><br /></span><span style="font-family:courier new;font-size:85%;">\begin{document}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \begin{center}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \begin{tikzpicture}[style=thick]</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \draw (18:2cm) -- (90:2cm) -- (162:2cm) -- (234:2cm) --</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> (306:2cm) -- cycle;</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \draw (18:1cm) -- (162:1cm) -- (306:1cm) -- (90:1cm) --</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> (234:1cm) -- cycle;</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \foreach \x in {18,90,162,234,306}{</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \draw (\x:1cm) -- (\x:2cm);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \draw (\x:2cm) circle (2pt);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \draw (\x:1cm) circle (2pt);</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> }</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \end{tikzpicture}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \end{center}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\end{document}</span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1154551835809215422006-08-02T14:18:00.000-05:002006-08-04T17:01:09.236-05:00Heawood graph<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7334/3498/1600/heawood.2.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/7334/3498/320/heawood.2.png" alt="" border="0" /></a>The <a href="http://www.win.tue.nl/%7Eaeb/drg/graphs/Heawood.html">smallest cubic graph of girth 6</a>, or 6-cage, drawn with <span style="font-weight: bold;">PS Tricks</span>. This was inspired from the example in The LaTeX Graphics Companion, page 121.<br /><br /><span style="font-family:courier new;font-size:85%;">\documentclass{article}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\usepackage{pstricks,pst-node,multido,ifthen,calc}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\pagestyle{empty}</span><span style="font-size:85%;"><br /><br /></span><span style="font-family:courier new;font-size:85%;">\begin{document}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\begin{center}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\begin{pspicture}(-1,-1.5)(1,1.5)</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \psset{unit=1.5cm}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \newcounter{CtA}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \newcounter{Temp}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \newcounter{Tempi}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \SpecialCoor \degrees[14]</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \multido{\ia=0+1}{14}{%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \setcounter{CtA}{\ia}%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \addtocounter{CtA}{1}%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \multido{\ib=\value{CtA}+1}{1}{\psline{o-o}(1;\ia)(1;\ib)}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> }%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \multido{\ia=0+2}{7}{%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \setcounter{CtA}{\ia}%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \addtocounter{CtA}{5}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \multido{\ib=\value{CtA}+1}{1}{\psline{o-o}(1;\ia)(1;\ib)}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> }%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \multido{\i=1+1}{14}{\rput(1;\i){%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \setcounter{Temp}{\i}%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> \ifthenelse{\isodd{\value{Temp}}}%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> {\setcounter{Tempi}{(\value{Temp}+1)/2}}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> {\setcounter{Tempi}{(\value{Temp})/2}}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;"> }%</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\end{pspicture}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;font-size:85%;">\end{center}</span><span style="font-size:85%;"><br /></span><span style="font-family:courier new;"><span style="font-size:85%;">\end{document}</span><br /><br /><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com0tag:blogger.com,1999:blog-32075272.post-1154538768585680542006-08-02T12:05:00.000-05:002006-08-02T14:18:36.676-05:00The purposes of this blog are to <span style="font-weight: bold;">show</span> pictures of graphs (where by a graph we mean the object studied in<a href="http://en.wikipedia.org/wiki/Graph_theory"> Graph Theory</a>) produced by LaTeX, and more precisely by its packages <a href="http://www.tug.org/applications/Xy-pic/">Xy-pic</a>, <a href="http://www.tug.org/applications/PSTricks/">PS Tricks</a> and <a href="http://sourceforge.net/projects/pgf/">TikZ</a>, and to<span style="font-weight: bold;"> discuss</span> pros and cons of each approach.<br /><br />I am using the Perl script <a href="http://www.fourmilab.ch/webtools/textogif/textogif.html">texttogif</a> to obtain the PNG pictures from a LaTeX source.<br /><span style="font-weight: bold;"><span style="font-weight: bold;"><br /><br /><br /></span><br /></span>Rafaelhttp://www.blogger.com/profile/12472535264735416143noreply@blogger.com1