After the new LaTeX2e <2019-10-01>
version, I got this error:
! Package filehook Error: Detected 'scrlfile' package with unknown
definition o f \InputIfFileExists.
It seems related with some definition in KOMA Script, as described here. As instructed I updated Koma from their repository:
tlmgr install –reinstall –repository
https://www.komascript.de/repository/texlive/2019 koma-script
But the error persists.
Does somebody knows if there is another package to be updated after the recent changes in LaTeX2e
?
EDIT: MWE Added, with the command suggested by @PhelypeOleinik
\PassOptionsToPackage{force}{filehook}
\documentclass[ebook]{memoir}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{xsim}
\begin{document}
Test
\end{document}
EDIT2,Oct 22,2019: Added the code suggested by @PhelypeOleinik in the Answer:
\RequirePackage{etoolbox}
\makeatletter
\patchcmd\load@onefilewithoptions
{\expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
\let\CurrentOption\@empty% Anchor point to make sure we're patching the right place
}{}{}{\errmessage{This patch is no longer necessary}%
\newcommand\gobblesix[6]{}\gobblesix}
\patchcmd\load@onefilewithoptions
{\InputIfFileExists}
{\expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
\InputIfFileExists}{}{\FAILED}
\makeatother
\PassOptionsToPackage{force}{filehook}
\documentclass[ebook]{memoir}
\usepackage{filehook}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{xsim}
\begin{document}
Test
\end{document}
I got this error:
Package filehook Warning: Detected 'scrlfile' package with unknown definition of
\InputIfFileExists.
The 'force' option of 'filehook' is in effect. Macro is overwritten with default
! on input line 108.
Best Answer
Update 2020-02-04: both
memoir
andfilehook
were updated and now this problem shouldn't happen. If it does, please update your TeX distribution.Here you have two problems at once. The first one was reported here, and is due to a bad timing of setting package hooks. This happens because
filehook
loadsfilehook-memoir
, andfilehook-memoir
does\RequirePackage{filehook}
, and this makes the option parser go off tracks and report thatfilehook
doesn't have aforce
option (even though it does).The issue has already been fixed here and will eventually be updated in the LaTeX format. For now, use this patch (this has to be the very first thing in your document):
After you get that out of the way, just tell
filehook
to use theforce
option untilmemoir
is updated (should be soon) andfilehook-memoir
is updated to match the updatedmemoir
:By the way, the problem doesn't depend on
xsim
andfontspec
, also the problem arises withunicode-math
because it eventually loadsfilehook
, so the issue can be narrowed down to: