Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}  
    

    (from http://tex.stackexchange.com/a/19845/)

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

share|improve this question
    
Welcome to TeX.sx! Could you post a screenshot of what the intended output should look like? –  doncherry Jan 13 '12 at 14:00
2  
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
show 1 more comment

2 Answers

up vote 6 down vote accepted

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}

enter image description here

share|improve this answer
1  
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
add comment

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

enter image description here

\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.

share|improve this answer
    
+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
2  
@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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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