I've written my own biblatex citation style and decided to put both the bbx and the cbx file in a dtx file to process that with docstrip. Now I would like to have docstrip place the files in my local folder ~/Library/texmf/tex/latex/biblatex/bbx/ and .../cbx/ respectively. My attempt at using the following ins file failed:

\input docstrip.tex

It just places both files in the same directory as the dtx file. My guess is that I didn't quite understand the usage of \usedir in the docstrip manual ... Any help would be appreciated!

The ins and dtx file are both in ~/Library/texmf/tex/source/blah/ by the way.


From the docstrip documentation:


This macro is administrator’s way of saying “yes, I want to use that directories support of yours”. DocStrip will write only to current directory unless your config has a call to this macro. (This means DocStrip won’t write to random directories unless you tell it to, which is nice.) Using this macro you can specify a base directory for TEX-related stuff. E.g., for many Unix systems that would be


and for standard emTEX installation


You need a more explicit approach:

\input docstrip.tex


  1. I couldn't really test this, missing blah.dtx :)

  2. The ~ is also messing up your code; remember it means "unbreakable space", so you have to make it a letter (that's what the mysterious catcode is there for).

  3. It may not work anyway with ~, try changing that to \BaseDirectory{/home/koji} or whatever your home dir is.

  4. Depending on your system, you may have change the variable openout_any in your texmf.cnf. Edit: Since you seem to be using osx, this involves adding

    openout_any = a

    in your file

| improve this answer | |
  • Just an aside: make very sure you don't mistype your paths, you can end up overwriting important files in your system ... – Koji Mar 20 '12 at 12:16
  • Hm, this still results in a ! I can't write on file ... error by LaTeX. Could it be that I need to "reload" texmf.cnf and if yes, how does that work? And do I need to change the catcode of ~ back after I've used it for the filename? – Jonathan Mar 20 '12 at 12:58
  • @Jonathan: It works here, make sure of a few things: a) change ~ for your homedir; on OS X, it's a path of the form /Users/<username>. b) Watch carefully my DeclareDir definition, there's an intentional typo there: "Library/texmfa/tex" should be "Library/texmf/tex"!! – Koji Mar 20 '12 at 13:28
  • @Jonathan: also, the directories have to exist before hand. – Koji Mar 20 '12 at 13:30
  • Ok, it worked now. Seems that the expansion of ~ didn't work, which is a pity because this means it only works for my user now. Is there a way to set BaseDirectory to my local textree? – Jonathan Mar 20 '12 at 15:42

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.