summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/ifplatform/README9
-rw-r--r--Master/texmf-dist/doc/latex/ifplatform/ifplatform.pdfbin129729 -> 151092 bytes
-rw-r--r--Master/texmf-dist/source/latex/ifplatform/ifplatform.dtx53
-rw-r--r--Master/texmf-dist/source/latex/ifplatform/ifplatform.ins12
-rw-r--r--Master/texmf-dist/tex/latex/ifplatform/ifplatform.sty22
5 files changed, 68 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/latex/ifplatform/README b/Master/texmf-dist/doc/latex/ifplatform/README
index 8977f40cfc4..cfa02ea4890 100644
--- a/Master/texmf-dist/doc/latex/ifplatform/README
+++ b/Master/texmf-dist/doc/latex/ifplatform/README
@@ -1,12 +1,14 @@
______________________
The IFPLATFORM package
-v0.3a 2009/09/10
+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.).
-Shell escape is required to differentiate different *NIX platforms.
+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
@@ -20,5 +22,6 @@ expands to a string of the platform name.
Will Robertson wspr 81 at gmail dot com
Johannes Große
-Copyright 2007, 2009 Will Robertson
+Copyright 2007-2010 Will Robertson
+Copyright 2007 Johannes Große
Distributed under the LaTeX Project Public License
diff --git a/Master/texmf-dist/doc/latex/ifplatform/ifplatform.pdf b/Master/texmf-dist/doc/latex/ifplatform/ifplatform.pdf
index e507e3f6200..55781872294 100644
--- a/Master/texmf-dist/doc/latex/ifplatform/ifplatform.pdf
+++ b/Master/texmf-dist/doc/latex/ifplatform/ifplatform.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/ifplatform/ifplatform.dtx b/Master/texmf-dist/source/latex/ifplatform/ifplatform.dtx
index 273f71e804c..4b6edfbe0e9 100644
--- a/Master/texmf-dist/source/latex/ifplatform/ifplatform.dtx
+++ b/Master/texmf-dist/source/latex/ifplatform/ifplatform.dtx
@@ -5,15 +5,17 @@
%<*readme>
______________________
The IFPLATFORM package
-v0.3a 2009/09/10
+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.).
-Shell escape is required to differentiate different *NIX platforms.
+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:
+Booleans provided are:
- ifwindows
- iflinux
- ifmacosx
@@ -25,7 +27,8 @@ expands to a string of the platform name.
Will Robertson wspr 81 at gmail dot com
Johannes Große
-Copyright 2007, 2009 Will Robertson
+Copyright 2007-2010 Will Robertson
+Copyright 2007 Johannes Große
Distributed under the LaTeX Project Public License
%</readme>
%<*internal>
@@ -36,12 +39,12 @@ Distributed under the LaTeX Project Public License
\input docstrip.tex
\keepsilent
\preamble
- _________________________________________________________
- Copyright (C) 2007, 2009 Will Robertson & Johannes Große
+ ________________________________________________________
+ Copyright (C) 2007-2010 Will Robertson & Johannes Große
License information appended.
\endpreamble
\postamble
-Copyright (C) 2007, 2009 by Will Robertson & Johannes Große
+Copyright (C) 2007-2010 by Will Robertson & Johannes Große
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -73,10 +76,10 @@ This work consists of the file ifplatform.dtx
\CodelineIndex
\RecordChanges
%\OnlyDescription
-\usepackage{array,booktabs,color,enumitem,geometry,microtype}
+\usepackage{array,booktabs,color,enumitem,geometry,hologo,microtype}
\usepackage[sc,osf]{mathpazo}
\usepackage[colorlinks]{hyperref}
-\geometry{a5paper,left=3.05cm,right=2cm}
+\geometry{b5paper}
\linespread{1.1} % A bit more space between lines
\frenchspacing % Remove ugly extra space after punctuation
\definecolor{niceblue}{rgb}{0.2,0.4,0.8}
@@ -138,7 +141,9 @@ This work consists of the file ifplatform.dtx
%
% \cs{ifshellescape} is provided as a conditional to test whether
% shell escape is active or not. (Note: new versions of pdf\/\TeX\
-% allow you to query shell escape with \verb|\ifnum\pdfshellescape>0|\,.)
+% allow you to query shell escape with \verb|\ifnum\pdfshellescape>0|\,,
+% and the \pkg{pdftexcmds} provides the wrapper \cs{pdf@shellescape}
+% which works with \hologo{XeTeX}, \hologo{pdfTeX}, and \hologo{LuaTeX}.)
%
% Also, the \cmd\platformname\ command is defined to expand to a
% macro that represents the operating system. Default definitions are
@@ -218,22 +223,24 @@ This work consists of the file ifplatform.dtx
% appear to be neither.\end{quote}
% then I'd dearly like to know how it happened. It should
% never occur, as far as I know.
+% (Update: in previous versions of this package, this message appeared when running under \hologo{LuaTeX}.)
% \end{itemize}
% Keep these points in mind and you'll never run into trouble.
% I hope you won't run into trouble in any case.
%
-% \StopEventually{\clearpage\PrintIndex}
+% \clearpage
+% \StopEventually{\PrintIndex}
% \section{Implementation}
%\iffalse
%<*package>
%\fi
% \begin{macrocode}
\ProvidesPackage{ifplatform}
- [2009/09/10 v0.3a Testing for the operating system]
+ [2010/10/22 v0.4 Testing for the operating system]
% \end{macrocode}
% Packages required: (thanks Heiko)
% \begin{macrocode}
-\RequirePackage{pdftexcmds,catchfile}
+\RequirePackage{pdftexcmds,catchfile,ifluatex}
% \end{macrocode}
% Conditionals we provide:
% \begin{macrocode}
@@ -275,10 +282,12 @@ This work consists of the file ifplatform.dtx
\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
% \end{macrocode}
% \end{macro}
@@ -291,7 +300,22 @@ This work consists of the file ifplatform.dtx
}%
}
% \end{macrocode}
-% Test for the null files of Windows and *nix. In a normal situation, this is all we need to do:
+% Now the platform test. In Lua\TeX\ this is straightforward:
+% \begin{macrocode}
+\ifluatex
+ \csname\directlua{
+ if os.type == "unix" then
+ tex.sprint("@ip@nix@true")
+ elseif os.type == "windows" then
+ tex.sprint("windowstrue")
+ end
+ }\endcsname
+\else
+% \end{macrocode}
+% Otherwise we need to
+% test for the null files of Windows and *nix.
+% (This doesn't work at all in LuaTeX. Not sure why; haven't looked.)
+% In a normal situation, this is all we need to do:
% \begin{macrocode}
\IfFileExists{nul:}{\@ip@nix@false}{\@ip@nix@true}
\IfFileExists{/dev/null}{\windowsfalse}{\windowstrue}
@@ -364,6 +388,7 @@ This work consists of the file ifplatform.dtx
\fi
\fi
\fi
+\fi
% \end{macrocode}
% Needed below:
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/ifplatform/ifplatform.ins b/Master/texmf-dist/source/latex/ifplatform/ifplatform.ins
index bca0a93093c..bcb67685fd3 100644
--- a/Master/texmf-dist/source/latex/ifplatform/ifplatform.ins
+++ b/Master/texmf-dist/source/latex/ifplatform/ifplatform.ins
@@ -5,18 +5,18 @@
%% The original source files were:
%%
%% ifplatform.dtx (with options: `batchfile')
-%% _________________________________________________________
-%% Copyright (C) 2007, 2009 Will Robertson & Johannes Große
+%% ________________________________________________________
+%% Copyright (C) 2007-2010 Will Robertson & Johannes Große
%% License information appended.
\input docstrip.tex
\keepsilent
\preamble
- _________________________________________________________
- Copyright (C) 2007, 2009 Will Robertson & Johannes Große
+ ________________________________________________________
+ Copyright (C) 2007-2010 Will Robertson & Johannes Große
License information appended.
\endpreamble
\postamble
-Copyright (C) 2007, 2009 by Will Robertson & Johannes Große
+Copyright (C) 2007-2010 by Will Robertson & Johannes Große
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -32,7 +32,7 @@ This work consists of the file ifplatform.dtx
\askforoverwritefalse
\generate{\file{ifplatform.sty}{\from{ifplatform.dtx}{package}}}
\endbatchfile
-%% Copyright (C) 2007, 2009 by Will Robertson & Johannes Große
+%% Copyright (C) 2007-2010 by Will Robertson & Johannes Große
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
diff --git a/Master/texmf-dist/tex/latex/ifplatform/ifplatform.sty b/Master/texmf-dist/tex/latex/ifplatform/ifplatform.sty
index cd7cfe51318..31840ce8e80 100644
--- a/Master/texmf-dist/tex/latex/ifplatform/ifplatform.sty
+++ b/Master/texmf-dist/tex/latex/ifplatform/ifplatform.sty
@@ -5,12 +5,12 @@
%% The original source files were:
%%
%% ifplatform.dtx (with options: `package')
-%% _________________________________________________________
-%% Copyright (C) 2007, 2009 Will Robertson & Johannes Große
+%% ________________________________________________________
+%% Copyright (C) 2007-2010 Will Robertson & Johannes Gro^^c3^^9fe
%% License information appended.
\ProvidesPackage{ifplatform}
- [2009/09/10 v0.3a Testing for the operating system]
-\RequirePackage{pdftexcmds,catchfile}
+ [2010/10/22 v0.4 Testing for the operating system]
+\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
@@ -123,7 +135,7 @@
\fi
\fi
}
-%% Copyright (C) 2007, 2009 by Will Robertson & Johannes Große
+%% Copyright (C) 2007-2010 by Will Robertson & Johannes Gro^^c3^^9fe
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of