# change the footnote's length (increase footnotes right margin)

I'm using Book (KOMA-Script), By default, the footnote runs roughly from left margin to the right margin of the page, I used the following to control the left margin:

\deffootnote[8em]{8em}{8em} {\textsuperscript{\thefootnotemark}}


Result is as following:

I wondered if there is a way to control the right margin of the footnote? or in another word, the length of the footnote itself? i.e. 2em spacing to the right margin of the page?

-
What document class are you using? –  egreg Oct 2 '12 at 16:35
I'm using Book (KOMA-Script). –  Shi Yuan Oct 2 '12 at 16:36

Do you really mean 2em from the right margin of the page?

\documentclass{scrbook}
\usepackage{lipsum}

\deffootnote[8em]{8em}{8em} {\textsuperscript{\thefootnotemark}}

\makeatletter
\@ifdefinable{\org@makefntext}{%
\let\org@makefntext\@makefntext
\renewcommand*{\@makefntext}{%
\ifthispageodd{%
\setlength{\hsize}{\dimexpr\paperwidth-\oddsidemargin-1in-2em}%
}{%
\setlength{\hsize}{\dimexpr\paperwidth-\evensidemargin-1in-2em}%
}%
\org@makefntext
}%
}
\makeatother

\begin{document}
\lipsum[1] Hello\footnote{\lipsum[2]}
world.\footnote{\lipsum[3]} \lipsum[4]
\end{document}


If you have meant 2em to the right margin of the text body, then the redefinition of \@makefntext simplifies to:

\documentclass{scrbook}
\usepackage{lipsum}

\deffootnote[8em]{8em}{8em} {\textsuperscript{\thefootnotemark}}

\makeatletter
\@ifdefinable{\org@makefntext}{%
\let\org@makefntext\@makefntext
\renewcommand*{\@makefntext}{%
\org@makefntext
}%
}
\makeatother

\begin{document}
\lipsum[1] Hello\footnote{\lipsum[2]}
world.\footnote{\lipsum[3]} \lipsum[4]
\end{document}


-
How can this be achieved while using the article class? –  azetina Oct 2 '12 at 22:51
\deffootnote and \isthispageodd are features of KOMA-Script, but the trick with the redefinition of \@makefntext and setting \hsize remains the same for class article. –  Heiko Oberdiek Oct 2 '12 at 23:03
Its ok. I figured it out. I will delete my comments. If you can as well. –  azetina Oct 2 '12 at 23:25
amazing, works like a charm. thanks so much! –  Shi Yuan Oct 3 '12 at 11:08