I'd like to do something like the following (in pseudo-TeX)


For example, I know that a template file I wrote is used by people who don't have the mdframed package. So I want to write:


Is there anything that provides that kind of functionality?


Use \IfFileExists. Here's a code snippet from my idxlayout package that tests for the availability of ragged2e.

      Package ragged2e not available, therefore\MessageBreak
      substituting command raggedright for RaggedRight\MessageBreak
  • I added code like this to enable optional features in my packages which depend on other packages. However I got the impression that \IfFileExists already triggers MikTeX auto-install feature (I didn't do deeper tests). – Martin Scharrer Jan 22 '13 at 22:03





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.