1

Ubuntu 14.04

tex version : TeX 3.1415926 (TeX Live 2013/Debian)


After seeing this post I really wanted to play with the example and library, however I can't seem to get it working on my system. I'm not sure if the code in the linked post can be included in another document or if it is just a standalone thing.

Heres the code from that post :

\documentclass[tikz,border=0.1cm]{standalone}
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
\begin{document}
\tikz\path [graphs/.cd, nodes={shape=circle, fill=blue!40, draw=none, outer sep=0pt}, empty nodes]
  graph [tree layout] { A1 -- {B1 -- C1} -- A1 }
  [shift=(0:1)]
  graph { A2 -- B2; C2 -- D2; A2 -- D2;  B2 -- C2 };
\end{document}

There's another example here (by the same tex user) that looks nice, and is written in the same way.

Is the way that this package is meant to be used, just on its own? I can't find any guides for this

lualatex installed with :

sudo apt-get install texlive-luatex

Basically -> how to I use the above code within a project?

Compile with luatex - tried using this bash script - i get this error :

Edit 1

Here's tex --version info about my tex version, in short it's Version 3.14

My pgf version is 2.10 (used this post to get that)

My tikZ version (obtained by following this post) is;

tikz.sty 2010/10/13 v2.10 (rcs-revision 1.76)

Here is the code used to find TikZ version, copied from this post

\documentclass{article}
\usepackage{tikz}

\listfiles

\begin{document}
\pgfversion
\end{document}

error message that I'm currently getting :

! I can't find file `tikzlibrarygraphdrawing.code.tex'.
<argument> ...nput tikzlibrary\pgf@temp .code.tex 
                                                  \catcode `\@ =\csname tikz...
l.31 \usetikzlibrary{graphs,graphdrawing}

(Press Enter to retry, or Control-D to exit)
Please type another input file name: ! I can't find file `tikzlibrarygraphdrawing.code.tex'.

Script that I'm using to compile :

#!/bin/sh

echo "Running pdflatex first..."
sleep 1
lualatex -shell-escape ./main.tex

echo "Running biber first..."
sleep 1
biber main

echo "Running pdflatex second..."
sleep 7
lualatex -shell-escape ./main.tex

echo "Running pdflatex third..."
sleep 7
lualatex -shell-escape ./main.tex
baxx
  • 709
  • 1
    Either you don't have the package installed or your TeX installation is not sufficiently current. What version of TiKZ/PGF do you have? What edition of TeX Live? – cfr Apr 13 '15 at 01:45
  • 1
    Put \pgfversion somewhere in your document and update if it is not version 3.0 – percusse Apr 13 '15 at 08:53
  • @cfr thanks, was very tired last night and faded soon after this. I've added the info to this post, @percusse suggests updating \pgfversion, so I'll try that now – baxx Apr 13 '15 at 16:03
  • @percusse thanks, I've updated the OP, it seems that I'm a bit behind there. I have read that repositories can often be behind the official releases a fair bit, and that I might uninstall tex completely and reinstall from the official site. I've not done this before, would be cool to hear any thoughts on that though :) – baxx Apr 13 '15 at 16:09
  • You can download from SourceForge a .tds.zip, which you could unzip into your personal or local tree and not worry about needing to update a whole installation. (Assuming TikZ/PGF doesn't require newer versions of other things.) – jon Apr 13 '15 at 18:46
  • @jon Won't there also have been changes to luatex, if nothing else? Plus TikZ/PGF is so big that I thought it was usually recommended to update generally - it is almost bound to depend on something. Plus, there are independent packages which are built on it. Some of those won't exist on an older install, of course. But some will. – cfr Apr 13 '15 at 23:01
  • @cfr I'm currently messing about with PPAs and stuff, i've dug myself a bit of a hole :P – baxx Apr 13 '15 at 23:02
  • @user3130747 Highly recommend installing from upstream. Type 'vanilla' into the search box and scroll down a few questions to the one with lots of votes and views. There are detailed instructions for Debian/Ubuntu. Should be easy to modify for other distros. – cfr Apr 13 '15 at 23:02
  • @cfr thanks - TBH I'm not too concerned about the actual installation, it's how it's going to sit in with what I currently have and any potential package conflicts that I'm not too sure about – baxx Apr 13 '15 at 23:04
  • @user3130747 Read the thread on installing 'vanilla'. If you mean conflicts of LaTeX packages because you have a lot of custom stuff, that's a real issue. If you mean packages installed by your distro, it is not. You need to take care of it, but the instructions are good and once done, it is done. (I use this method on 2 different distros and it is easier on Debian/Ubuntu than it was on those.) – cfr Apr 13 '15 at 23:17
  • @cfr thanks I will do - when you say custom stuff, do you mean things that I've installed such as LuaLatex (there are others, I'd have to check) or things that I have actually coded (which there are none;) ). – baxx Apr 13 '15 at 23:19
  • @user3130747 Things you've coded. The other stuff will just need to be scrubbed so you don't have remnants of an older installation. The problem would be if you have personal classes or packages which depended on specific versions of things in your current install and which an update might break. (Generally, these problems are fairly easy to solve, but they are a complication.) – cfr Apr 13 '15 at 23:48
  • @cfr thanks, I was unsure about what exactly needed to be scrubbed. To be honest though I've not got a massive setup going so it wouldn't be the end of the world to set things up again I guess. I'm just going to test it in a VM now then I'll run it, not sure why I didn't set a VM up earlier! Going over that vanilla guide, good stuff, thanks – baxx Apr 13 '15 at 23:50
  • Installing TL2014 is not a good idea now, in my opinion. It was just frozen in preparation for the release of TL2015. I'd first try to use the .tds.zip as a local/personal install and see if that works. If it doesn't, then remove it, no harm, no foul; if it does work, use it ... and when TL2015 comes out, then install that as cfr said. The .tds.zip is a minor thing compared to doing a whole new TL install, purging your old install, etc., etc. – jon Apr 14 '15 at 00:31
  • @jon ok I'll that in mind for tomorrow, thank you. Would that be off this page : http://www.tug.org/texlive//devsrc/Master/texmf-dist/doc/latex/latex-tds/ , there are a few .tds.zip files there – baxx Apr 14 '15 at 00:35
  • Go straight to the source: http://sourceforge.net/projects/pgf/files/ . Note that there are questions here about how to deal with .tds.zip files; the essential point is that you can unzip them at the root of a 'TDS' tree like ~/texmf and they will unzip in a TeX Directory Structure-compliant way. – jon Apr 14 '15 at 01:33

0 Answers0