I am asked to use the latest acmart style for my paper. However, when I downloaded the template and tried to compile the sample text, it failed with message ! LaTeX Error: File iftex.sty not found.

My command is: > pdflatex sample-sigplan.tex (also tried latex) and the package and template I downloaded is https://www.acm.org/publications/proceedings-template and the acmart.cls is from http://www.sigplan.org/sites/default/files/acmart/current/acmart.cls

My system is Ubuntu 14.04. How to fix it?

• google.co.uk/search?q=iftex.sty shows multiple links to the file, just save it in the same folder as your document. (however it is contained in miktex and texlive so you should have it in your tex system, or could add it by updating via the tex package manager) – David Carlisle Sep 21 '17 at 21:19

iftex.sty is part of the texlive-generic-extra package:

sudo apt-get install texlive-generic-extra


I had the same issue. Create a file called iftex.sty and put it in your document folder. The contents of the file should be

%%
%% This is file iftex.sty',

%%
%%   __________________________________
%%
%%
%%
\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
\ProvidesPackage{iftex}
[2013/04/04 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX, and LuaTeX]
\fi
\def\RequirePDFTeX{%
\ifPDFTeX\else
\begingroup
\errorcontextlines=-1\relax
\newlinechar=10\relax
\errmessage{^^J
********************************************^^J
* PDFTeX is required to compile this document.^^J
* Sorry!^^J
********************************************}%
\endgroup
\fi}
\def\RequireXeTeX{%
\ifXeTeX\else
\begingroup
\errorcontextlines=-1\relax
\newlinechar=10\relax
\errmessage{^^J
********************************************^^J
* XeTeX is required to compile this document.^^J
* Sorry!^^J
********************************************}%
\endgroup
\fi}
\def\RequireLuaTeX{%
\ifLuaTeX\else
\begingroup
\errorcontextlines=-1\relax
\newlinechar=10\relax
\errmessage{^^J
********************************************^^J
* LuaTeX is required to compile this document.^^J
* Sorry!^^J
********************************************}%
\endgroup
\fi}
\expandafter\ifx\csname ifPDFTeX\endcsname\relax\else
\expandafter\endinput
\fi
\expandafter\ifx\csname ifXeTeX\endcsname\relax\else
\expandafter\endinput
\fi
\expandafter\ifx\csname ifLuaTeX\endcsname\relax\else
\expandafter\endinput
\fi
\newif\ifPDFTeX
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfmatch\endcsname\relax
\PDFTeXfalse
\else
\PDFTeXtrue
\fi
\newif\ifXeTeX
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname XeTeXinterchartoks\endcsname\relax
\XeTeXfalse
\else
\XeTeXtrue
\fi
\newif\ifLuaTeX
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\LuaTeXfalse
\else
\LuaTeXtrue
\fi
%%
%%
%% Distributable under the LaTeX Project Public License,