CTAN has a new package: ifplatform
This package uses -shell-escape to establish whether the document is being processed on Windows or a *NIX platform (Mac OS X, Linux, etc.). Booleans provided are: - ifwindows - iflinux - ifmacosx
This package is located at http://tug.ctan.org/tex-archive/macros/latex/contrib/ifplatform . More information is at http://tug.ctan.org/pkg/ifplatform (if the package is new it may take a day for that information to appear). We are supported by the TeX Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/usergroups.html .
ifplatform – Conditionals to test which platform is being used
This package uses the (La)TeX extension -shell-escape to establish whether the document is being processed on a Windows or on a Unix-like system (Mac OS X, Linux, etc.), or on Cygwin (Unix environment over a windows system).
Booleans provided are:
- \ifmacosx and
The package also preserves the output of uname on a Unix-like system, which may be used to distinguish between various classes of Unix systems.
- 2011-01-24 CTAN update: ifplatform
- 2009-09-10 CTAN update: ifplatform
- 2007-11-20 CTAN has a new package: ifplatform