# Align footnote mark with text margin

I have to clone a document, and the footnote mark shouldn't be indented, but aligned to the text body. I couldn't find an answer elsewhere. Any ideas? I'm using XeLaTeX.

The result should look like this:

textbody-textbody-textbody-textbody-textbody² textbody-textbody-textbody-textbody-textbody- textbody-textbody-textbody-textbody-textbody-

2 Footnote-Footnote-Footnote-Footnote-Footnote- Footnote-Footnote-Footnote-Footnote-Footnote- Footnote-Footnote-Footnote-Footnote-Footnote-

1. The number of the footnote should have the same size as the footnote. This can be achieved with:

\usepackage{scrextend}
\deffootnote{1,2em}{1.6em}{\thefootnotemark.\enskip}

2. The footnote text should be aligned with the text body.

-
Welcome to TeX.sx! Could you post a screenshot of what the intended output should look like? – doncherry Jan 13 '12 at 14:00
Your first question is answered in tex.stackexchange.com/questions/19844/…. Please edit your question and remove that part; it's better to have only one issue per question at any rate. – doncherry Jan 13 '12 at 14:03
@doncherry: thank you very much! – david Jan 13 '12 at 15:51
I cleaned up your question a bit, to show you what a well-asked question on here looks like. Don't be surprised that I removed your "thanks", we don't usually put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – doncherry Jan 13 '12 at 17:18
Btw, the comma in 1,2em probably ought to be a period: 1.2em. Interestingly, it still works with the comma. – doncherry Jan 13 '12 at 17:24

EDIT: My first "solution" only worked by chance and for one-digit footnotes. Here's something more robust:

\documentclass{article}

\usepackage{scrextend}
\deffootnote[1.8em]{0pt}{1.6em}{\makebox[1.8em][l]{\thefootnotemark.}}

\textheight=400pt% just for the example

\usepackage{lipsum}

\begin{document}

Some text.\footnote{\lipsum*[1]}

\setcounter{footnote}{10}

\lipsum*[1]\footnote{\lipsum*[1]}

\end{document}


-
yes, thank you very much! that's exactly what I was looking for! you're awesome, guys! – david Jan 13 '12 at 17:11
If you take david's example literally, he doesn't want the period after the footnotemark, so it'd be {\thefootnotemark\enskip}. – doncherry Jan 13 '12 at 17:12

Here is a slightly more verbatim way of modifying the footnote display via a redefinition of \@makefntext:

\documentclass{article}

\makeatletter
\renewcommand{\@makefntext}[1]{%
\parindent 1em%
\noindent\normalfont\@thefnmark~#1
}
\makeatother

\textheight=250pt% just for the example

\usepackage{lipsum}

\begin{document}

\lipsum*[1]\footnote{\lipsum*[1]}

\end{document}


This just pushes the first footnote paragraph against the footnote number, separated by a tie ~. If you want the paragraph number to be the width of the regular footnote paragraph indent (which is 1em by default in article), you could use

\makeatletter
\renewcommand{\@makefntext}[1]{%
\parindent 1em%
\noindent\hb@xt@ \parindent{\normalfont\@thefnmark}#1
}
\makeatother


However, this would become problematic if you have more than 9 footnotes, since 10 in \normalfont is exactly 1em wide, causing the footnote number/mark to touch the footnote text.

-
+1, and this should be the accepted answer. – lockstep Jan 13 '12 at 18:05
What about using something like \settowidth{\@tempdima}{\@thefnmark} \parindent \@tempdima instead of the fixed \parindent 1em (or maybe 0.75em plus \@thefnmark's width)? – Stephen Jan 13 '12 at 18:50
@Stephen: Yah sure. I would go with the latter using something like \dimexpr\@tempdima+.75em\relax. The context and extent of my suggestion would help to know whether this is required. Sometimes simple is better. – Werner Jan 13 '12 at 18:53