blog @ bjerck.net
Login RegisterGraphviz, pstricks and pdftex
by: tom
For my latest assignment in an algorithms course, I was required to produce a report in the form of a pdf document. The report would contain graphics of binary trees. To produce these I used the graphviz software. With this software graphs are produced from an input file containing instructions in a simple language called dot
. This language doesn't give you exact control over the placement of nodes in the graph, rather, you use the language to indicate the existence of, and relationship between nodes. The program which interprets the input files, also called dot
, produces graphics in a vast number of types, but not eps. At least not in the version of dot on my system. So in order to make scalable graphics I used pdf output. To trim white space from the pdf file before including it as graphics in my latex code I had to use the pdftrimwhite program.
There is an alternative to graphviz; the pstricks package. It is a powerful graphics package for latex, but it is not nearly as simple to use as including graphics made by graphviz. The first problem I ran into was that on my system the latex command is a symbolic link to pdftex. And pdftex can't be used with the pstricks package. The simplest way to work around this, is to use the "pst-pdf" package. Just add the line:\usepackage{pst-pdf}
to your latex document preamble. You now may use the pstricks package, but you have to compile the .tex file in four stages:
latex <file>.tex
dvips -o <file>-pics.ps <file>.dvi
ps2pdf <file>-pics.ps
pdflatex <file>.tex
You must add -pics to the file names where indicated. If you want a simpler way you may use the script ps4pdf which does the steps above:
ps4pdf <file>.tex
Also, there is PGF & TikZ which is easier to use than pstrics and works great with pdftex. It also has a comprehensive and well made user manual.
created: 2009-03-03 18:26:06. Permalink
Trackpoint
by: tomConsider buying a r61e Thinkpad with only a trackpoint as a pointing device. Sitting there in the middle of the keyboard, will it be in the way? Will I always keep hitting it so that the pointer moves around the screen? Or produce clicks? Ok this may also happen with touchpads, but not so often? We'll see what I decide for. I guess I will most likely be hitting the trackpoint whenever I want to type a b. I'll be buying it from a web shop so I'll have two weeks to decide if I want to return it. I guess that is what I'll do.
created: 2008-11-20 13:56:02. Permalink
Comments:
Ok, after more than three months of extensive usage of this laptop, I can only say that I can't imagine life without a trackpoint. It really is a better pointing device. The first few days took some getting used to, and I needed to adjust the sensitivity and speed. But now I even prefer it to a mouse. And it is not in the way. I seldom inadvertently hit it while typing. Main advantages are that I can easily reach it while my fingers are still in "touch position", and moving the pointer large distances can be done in one movement, as opposed to touchpads.
created: 2009-03-11 16:27:04.
< Newer