I gave a presentation at Melbourne R Users on the topic of R Workflow. The presentation covered R code organisation, and useful R related tools including Eclipse, StatET, Git, make, Sweave and LaTeX. Also, the slides from the presentation provide… Continue Reading →
This post provides an example of using Sweave to perform an item analysis of a multiple choice test. It is designed as a tutorial for learning more about using Sweave in a mode where console input and output is displayed…. Continue Reading →
This post documents an example of using Sweave to generate individualised personality reports based on responses to a personality test. Each report provides information on both the responses of the general sample and responses of the specific respondent. All source… Continue Reading →
This post provides information on (a) installing Git using the Eclipse plugin Egit. (b) uploading repositories to GitHub, and (c) links to resources on Git, Git and LaTeX, and Git and R. The focus is on version control for people… Continue Reading →
In this post I present an example of using Sweave to prepare a PDF of formatted multiple choice questions. More broadly the example shows how to use Sweave to incorporate elements of a database into a formatted LaTeX document. It… Continue Reading →
This post provides a brief introduction to make and makefiles. In particular it describes how to set up make on Windows with an emphasis on using make in Eclipse on projects involving R, Sweave, and LaTeX. Overview make is software… Continue Reading →
LaTeX and mathematics go well together. At the risk of preaching to the converted, this post sets out (a) reasons to learn to write mathematics in LaTeX, (b) a few free internet guides on learning to write mathematics in LaTeX,… Continue Reading →
Someone asked about the architecture of LaTeX. After avoiding the question for a day, I decided to answer. Since it’s possible the question will be closed and possibly deleted, I figured I’d reproduce the relevant portion of my answer here…. Continue Reading →
I have two versions of my cv: one for public consumption and one which contains extra private bibliography entries for work that is in submission. Obviously these are mostly the same so I had one one that had a \newif\ifpublic… Continue Reading →
On occasion, one has cause to compare two boxes and compute the maximum of the two widths. If the two boxes are 0 and 2, then the standard way to do that is something like \ifdim\wd0>\wd2 \dimen0 \wd0 \else \dimen0… Continue Reading →
This post provides a guide to getting started with Beamer, a popular LaTeX package for preparing slide presentations. The post: (a) Lists some of the benefits of Beamer in comparison to PowerPoint; (b) Links to tutorials and suggestions for learning… Continue Reading →
For those who don’t already know, Beamer is a useful package in LaTeX for preparing slide presentations. I have a Beamer template of preamble and slide templates. I found having a template was useful: (a) when first learning Beamer commands,… Continue Reading →
The code should be self-explaning.. function y = f(x) y1 = x.* (x<0); y2 = x.^2 .* (x>=0) .* (x<2); y3 = 4 .* (x>=2); y = y1 + y2 + y3;
This post discusses my experience with WinEdt 6.0 as a text editor for writing documents in LaTeX. In this post I outline: (a) Why I have chosen to use WinEdt; (b) The role of WinEdt in my workflow; (c) Various… Continue Reading →
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 →
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 →
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 →
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 →
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 →
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 will continue here, for reasons explained there. See also: Original Source by Rafael
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 →
Die Konferenz für die deutschsprachige Ubuntu Linux Community “Ubucon” wird vom 19. bis 22. Oktober 2009 zum dritten Mal stattfinden, in der Georg August Universität in Göttingen. Das Konferenzprogramm enthält drei LaTeX-Veranstaltungen: LaTeX im Jahr 2009: Vorstellung neuer TeX… Continue Reading →
… 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 →
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
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 →
\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 →
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 →
An example of how you can use TikZ and absolute positioning to create fancy chapter headings. Edit and compile if you like: % Fancy chapter headings % Author: Stefan Kottwitz % Source: http://texblog.net/latex-archive/layout/fancy-chapter-tikz/ \documentclass[svgnames]{report} \usepackage{tikz} \usepackage{kpfonts} \usepackage[explicit]{titlesec} \newcommand*\chapterlabel{} \titleformat{\chapter} {\gdef\chapterlabel{}… Continue Reading →
This example shows how to create an effective 3D effect using the slant transformation. Shading has been added to enhance the 3D impression. Read more about this example over at TeXblog. Edit and compile if you like: % :Author: Stefan… Continue Reading →
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 →
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 →
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 →
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 →
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 →
\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 →
\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 →
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 →
\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
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 →
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 →
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 →
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 →
© 2025 TeX.social