[Tex/LaTex] Problems installing xpatch

installingxpatch

I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch.ins and xpatch.dtx files) to the /usr/local/texlive/2011/../texmf-local/ folder. When I run the command above, I get the output Generating file(s) ./xpatch.sty
! Cannot find file xpatch.dtx.
\readsource ...ot find file \uptospace #1 \qStop }
\else \processedLines \z@ ...
l.34 ...xpatch.sty} {\from{xpatch.dtx} {package}}}

I've checked, and the .dtx file is in the folder. Any ideas what the problem is?

Best Answer

Rather than extracting the code yourself, I suggest you use the tds.zip files available on CTAN to do the installation. The xpatch package needs an up-to-date expl3 and xparse bundle, so you need to download three files:

These are all 'ready to install', and what you need to do is unzip them inside your local TeX tree (not /usr/local/texlive/2011/): as you have a Unix system, this is probably ~/texmf unless you use a Mac, in which case it's ~/Library/texmf. You should end up with a structure of the form

<root>/texmf/tex/latex/xpatch/xpatch.sty
<root>/texmf/tex/latex/l3kernel/expl3.sty
...

at which point your TeX system should find the files.