# marginnote and framed - workaround fails with lualatex

I have this code in my 12 year old Tex files that I currently like to upgrade such that they work with lualatex. I load this code in order to fix a problem with marginnote and framed. Unfortunately I did not document which problem and how to show it.

% !TeX program = lualatex
\documentclass{minimal}

\usepackage{ifpdf}
\usepackage{framed}
\usepackage{marginnote}

\ifpdftex{%
\ifpdfoutput{}{%
\begingroup
\makeatletter
}
\makeatother
\endgroup
}% ifpdfoutput
}{}% ifpdftex

\begin{document}
\end{document}


My first question is: Do I still need this?

Second question: How can I work around the problem with lualatex:

! Incomplete \iffalse; all text was ignored after line 14.


The error happens somewhere in the code. It worked with pdflatex.

• well the question is how \ifpdftex and \ifpdfoutput are defined in your code. (default definitions from \iftex wouldn't uses braces for the cases but \else and \fi. Aug 5 at 21:07
• I updated the code. I seem to use the definitions of the ifpdf package. Aug 6 at 5:05
• no. The ifpdf package never defined such tests. If you previously used one of the koma classes you could have such tests but they have been removed/renamed. In any case they are useless here (as are the begingroup/endgroup). If your frame patch has some use, it can be done always. Aug 6 at 8:05
• the posted code gives errors in pdflatex and luatex, please clarify your question so the example matches the problem description, working in pdftex and not in luatex Aug 6 at 9:09
• I assume that I had never loaded marginnote, so that the code was always unused. Now I removed the code so that I do not need to correct it. Thanks anyway. Aug 8 at 20:40