On Wed, May 18, 2016 at 06:39:06AM +0000, Meer, Hans van der wrote:
> 
> On 18 May 2016, at 07:38, Will Robertson <w...@wspr.io<mailto:w...@wspr.io>> 
> wrote:
> It should be fine to have something like
> 
>    \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
> 
> for the time being. This should catch 99.999% of users?
> 
> This is the macro I am using to find if a file exists and act upon it. Hope 
> this helps.
> 
> % .... File finding 
> ...........................................................
> 
> % If #1.#2 or #1 exists execute #3{#1} and return \iftrue else only return 
> \iffalse.
> % do not forget to close with \fi or with \else...\fi
> % Use #3=\gobbleoneargument to effectively kill #3{file}.
> % Use #3=\relax to leave file behind.
> % Use #3={\def\macrotodefine} to define file as macro content.
> \def\iffilewithsuffix#1#2#3{%
> \let\mynext\iftrue
> \doiffileelse{#1.#2}% existence of #1.#2 tested
> {#3{#1.#2}}% #1.#2 does exist
> {\doiffileelse{#1}% existence of #1 tested
> {#3{#1}}% #1 exists
> {\let\mynext\iffalse}% neither file exists remove macro call
> }%
> \mynext
> }
> \def\ifexistfilewithsuffix#1#2{%
> \let\mynext\iftrue
> \doifnotfile{#1.#2}{\doifnotfile{#1}{\let\mynext\iffalse}}%
> \mynext
> }
> 
> Hans van der Meer
> 
> 

Thanks Hans and everyone else for all the help.

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to