syntaxlatextex

Delete indentation in footnotes in LaTeX


I am trying to delete the indentation at the beginning of footnotes in my LaTeX document. Here is my code. I can not manage to delete the indentation at the beggining of footnotes.

\documentclass[12pt, a4paper]{book}
\usepackage{graphicx} 
\usepackage{titlesec}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{indentfirst}
\usepackage{fancyhdr}
\usepackage{lipsum}
%\usepackage{enumitem}
\usepackage[french]{babel}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage{xcolor}
%\usepackage[hang, flushmargin, bottom]{footmisc}
\usepackage{etoolbox}
\usepackage[authordate, backend=biber]{biblatex-chicago}
\graphicspath{{images/}}

\setstretch{1.2} 
\setlength{\parindent}{3em}
\setlength{\parskip}{0pt}
\frenchspacing

\makeatletter
\long\def\@makefntext#1{\parindent 0em\noindent
  \hbox{\@textsuperscript{\@thefnmark}\,}#1}
\makeatother

\begin{document}

I tried using different solutions such as \usepackage[hang, flushmargin, bottom]{footmisc} or even this one :

\makeatletter
\long\def\@makefntext#1{\parindent 0em\noindent
  \hbox{\@textsuperscript{\@thefnmark}\,}#1}
\makeatother

but it does not work ...

Thank you!


Solution

  • Here is a view at a default footnote without any real modifications:

    \documentclass{book}
    
    \usepackage{lipsum}
    \usepackage[french]{babel}
    \usepackage{hyperref}
    
    \setlength{\parindent}{3em}
    \frenchspacing
    
    \begin{document}
    
    Some text\footnote{\lipsum*[1]}.
    
    \end{document}
    

    enter image description here

    The use of

    \usepackage[french]{babel}
    

    redefines the way footnotes are handled (amongst other things), making your redefinition of \@makefntext useless; it's never used. In fact, it's a different macro - \insertfootnotemarkFB - that governs insertion and placement of the footnote at that point. Here's that macro's definition (taken from babel's French language definition french.ldf):

    \providecommand*{\insertfootnotemarkFB}{%
      \parindent=\parindentFFN
      \rule\z@\footnotesep
      \setbox\@tempboxa\hbox{\@thefnmark}%
      \ifdim\wd\@tempboxa>\z@
        \llap{\@thefnmark}\dotFFN\kernFFN
      \fi}
    

    It sets the paragraph indentation to \parindentFFN, then adjusts the gap between successive footnotes using a zero-width \rule, stores the footnote mark in a box, does some measurements and sets it if the width is non-zero; this skips printing anything if the mark is empty. So, a rather rudimentary solution would be to set the paragraph indent to an "appropriate value," noting that the actual footnote mark (any non-zero value) is set in a right-aligned zero-width box (via \llap{\@thefnmark}). So, one could do something like

    \settowidth{\parindentFFN}{\footnotesize 0}
    

    in the preamble, which results in this output:

    enter image description here

    This is sufficient for a small number of footnotes (less than 10) as all numbers (1-9) have a width less than or equal to 0. However, you could also redefine \insertfootnotemarkFB to suit your needs (which may include the superscripted footnote mark in the footnote without any following dot):

    \makeatletter
    \renewcommand\insertfootnotemarkFB{%
      \setlength{\parindent}{0pt}% Remove paragraph indent
      \rule\z@\footnotesep
      \hbox{\@textsuperscript{\@thefnmark}\,}}
    \makeatother
    

    enter image description here