Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/ifplatform

The IFPLATFORM package
v0.4        2010/10/22

This package uses heuristics to establish whether
the document is being processed on Windows or a *NIX
platform (Mac OS X, Linux, etc.).

Except if you're using LuaTeX where this information
is already known. Otherwise, shell escape is required
to differentiate different *NIX platforms.

Booleans provided are:
 - ifwindows
 - iflinux
 - ifmacosx
 - ifcygwin

Finally, the \platformname macro is also provided that
expands to a string of the platform name.

Will Robertson         wspr 81 at gmail dot com
Johannes Große

Copyright 2007-2010 Will Robertson
Copyright 2007      Johannes Große
Distributed under the LaTeX Project Public License

Down­load the con­tents of this pack­age in one zip archive (152.6k).

if­plat­form – Con­di­tion­als to test which plat­form is be­ing used

This pack­age uses the ex­ten­sion -shell-es­cape to es­tab­lish whether the doc­u­ment is be­ing pro­cessed on a Win­dows or on a Unix-like sys­tem (Mac OS X, Linux, etc.), or on Cyg­win (Unix en­vi­ron­ment over a win­dows sys­tem).

Booleans pro­vided are:

  • \ifwin­dows,
  • \iflinux,
  • \if­ma­cosx and
  • \if­cyg­win.

The pack­age also pre­serves the out­put of un­ame on a Unix-like sys­tem, which may be used to dis­tin­guish be­tween var­i­ous classes of Unix sys­tems.

Li­censeThe Project Public Li­cense
Main­tainerWill Robert­son
Jo­hannes Gro├če
TDS archiveifplatform.tds.zip
Con­tained inTeX Live as if­plat­form
MiKTeX as if­plat­form
Topics ex­am­ine the pro­gram­ming en­vi­ron­ment
Guest Book Sitemap Contact Contact Author