I am writing a report in the book class (compiling with LuaLaTeX) where I need a page count on my executive summary (exec. sum.) page. I did not want the footnote on the exec. sum. page to be numbered/visible and for there to be no indent before the footnote text (the sentence I need to put just covers 2 lines). I pieced together two bits of code from other questions a while back, namely, an answer by PLG to How to remove indentation in footnote? which (after being adapted) looks like this:
\makeatletter
\renewcommand\@makefntext[1]{%
\setlength\parindent{1em}%
\noindent
%\mbox{\@thefnmark.~}{#1}} % Commenting removes the number from the footnote
\mbox{}{#1}
}
\makeatother
and an answer by Steven B. Segletes to Footnotes without numbering which (after being adapted) looks like:
\let\svthefootnote\thefootnote
\let\thefootnote\relax
\footnote{The total page count for this report is X~pages out of a maximum 35 pages.}
\addtocounter{footnote}{-1}
\let\thefootnote\svthefootnote
I combined the two in my document and tried to create a command that I could put in the preamble (rather then literally at the point I need a footnote with no indent and number in-text) but it produced this:
The command I created is not good and doesn't work (I am not even sure if putting \makeatletter or \begingroups etc in commands is needed/workable). I am not sure how to limit the global reach of redefining \@makefntext (or where to restore it by uncommenting the % line):
\newcommand\blankFootnote[1]{%
\begingroup
\makeatletter % https://tex.stackexchange.com/a/587493/245306
\renewcommand\@makefntext[1]{%
\setlength\parindent{1em}%
\noindent
%\mbox{\@thefnmark.~}{#1}} % Commenting removes the number from the footnote
\mbox{}{#1}
}
\makeatother
\let\svthefootnote\thefootnote
\let\thefootnote\relax
\footnote{#1}
\addtocounter{footnote}{-1}
\let\thefootnote\svthefootnote
\endgroup
}
How can I create a preamble command that allows me to put a footnote with no indent and numbering in-text in my exec. sum. page and restore normal book footnotes for the rest of the document please?
How it currently looks with the MWE (regular footnote in chapter 1):
How it currently looks on the exec. sum. page (blank footnote):
MWE:
\documentclass[oneside]{book}
%\newcommand\blankFootnote[1]{%
%\begingroup
%\makeatletter % https://tex.stackexchange.com/a/587493/245306
%\renewcommand@makefntext[1]{%
% \setlength\parindent{1em}%
% \noindent
% %\mbox{@thefnmark.~}{#1}} % Commenting removes the number from the footnote
% \mbox{}{#1}
%}
%\makeatother
%\let\svthefootnote\thefootnote
%\let\thefootnote\relax
%\footnote{#1}
%\addtocounter{footnote}{-1}
%\let\thefootnote\svthefootnote
%\endgroup
%}
\begin{document}
\chapter*{Executive Summary}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.%
\begingroup
\makeatletter % https://tex.stackexchange.com/a/587493/245306
\renewcommand@makefntext[1]{%
\setlength\parindent{1em}%
\noindent
%\mbox{@thefnmark.~}{#1}} % Commenting removes the number from the footnote
\mbox{}{#1}
}
\makeatother
\let\svthefootnote\thefootnote
\let\thefootnote\relax
\footnote{The total page count for this report is X~pages out of a maximum 35 pages.}
\addtocounter{footnote}{-1}
\let\thefootnote\svthefootnote
\endgroup
\mainmatter
\chapter{First}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\footnote{Lorem ipsum dolor sit amet, consectetur adipiscing elit}
\end{document}



