package tikz

4,593 views
Skip to first unread message

Anglea

unread,
Mar 18, 2011, 3:03:59 PM3/18/11
to LaTeX Users Group

Hi everyone,

I need to use the tikz package to generate some plots, do I need to
download any packages for this??

\usepackage{tikz,pgfplots,pgf}
\usetikzlibrary{calc}
\usetikzlibrary{trees}

I have got the following error message:::::
./port.tex:13:File `pgfplots.sty' not found. \usetikzlibrary

wishes,

Werner Grundlingh

unread,
Mar 18, 2011, 5:49:19 PM3/18/11
to latexus...@googlegroups.com
If your distribution is not set up to automatically download packages as needed (like in MiKTeX, for example), then you have to download them yourself. Do you know where to go to download the required packages?

Regardless, what distribution are you using to compile your document? For example, if you're using MiKTeX on a Windows system, it comes with a 'Package Manager' that allows you to (un-)install packages as needed, and also run the required \texhash to update your filename database (FNDB).

Werner

Peter Flynn

unread,
Mar 18, 2011, 7:55:50 PM3/18/11
to latexus...@googlegroups.com
On Fri, Mar 18, 2011 at 9:49 PM, Werner Grundlingh <wgrun...@gmail.com> wrote:
If your distribution is not set up to automatically download packages as needed (like in MiKTeX, for example), then you have to download them yourself. Do you know where to go to download the required packages?

Regardless, what distribution are you using to compile your document? For example, if you're using MiKTeX on a Windows system, it comes with a 'Package Manager' that allows you to (un-)install packages as needed, and also run the required \texhash to update your filename database (FNDB).

If your distribution does not have a Package Manager that automatically gets packages for you, you will need to download the files manually from CTAN and put them in the right places. Details of how to do this are at  http://latex.silmaril.ie/formattinginformation/addons.html#pkginst

///Peter


Paulo Rogerio

unread,
Mar 19, 2011, 9:23:08 AM3/19/11
to LaTeX Users Group
I believe your problem is the libraries of Tikz.
You can found the PGF package description in http://ctan.org/pkg/pgf
and the "Tikz & PGF Manual".

Good luck

On 18 mar, 19:55, Peter Flynn <anglebrac...@gmail.com> wrote:

Anglea

unread,
Mar 21, 2011, 1:28:07 PM3/21/11
to LaTeX Users Group
Thanks for help,

\usepackage{tikz,pgfplots,pgf}
\usetikzlibrary{calc}
\usetikzlibrary{trees}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{decorations.pathmorphing}

Now it does not complain from the pgfplots as I was successful to
download it. I am using Kile on Linux and I do not know how to check
which version that Iam using . below is the error message when I
compiled my file, it still complains from the \usetikzlibrary and it
does not recongnize this command. I do not what is the problem, is it
related to the version??

/H.tex:13:Undefined control sequence. \usetikzlibrary
./H.tex:13:Missing \begin{document}. \usetikzlibrary{c
./H.tex:14:Undefined control sequence. \usetikzlibrary
./H.tex:15:Undefined control sequence. \usetikzlibrary
./H.tex:16:Undefined control sequence. \usetikzlibrary

thanks

Paul Johnson

unread,
Mar 24, 2011, 1:16:41 AM3/24/11
to latexus...@googlegroups.com
On Mon, Mar 21, 2011 at 12:28 PM, Anglea <hanyah...@yahoo.com> wrote:
> Thanks for help,
>
> \usepackage{tikz,pgfplots,pgf}
> \usetikzlibrary{calc}
> \usetikzlibrary{trees}
> \usetikzlibrary{decorations.markings}
> \usetikzlibrary{decorations.pathmorphing}
>
> Now it does not complain from the pgfplots as I was successful to
> download it. I am using Kile on Linux and I do not know how to check
> which version that Iam using . below is the error message when I
> compiled my file, it still complains from the \usetikzlibrary and it
> does not recongnize this command. I do not what is the problem, is it
> related to the version??

Kile is just a text editor. It is not a LaTeX system configurator, so
far as I know.

You said you downloaded. But then it is necessary to move the file
folder into a location that is in the latex PATH, and then run
"texhash" or "mktexslr" (depending on which linux distribution you
use). You will know the system can find the package if you go look in
the ls-R files in the LaTeX path.

It seems unlikely to me that you should actually have to do that kind
of manual install, though. Unlike Windows, you won't have a package
manager from TexLive, but I am certain there are packages for your
system that will have what you need. In Ubuntu, for example, I have
these packages:

pgf - TeX Portable Graphic Format
texlive-pictures - TeX Live: Graphics packages and programs

Fedora has a lot of texlive packages, I'm sure it is in there too.

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

Peter Flynn

unread,
Mar 24, 2011, 5:37:41 AM3/24/11
to latexus...@googlegroups.com
On Thu, Mar 24, 2011 at 5:16 AM, Paul Johnson <paulj...@gmail.com> wrote:
On Mon, Mar 21, 2011 at 12:28 PM, Anglea <hanyah...@yahoo.com> wrote:
> Thanks for help,
>
> \usepackage{tikz,pgfplots,pgf}
> \usetikzlibrary{calc}
> \usetikzlibrary{trees}
> \usetikzlibrary{decorations.markings}
> \usetikzlibrary{decorations.pathmorphing}
>
> Now it does not complain from the pgfplots as I was successful to
> download it. I am using Kile on Linux and I do not know how to check
> which version that I am using.

The versions of packages are in the first few lines of each .sty file, and are sometimes also echoed to the log file of the document that you process.

Or did you mean the version of Kile? That's in Kile's Help menu.
Or did you mean the version of TeX? That's at the top of the log file.
 
> below is the error message when I
> compiled my file, it still complains from the \usetikzlibrary and it
> does not recongnize this command. I do not what is the problem, is it
> related to the version??

Kile is just a text editor. It is not a LaTeX system configurator, so far as I know.

You said  you downloaded.  But then it is necessary to move the file folder into a location that is in the latex PATH, and then run "texhash" or "mktexslr" (depending on which linux distribution you use).  You will know the system can find the package if you go look in the ls-R files in the LaTeX path.

There is also the command kpsewhich, which works like the standard Unix which command, eg
$ kpsewhich tikz.sty
will tell you where the file is, if it's installed correctly.
 
It seems unlikely to me that you should actually have to do that kind of manual install, though. Unlike Windows, you won't have a package manager from TexLive,

There is a command in TL2009/TL2010 for Unix systems called tlmgr, which is modelled on the MiKTeX Package Manager, for installing and removing LaTeX packages, but AFAIK it's still under development.
 
but I am certain there are packages for your system that will have what you need.  In Ubuntu, for example, I have these packages:

pgf - TeX Portable Graphic Format
texlive-pictures - TeX Live: Graphics packages and programs

If your Linux system has TL in its own package manager repositories (eg yum, rpm, apt, Synaptic, etc), then IMHO you should install TeX from there, and not from the TL DVD, because they are much more tightly integrated into the rest of the system...unless you particularly need the very latest versions of everything (Linux package manager repositories are usually about 6 months behind the release of a the TL DVD because of the work involved in repackaging them).

If you really do have to install a package by hand, there are details of where things must be put at http://latex.silmaril.ie/formattinginformation/addons.html#pkginst

///Peter
Reply all
Reply to author
Forward
0 new messages