How to install tikz/pgf libraries

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.


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.