1

I am trying to indent multiline footnotes 1.25cm after and including the second line.

This is the code fragment that my template uses to set-up footnotes, which needs to be adapted:

\AtBeginDocument{% 
\renewcommand\@makefntext[1]{%
\parindent 12\p@ 
\noindent 
\mbox{\@makefnmark} #1}}

I found a general answer to a similar question by @egreg, as follows:

\makeatletter
\renewcommand\@makefntext[1]{\leftskip=2em\hskip-2em\@makefnmark#1}
\makeatother

However, while I can include this answer to my code fragment so that there is some indent, I can't get it to do what I want it to, i.e. indent 2.5 cm. Also, I am not entirely sure whether my code modification is right, since my try at merging the two code fragments was more or less a guesstimation.

How do I modify my (the first) code fragment to keep the settings in principle, but add an indentation from the second line of 1.25cm using the method as described?

  • Are you using footmisc? – Werner Jun 20 '16 at 21:08
  • yes I am using footmisc, but it seems that some of the settings of footmisc are overwritten by the template code fragment i posted above – kuuhkuuh Jun 20 '16 at 21:29
  • Of course, you'll have to place any modification to \@makefntext after loading \usepackage{footmisc}. – Werner Jun 20 '16 at 21:31
1

Are you looking for something like this?

\documentclass{article}

\usepackage{lipsum}

\makeatletter
\renewcommand\@makefntext[1]{%
  \@setpar{%
    \@@par \@tempdima=\hsize
    \advance\@tempdima by -1.25cm\relax
    \parshape \@ne 1.25cm \@tempdima
  }%
  \par \parindent=\z@ \noindent
  \hb@xt@ \z@{\hss \hb@xt@ 1.25cm{\@thefnmark.\hss}}%
  #1%
}
\makeatother

\begin{document}
\vspace*{\fill}Text\footnote{\lipsum[1]}
\end{document}

enter image description here

2

Since you're only mentioning multi-lined footnotes (and not multi-paragraph footnotes), the following provides what you're after:

enter image description here

\documentclass{article}

\usepackage[paperheight=20\baselineskip]{geometry}% Just for this example
\usepackage{lipsum}

\makeatletter
\renewcommand\@makefntext[1]{%
  \parshape \@ne 1.25cm \dimexpr\hsize-1.25cm\relax% Set up the generic paragraph shape:
                                                   %   Indentation of first (and following) lines are 1.25cm
                                                   %   Width are \hsize-1.25cm (to fit horizontally)
  \noindent % Start paragraph
  \hspace*{-1.25cm}% Jump back (horizontally) the width of the indentation
  \makebox[12\p@][l]{\@makefnmark}% Set a box of width 12\p@ that is [l]eft aligned and insert the footnote mark
  #1}% Set the rest of the footnote as a paragraph
\makeatother

\begin{document}
Text\footnote{\lipsum[1]}. More text\footnote{\lipsum[2]}.
\end{document}

Comments in the code explain the components of the \@makefntext construction.

  • Thanks. That works as far as the second line is concerned, but not the margin from the footnote number to the text in the first line is too big. – kuuhkuuh Jun 20 '16 at 21:36
  • @kuuhkuuh: The distance from the left of the footnote number 1 to the beginning of the paragraph Lorem is exactly 12\p@. If this is wrong, what should it be? – Werner Jun 20 '16 at 21:37
  • I'm not sure. I think, the code fragment needs to be a modification of my template so that I can replace the current one in the template file, as the template defines what \p@ is and possbily changes it later? Either way, I can only get your code to work if I turn of the code fragment of the template and paste it in my book.tex file before begin{document} – kuuhkuuh Jun 20 '16 at 21:51
  • @kuuhkuuh: Perhaps you should provide an update of what things look like. We don't have your template, nor it is clear what your end-game is with this template. – Werner Jun 20 '16 at 21:54

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.