10

I am trying to run a rather simple code using tikz and a pgf library. My simple code is

\documentclass{book}
\usepackage[explicit]{titlesec}
\usepackage{fourier}
\usepackage{tikz}
\usepackage{epigraph}
\usepgflibrary{qrr.shapes.openrectangle}

\begin{document}

    This is a test document

\end{document}

This code was copied from Gonzalo Medina's answer in Customizing chapter style with tikz. When I run this code I get the error

'!Package pgf Error: I did not find the pgf library qrr.shapes.openrectangle'.

I am using TeXLive-2014 (actually I installed it yesterday) but nonetheless I updated all packages just in case, but that didn't seem to help.

Any idea how to use this specific library and why it cannot be found in the texmf trees?

  • 2
    The files are available in a GitHub repository. Save them in ~/texmf/pgf – egreg Jun 29 '14 at 15:43
  • @egreg : Thank you very much for your comment! How to add this repository to TeXLive and secondly and more important there is no ~/texmf directory... thanos@thanos-laptop:~$ cd ~/texmf bash: cd: /home/thanos/texmf: No such file or directory – Thanos Jun 29 '14 at 15:52
  • @egreg : All my packages are saved in /usr/local/texlive/2014/texmf-dist/tex/latex. I searched GitHub but which files should I download? – Thanos Jun 29 '14 at 16:58
  • The packages belonging to the distribution are there; for other package you should use another location. – egreg Jun 29 '14 at 18:04
  • You can create the directory if it doesn't exist. mkdir ~/texmf. – cfr Jun 29 '14 at 20:41
12

Check the location of your personal texmf tree: tlmgr conf texmf TEXMFHOME. Usually the result will be ~/texmf. The rest of the answer assumes this is the case. If the directory does not exist, you can create it. You might as well call mkdir -p ~/texmf/tex/generic/pgf right away, which will create a directory tree conforming to TeX Directory Structure (TDS). Without a proper structure, files will not be found during compilation.

Go to the newly created directory: cd ~/texmf/tex/generic/pgf. Then clone the GitHub repository containing the required PGF library: git clone https://github.com/Qrrbrbirlbel/pgf.git qrr. If the command is successful, the files will be found in a subdirectory called qrr. The directory can be named freely. I found the location of the repository by following a chain of links starting from the question and ending in this answer by Qrrbrbirlbel.

The example document should then compile. The instructions assume a Unix / Linux system. Some modifications would be required for Windows. On Mac OS X, only the default value of TEXMFHOME would be different, but the rest of the procedure should be the same.

  • 1
    Thank you very much for your answer! The weird thing is that TEXMFHOME isn't defined. thanos@thanos-laptop:~$ tlmgr conf texmf TEXMFHOME TEXMFHOME not defined in texmf config file (/usr/local/texlive/2014/texmf.cnf) texmf TEXMFHOME default value: /home/thanos/texmf (kpsewhich -var-value) – Thanos Jun 30 '14 at 19:47
  • 2
    @Thanos It is quite normal that TEXMFHOME is not set in the configuration file. The default ~/texmf (in your case /home/thanos/texmf) is used when there is no explicit value. Not weird at all. – mvkorpel Jun 30 '14 at 20:19
  • I just did sudo tlmgr conf texmf TEXMFHOME "~/texmf" and everything is set up! Thank you very much! – Thanos Jun 30 '14 at 20:46
2

For Windows 10 users, follow the steps below to install the pgf library:

  1. Clone/download the zip file containing the library. enter image description here
  2. Create the sub directory C:\texlive\texmf-local\tex\generic\pgf\qrr. Note that the folder name qrr can be changed to your liking.
  3. Copy files from the zipped file to this directory.
  4. Regenerate filename database in texlive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.