14

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
20

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

sudo apt-get install texlive-generic-extra
0

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',

%% 
%%   __________________________________
%%   Copyright © 2010–2013 Persian TeX Group
%% 
%%   License information appended.
%% 
%% 
\csname iftexloaded\endcsname
\let\iftexloaded\endinput
\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
%% 
%% Copyright © 2010–2013      by Persian TeX Group     <persian-tex@tug.org>
%% 
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%% 
%% This work is "maintained" (as per LPPL maintenance status)
%% by Persian TeX Group.
%% 
%% 
%% 
%% 
%%
%% End of file `iftex.sty'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.