TeX Community Aggregator

Category Inactive

Exporting PDFs from JabRef using a Batch File

If you do research, JabRef is a great tool for managing a personal repository of PDFs. JabRef allows you to link your citations with full text PDFs. This post discusses one way of exporting a subset of your PDF repository… Continue Reading →

TeXnicCenter Customisations

Over the last few weeks I’ve been exploring text editors for writing LaTeX documents. I wrote these notes when I was using TeXnicCenter (version 1.0). I have since switched to using WinEdt for writing LaTeX documents. If you do any… Continue Reading →

APA Style References in LaTeX

This post discusses my experience getting APA style references in LaTeX. This includes both in-text citations and the end of document references list. It focuses on the use of the apacite package. Setting up a BibTeX Bibliographic Database Regardless of… Continue Reading →

Converting a Microsoft Word Document into a LaTeX Document

This post discusses my experience converting a large MS Word document into a LaTeX document using Word-to-LaTeX. Along the way I encountered several challenges. I thought I’d document them in case it may be of interest to others. Overview of… Continue Reading →

Export from Endnote to BibTeX, JabRef, and LaTeX

This post sets out a procedure that I used to migrate a large set of Endnote references in a Word Document to a Latex document with BibTeX references in JabRef. In particular, it sets out (1) how to export an… Continue Reading →

Choosing an Auto Generation Pattern for BibTeX Keys in JabRef

This post discusses the issue of choosing a default pattern for the BibTex key generator in JabRef. THE CONTEXT If you haven’t already heard, JabRef is an open source reference manager built on Java, and BibTeX is a file format for storing references. I’ve… Continue Reading →

This blog moves

This blog will continue here, for reasons explained there. See also: Original Source by Rafael

Getting Started with Sweave: R, LaTeX, Eclipse, StatET, & TeXlipse

Being able to press a single button that runs all your statistical analyses and integrates the output into your final report is a beautiful thing. If you have not already heard, this is what Sweave can do for you. However,… Continue Reading →

A 3d graph

