You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
13 years ago
|
--- texmf-dist/tex/latex/ifplatform/ifplatform.sty 2009-09-10 19:47:34.000000000 -0400
|
||
|
+++ texmf-dist/tex/latex/ifplatform/ifplatform.sty.new 2011-05-18 10:45:03.594630489 -0400
|
||
|
@@ -10,7 +10,7 @@
|
||
|
%% License information appended.
|
||
|
\ProvidesPackage{ifplatform}
|
||
|
[2009/09/10 v0.3a Testing for the operating system]
|
||
|
-\RequirePackage{pdftexcmds,catchfile}
|
||
|
+\RequirePackage{pdftexcmds,catchfile,ifluatex}
|
||
|
\newif\ifshellescape
|
||
|
\newif\ifwindows
|
||
|
\newif\ifmacosx
|
||
|
@@ -27,10 +27,12 @@
|
||
|
\ifnum\pdf@shellescape=1\relax
|
||
|
\shellescapetrue
|
||
|
\else
|
||
|
+ \ifluatex\else
|
||
|
\PackageWarningNoLine{ifplatform}{^^J \space\space\space
|
||
|
shell escape is disabled,
|
||
|
so I can only detect \@backslashchar ifwindows%
|
||
|
}
|
||
|
+ \fi
|
||
|
\fi
|
||
|
\def\ip@cantdecide{%
|
||
|
\PackageWarningNoLine{ifplatform}{^^J \space\space\space
|
||
|
@@ -38,6 +40,15 @@
|
||
|
you appear to be both%
|
||
|
}%
|
||
|
}
|
||
|
+\ifluatex
|
||
|
+ \csname\directlua{
|
||
|
+ if os.type == "unix" then
|
||
|
+ tex.sprint("@ip@nix@true")
|
||
|
+ elseif os.type == "windows" then
|
||
|
+ tex.sprint("windowstrue")
|
||
|
+ end
|
||
|
+ }\endcsname
|
||
|
+\else
|
||
|
\IfFileExists{nul:}{\@ip@nix@false}{\@ip@nix@true}
|
||
|
\IfFileExists{/dev/null}{\windowsfalse}{\windowstrue}
|
||
|
\edef\ip@windows@echo@test{echo \string# > "\ip@file"}
|
||
|
@@ -73,6 +84,7 @@
|
||
|
\fi
|
||
|
\fi
|
||
|
\fi
|
||
|
+\fi
|
||
|
\def\ip@only@six#1#2#3#4#5#6#7\@nil{#1#2#3#4#5#6}
|
||
|
\if@ip@nix@
|
||
|
\ifshellescape
|