2

I'd like to have footnote indented like the ones from 1 to 9 in the image:

enter image description here

But if I have more than 9 notes the number of the note goes out of the left border.

How can I correctly set \footnotemargin in order to avoid it? That is have something like \setlength{\footnotemargin}{.4em} when there are less then 10 footnotes and increase it when there are more?

Any other way to reach the same result is welcome.

\documentclass[11pt,openright]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{showframe}
\usepackage[english]{babel}

% page layout
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=3cm,bmargin=3.5cm,lmargin=4cm,rmargin=3cm,marginparwidth=70pt}
\usepackage[marginal]{footmisc}
\setlength{\footnotemargin}{.4em}
\setlength{\footnotesep}{10pt}

\begin{document}
    I'd like to have this alignment for footnotes\footnote{A long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long footnote} write\footnote{A footnote} something. 
    Just\footnote{A footnote} to\footnote{A footnote} write\footnote{A footnote} something. 
    Just\footnote{A footnote} to\footnote{A footnote} write\footnote{A footnote} something. 
    Just\footnote{A footnote} to\footnote{A footnote} write\footnote{A footnote} something.
\end{document}
2

I solved by myself, modifying the values in this egreg's solution.

\documentclass[11pt,openright]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{showframe}
\usepackage[english]{babel}

% page layout
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=3cm,bmargin=3.5cm,lmargin=4cm,rmargin=3cm,marginparwidth=70pt}
\makeatletter
\renewcommand\@makefntext[1]{\leftskip=0em\hskip0em\@makefnmark#1}
\makeatother
\setlength{\footnotesep}{10pt}

\begin{document}
    I'd like to have this alignment for footnotes\footnote{A long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long footnote} write\footnote{A footnote} something. 
    Just\footnote{A footnote long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long } to\footnote{A footnote} write\footnote{A footnote} something.    
    Just\footnote{A footnote} to\footnote{A footnote} write\footnote{A footnote} something. 
    Just\footnote{A footnote} to\footnote{A footnote} write\footnote{A footnote} something.
\end{document}

enter image description here

I leave my question because I think it could be useful, please let me know if I should delete it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.