1

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:

enter image description here

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):

chapter1footnote

How it currently looks on the exec. sum. page (blank footnote):

enter image description here

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}

JamesT
  • 3,169
  • 1
    Aside: In literary style (fiction, etc.), if a footnote pertains to the whole chapter instead of a particular sentence, it is placed without marker at the chapter start. Just as the question was asked here. Example: "This chapter is based on a theme from Shakespeare." – rallg Feb 13 '23 at 22:42

1 Answers1

2

To make your command work use:

\makeatletter    
\newcommand\blankFootnote[1]{%
\let\old@makefntext\@makefntext
\renewcommand\@makefntext[1]{  \noindent \mbox{}{#1}}
\let\svthefootnote\thefootnote
\let\thefootnote\relax
\footnote{#1}
\addtocounter{footnote}{-1}
\let\thefootnote\svthefootnote
\let\@makefntext\old@makefntext
\makeatother
}

This is a different approach. The \rawfootnote{<text>} command will add the "text" (two lines in the example) to the bottom of the current page using a tikz node and draw the top line (required space must be empty) mimicking the \footline command.

a

\documentclass[oneside]{book}

\usepackage{showframe}% only to show the margins

%******************************* added <<<<<<<<<<<<<< \usepackage{tikzpagenodes} \newcommand{\rawfootnote}[1]{% \begin{tikzpicture}[remember picture,overlay] \node(F) [text width=\linewidth,align=left, anchor=south west, inner sep=0, font=\footnotesize] at (current page text area.south west) {#1}; \draw([yshift=0.4\baselineskip]F.north west)--+(0.4\linewidth,0pt); \end{tikzpicture} } %*******************************

\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.%

\rawfootnote{The total page count for this report is X~pages out of a maximum 35 pages. The total page count for this report is X~pages out of a maximum 35 pages.}


\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}

Simon Dispa
  • 39,141