… after the example in the tikz gallery. \usetikzlibrary{calc,3d}\newcommand{\setxyz}[1]{% \pgfmathsetmacro{\xone}{cos(180+#1)}% \pgfmathsetmacro{\yone}{sin(180+#1)}% \pgfmathsetmacro{\xtwo}{cos(360-#1)}% \pgfmathsetmacro{\ytwo}{sin(360-#1)}%}\setxyz{17}\begin{tikzpicture}% [x = {(\xone cm,\yone cm)}, y = {(\xtwo cm,\ytwo cm)}, z = {(0cm,1cm)}] \GraphInit[vstyle=Shade] \SetVertexNoLabel \begin{scope}[canvas is xy plane at z=-5] \Vertex{x} \end{scope} \begin{scope}[canvas is xy plane… Continue Reading →

A circulant tournament

This is the circulant C_9(1,2,3,4)\begin{tikzpicture}\usepgflibrary{arrows}\GraphInit[vstyle=Art]\SetUpEdge[style={->,>=angle 45,bend right=10},color=red]\grCirculant[RA=3]{9}{1,-2,3,-4}\end{tikzpicture} See also: Original Source by Rafael

Several options for the \Vertex macro

UPDATE: This example no longer works with the latest versions of tkz-graph and tkz-berge. For an updated version see this post at my new blog. \begin{tikzpicture}\SetVertexNormal[LineColor=brown]\Vertex[x=0,y=2.5,style=orange,LabelOut=true,Lpos=90]{A}{\tikzstyle{every node} = [node distance=1.5cm] \Vertices[x=1.5,y=4,dir=\SO,LabelOut=true,Ldist=5pt]{B,C,D}}\Vertices[x=3,y=5,dir=\SO,style={shape=coordinate}]{E,F,G,H,I,J}\Vertices[x=4.5,y=5,dir=\SO,style={font=\bfseries}]{K,L,M,N,O,P}{\tikzstyle{every node} = [node distance=1.5cm] \Vertices[x=6,y=4,dir=\SO, style={line width=2pt, inner sep=0pt,… Continue Reading →

Several options for the \Edge macro

\begin{tikzpicture} \SetVertexNormal \Vertex[x=0,y=2.5]{A} {\tikzstyle{every node} = [node distance=1.5cm] \Vertices[x=1.5,y=4,dir=\SO]{B,C,D}} \Vertices[x=3,y=5,dir=\SO]{E,F,G,H,I,J} \Vertices[x=4.5,y=5,dir=\SO]{K,L,M,N,O,P} {\tikzstyle{every node} = [node distance=1.5cm] \Vertices[x=6,y=4,dir=\SO]{Q,R,S}} \Vertex[x=7.5,y=2.5]{T} \Edges[color=red](A,B,E,K,Q,T,S,P,J,D,A) \foreach \x/\y in {E/F,G/H,I/J,K/L,M/N,O/P} {\Edge[color=green](\x)(\y)} \Edge[style=->](I)(P) \Edge[style=dashed](A)(C) \Edge[style=dotted](C)(F) \Edge[label=CD](C)(D) \Edge[label=BC,labelcolor=yellow](B)(C) \Edge[label=QR,labelcolor=orange,labeltext=cyan](Q)(R) \Edge[label=RS,labelstyle=right](R)(S) \Edge[label=OS,labelstyle={below=1pt,inner sep=0pt}](O)(S) \Edge[label=LQ,labelstyle={above,font=\bfseries}](L)(Q) \Edge[label=FL,labelstyle={font=\tiny\bfseries}](F)(L) \Edge[label=GN,labelstyle={sloped,above}](G)(N) \Edge[style={bend right}](A)(T)\end{tikzpicture} See also:… Continue Reading →

Simulating KTikZ with Emacs

I stumbled upon a piece of software called KtikZ. The screenshot in that page, together with the fact that Doc-View mode is included in the new Emacs 23, inspired me to try that idea with tikz2pdf. With help from folks… Continue Reading →

Using tikz2pdf

When drawing graphs by trial and error, the script tikz2pdf by Hans Meine can be very useful. I have the following in ~/.tikz2pdf.tex: \documentclass{article} \usepackage{tikz}\usepackage{tkz-berge} \usepackage[graphics,tightpage,active]{preview}\PreviewEnvironment{tikzpicture}\newlength{\imagewidth}\newlength{\imagescale} \begin{document} \input{%s} \end{document} Then, I edit a file, say foo.tikz, with \begin{tikzpicture} \grHeawood[RA=1]\end{tikzpicture} and… Continue Reading →

New LaTeX package for graphs

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 here,… Continue Reading →

A mistake in Tutte’s 8-cage

Only after Kjell Magne Fauske posted in his gallery 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… Continue Reading →

The largest 3-regular graph of diameter 3

See this paper \documentclass{article}\usepackage{tikz}\pagestyle{empty} \begin{document}\begin{center} \begin{tikzpicture}[style=thick] \foreach \x in {18,90,…,306} { \draw (\x:4cm) circle (2pt) — (\x+72:4cm); \draw (\x:4cm) — (\x:3cm) circle (2pt); \draw (\x:3cm) — (\x+15:2cm) circle (2pt); \draw (\x:3cm) — (\x-15:2cm) circle (2pt); \draw (\x+15:2cm) — (\x+144-15:2cm); \draw… Continue Reading →

The largest 4-regular graph of diameter 2

See this paper. \documentclass{article}\usepackage{tikz}\pagestyle{empty} \begin{document}\begin{center} \begin{tikzpicture}[style=thick] \foreach \x in {0,30,…,330} { \draw (\x:2cm) circle (2pt) — (\x+30:2cm); } \foreach \x in {0,60,…,300} { \draw (\x:2cm) circle (2pt) — (\x+90:2cm); } \foreach \x in {0,30,…,150} { \draw (\x:2cm) circle (2pt) —… Continue Reading →

The McGee graph

\documentclass{article}\usepackage{tikz}\pagestyle{empty} \begin{document}\begin{center} \begin{tikzpicture}[style=thick] \foreach \x in {0,15,…,345} { \draw (\x:3cm) circle (2pt) — (\x+15:3cm); } \foreach \x in {0,45,…,135} { \draw (\x:3cm) circle (2pt) — (\x+180:3cm); } \foreach \x in {15,60,…,330} { \draw (\x:3cm) circle (2pt) — (\x+105:3cm); } \end{tikzpicture}\end{center}\end{document}… Continue Reading →

The Hoffman-Singleton graph

\documentclass{article} \pagestyle{empty}\usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[style=thick,scale=0.5] \def\pentagon{(18:1cm) circle (4pt) node[above right=-1.75pt]{\tiny $4$} — (90:1cm) circle (4pt) node[above]{\tiny $0$} — (162:1cm) circle (4pt) node[above left=-1.75pt]{\tiny $1$} — (234:1cm) circle (4pt) node[below]{\tiny $2$} — (306:1cm) circle (4pt) node[below]{\tiny $3$} — (18:1cm)} \def\pentagram{(18:1cm) circle… Continue Reading →

Tutte’s 8-cage

The unique smallest cubic graph of girth 8. Drawn from Algebraic Graph Theory by Godsil and Royle, p.72. \documentclass{article}\usepackage{tikz}\pagestyle{empty} \begin{document}\begin{tikzpicture}[style=thick] \foreach \x in {0,36,…,324} { \draw (\x:2cm) circle (2pt) — (\x+144:2cm); \draw (\x-10:3cm) circle (2pt) — (\x+5:4cm); \draw (\x-10:3cm) circle… Continue Reading →

A complete bipartite graph

\documentclass{article}\usepackage{tikz}\pagestyle{empty} \begin{document} \begin{center} \begin{tikzpicture}[style=thick] \foreach \x in {0,1,2} \foreach \y in {0,1,2} {\draw (\y,0) — (\x,1);} \foreach \x in {0,1,2}{ \draw (\x,0) circle (2pt); \draw (\x,1) circle (2pt);} \end{tikzpicture} \end{center}\end{document} See also: Original Source by Rafael

A cubic tree

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.\documentclass{article} \usepackage{tikz}… Continue Reading →

Petersen graph

The smallest cubic graph of girth 5, drawn using TikZ. \documentclass{article}\usepackage{tikz}\pagestyle{empty} \begin{document} \begin{center} \begin{tikzpicture}[style=thick] \draw (18:2cm) — (90:2cm) — (162:2cm) — (234:2cm) — (306:2cm) — cycle; \draw (18:1cm) — (162:1cm) — (306:1cm) — (90:1cm) — (234:1cm) — cycle; \foreach \x… Continue Reading →

Heawood graph

The smallest cubic graph of girth 6, or 6-cage, drawn with PS Tricks. This was inspired from the example in The LaTeX Graphics Companion, page 121. \documentclass{article}\usepackage{pstricks,pst-node,multido,ifthen,calc}\pagestyle{empty} \begin{document}\begin{center}\begin{pspicture}(-1,-1.5)(1,1.5) \psset{unit=1.5cm} \newcounter{CtA} \newcounter{Temp} \newcounter{Tempi} \SpecialCoor \degrees[14] \multido{\ia=0+1}{14}{% \setcounter{CtA}{\ia}% \addtocounter{CtA}{1}% \multido{\ib=\value{CtA}+1}{1}{\psline{o-o}(1;\ia)(1;\ib)} }% \multido{\ia=0+2}{7}{%… Continue Reading →

Graphs with LaTeX

The purposes of this blog are to show pictures of graphs (where by a graph we mean the object studied in Graph Theory) produced by LaTeX, and more precisely by its packages Xy-pic, PS Tricks and TikZ, and to discuss… Continue Reading →

Newer posts »

© 2025 TeX.social