tags:

As of today, I will start posting here further drawings similar to those in my previous blog on graph theory, made with the excellent tkz-berge and tkz-graph LaTeX packages by Alain Matthes.

The reason for the move is that I have found a much more convenient way to post the examples. Starting with this post at his Curious Reasoning blog, Eric Finster explained a way of posting code and images to WordPress. For example, for the first post I used the following procedure:

First, I produced the code using the method described in my post in the previous blog. Note that the script tikz2pdf leaves a .pdf file of the picture in the folder, called tikz2pdf_temp.pdf. I used then the convert command from imagemagick as follows:

convert -density 300 tikz2pdf_temp.pdf coloringpeteresen.png


to obtain a .png file from the .pdf. Then I edited a LaTeX file 01petersencoloring.tex:

\documentclass{wpblogentry}

\usepackage{graphicx}
\usepackage{listings}

\title{A coloring of the Petersen graph}

\category{tkz-berge}
\tags{coloring}

\begin{document}

\begin{center}
\includegraphics[width=5cm]{coloringpeteresen.png}
\end{center}

\begin{lstlisting}
\begin{tikzpicture}[rotate=90]
\GraphInit[vstyle=Hasse]
\grPetersen[RA=3,RB=1.5]
\end{tikzpicture}
\end{lstlisting}

\end{document}


then I ran the command:

wplpost -u rvf0068 -b graphtheoryinlatex 01petersencoloring.tex


Finally, I just edited manually in WordPress the part where it says the code language is Python (changed to LaTeX), and resized and centered the picture. Done!

February 26, 2010 3:54 pm

Hi!
I’ve downloaded tikz.el and tkz-berge.el. How can I use these files 😕

I have placed them in ~/elisp and added

to my .emacs file. This does not seem to work 😦

Best,
Fidel