# Problems installing xpatch

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?

• Why not update your entire LaTeX installation instead of attempting to install packages manually. – daleif Jun 4 '14 at 9:01
• You should first extract the `.sty` file in a working directory where `xpatch.ins` and `xpatch.dtx` are saved. However, I don't think it will work with TeX Live 2011, because it needs `expl3` in a version that is unlikely to be available. Update your TeX distribution. – egreg Jun 4 '14 at 9:02
• @egreg Is there a `.tds.zip` version of `xpatch` on CTAN? Is so, Alexander could grab `l3kernel.tds.zip`, `l3packages.tds.zip` and the `xpatch` TDS zip from CTAN and install them all locally. – Joseph Wright Jun 4 '14 at 9:03
• @JosephWright Yes, there is: mirrors.ctan.org/install/macros/latex/contrib/xpatch.tds.zip – egreg Jun 4 '14 at 9:08
• I am relatively new to Latex, so did not consider updating the distribution. Did so, and everything works like a charm. Thanks a lot for responding. – Alexander Jun 5 '14 at 6:54

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