Text Formatting ⇒ Formating Footnotes
Formating Footnotes
I have a really hard trying to get my footnotes without left blank before the fnmark. I need this :
1. blablablablablabl
bkbakbkabkakka
Is someone can help me on this, it drives me crazy. The document class I am using is Book.
Thanks in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Formating Footnotes
Code: Select all
\documentclass{book}
\makeatletter
\renewcommand\@makefntext[1]{%
\setlength\parindent{1em}%
\noindent
\mbox{\@thefnmark.~}{#1}}
\makeatother
\usepackage{lipsum}% just to generate dummy text
\begin{document}
Test\footnote{\lipsum[1]}.
\end{document}
Code: Select all
\makebox[1.5em][r]{\@thefnmark.~}{#1}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Formating Footnotes
Code: Select all
\usepackage[bottom,flushmargin,hang,multiple]{footmisc}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Formating Footnotes
This is not working, my command are not highlight as error and are not taken into account. I am completely lost.meho_r wrote:Try this:Also, instead of \mbox{\@thefnmark.~}{#1}, you may use something like this:Code: Select all
\documentclass{book} \makeatletter \renewcommand\@makefntext[1]{% \setlength\parindent{1em}% \noindent \mbox{\@thefnmark.~}{#1}} \makeatother \usepackage{lipsum}% just to generate dummy text \begin{document} Test\footnote{\lipsum[1]}. \end{document}
where 1.5em is the width of the box in which footnote mark is placed, and r means it is raggedleft.Code: Select all
\makebox[1.5em][r]{\@thefnmark.~}{#1}
Re: Formating Footnotes
%\makeatletter
%\newcommand\@makefntext[1]%
% {\parbox[t]{2mm}{\@thefnmark. \,}\parbox[t]{110mm}{#1}}
%\makeatother
This is I think my best solution to obtain what I want, but written like this the footnotes are in the principal text and not at the bottom of the page. What should I add to my code to specify the text at the bottom of my page ?
Re: Formating Footnotes
1. Do you want numbers in footnotes to be normal, not superscript, followed by a period?
2. Do you want numbers not to be indented (as well as the text of the footnote in general)?
This is what I concluded from your first post and the code I provided does exactly that (see the output in the attachment). If you want something else, please state that clearly and we'll try to find a solution.
- Attachments
-
- example.pdf
- (30.44 KiB) Downloaded 469 times
Re: Formating Footnotes
Your example shows almost what I am looking for. Except that I would like the footnote text lines that are under the footnotemark to be align with the first footnotetext line. Is that clear ?
Concerning the footenote mark position this is exactly what I want.
Formating Footnotes
In case that superscript numbers in footnotes pose a problem, you can try something like this:
Code: Select all
\documentclass{article}
\usepackage[bottom,flushmargin,hang,multiple]{footmisc}
\renewcommand*\hangfootparskip{0\baselineskip}% vertical space between paragraphs in a footnote
\renewcommand*\hangfootparindent{1em}% indentation of paragraphs after the first one in a footnote
\makeatletter
% the original code from footmisc.sty (except for the two lines marked as == added ==)
\long\def\@makefntext#1{%
\renewcommand{\@makefnmark}{\mbox{% == added ==
\normalfont\@thefnmark.~}}% == added ==
\ifFN@hangfoot
\bgroup
\setbox\@tempboxa\hbox{%
\ifdim\footnotemargin>0pt
\hb@xt@\footnotemargin{\@makefnmark\hss}%
\else
\@makefnmark
\fi
}%
\leftmargin\wd\@tempboxa
\rightmargin\z@
\linewidth \columnwidth
\advance \linewidth -\leftmargin
\parshape \@ne \leftmargin \linewidth
\footnotesize
\@setpar{{\@@par}}%
\leavevmode
\llap{\box\@tempboxa}%
\parskip\hangfootparskip\relax
\parindent\hangfootparindent\relax
\else
\parindent1em
\noindent
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\hss\@makefnmark}%
\else
\ifdim\footnotemargin=\z@
\llap{\@makefnmark}%
\else
\llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
\fi
\fi
\fi
\footnotelayout#1%
\ifFN@hangfoot
\par\egroup
\fi
}
\makeatother
\usepackage{lipsum}% just to generate dummy text
\begin{document}
Test\footnote{Some dummy text which serves only one purpose: to show how a footnote would look like when you are using the code I provided earlier. As you can see, now all lines are indented by the same amount as the first one.
A second paragraph in a footnote should be indented.}
\setcounter{footnote}{9}
Test\footnote{Some dummy text which serves only one purpose: to show how a footnote would look like when you are using the code I provided earlier. As you can see, now all lines are indented by the same amount as the first one.}
\setcounter{footnote}{99}
Test\footnote{Some dummy text which serves only one purpose: to show how a footnote would look like when you are using the code I provided earlier. As you can see, now all lines are indented by the same amount as the first one.}
\end{document}
Re: Formating Footnotes
But with my code it is not working, I am using the class book.
Is this can be a problem ? This drives me really really crazy.