## LaTeX forum ⇒ Text Formatting ⇒ How to align footnote text and numbering Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

### How to align footnote text and numbering  Topic is solved

I wish to align the text of longer footnotes with the number, a minimum working example (below) shows how the text goes more to the left than the numbering of longer footnotes.

\documentclass[10pt,a4paper,oneside]{paper}\usepackage[top=0.5cm,left=0.5 cm,right=10 mm,bottom=10 mm,headheight=11.0 pt]{geometry}	 \begin{document} I think that\footnote{something} and that \footnote{Alternatively banks can hold an amount of capital based on a standardized approach but this would generally lead to a higher requirement of capital. In fact this is the standard approach, only banks deemed sufficiently sophisticated may use the "international model-based approach" described in the subsection.}\end{document}

Tags:

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
The KOMA-Script classes offer the command \deffootnote that can be used for this. The command is also available in other classes if you load the package scrextend. The syntax is as follows:

\deffootnote[<width of mark>]   {<indent of footnote text>}   {<paragraph indent in the footnote text>}   {<definition of mark>}

Below I show an example of its usage. I also changed "..." into ...'' in order to get correct quotation marks.

deffootnote.png (19.56 KiB) Viewed 15970 times

\documentclass{article}\setlength\textheight{3cm}% /only/ for this example! \usepackage{scrextend}\deffootnote[2em]{2em}{1em}{\textsuperscript{\thefootnotemark}\,}\begin{document} I think this\footnote{something} and that\footnote{Alternatively banks can   hold an amount of capital based on a standardized approach but this would   generally lead to a higher requirement of capital. In fact this is the   standard approach, only banks deemed sufficiently sophisticated may use the   international model-based approach'' described in the subsection.} \end{document}

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm
Thanks, it looks exactly like what i need. However it seems to encounter an error because of one of the packages i am using. Could you suggest how to fix this ?

(i have tons of packages..)

\usepackage[top=2.5cm,left=2 cm,right=3.0 cm,bottom=2.5cm,headheight=12.0 pt]{geometry}	\usepackage[ansinew]{inputenc}\usepackage{graphicx}\usepackage{amssymb,amsmath}%\usepackage[compact]{titlesec}												%Bruges til at fjerne white space omkring overskrifter(chapters/sections etc.)\usepackage{tabularx}\usepackage{multicol}\usepackage{amsmath, amsthm, amssymb}									%Stor matematik pakke\usepackage{ulem} 																		%lettere adgang til over og underline\usepackage{listings} 																%Gør kode pænere\usepackage{textcomp} 																%gør at man kan skrive nye symboler, bla. \usepackage{wrapfig}																	%Gør at figure kan wrappes\usepackage[dvipsnames]{xcolor}																		%Gør at tekst osv. kan farves\usepackage[bf]{caption}						 									%gGør navnet på captions(fx. "Figur 5.1"') til fed skrift\usepackage{enumerate}																%Gør at man kan sætte tal/bogstaver som indeks på lister\usepackage[nottoc,numbib]{tocbibind}									%Sørger for at bibliografien er med i table of kontents\usepackage{natbib}																		%Tillader at citer som \citep hvilket af nogen af foretrukket over \cite\usepackage[all]{xy}																	%Kan bruges til at tegne figurer såsom flowcharts\usepackage{verbatim}\usepackage{epstopdf}																	%Tillader brugen af .eps billeder uden at skulle compile via dvi/ps\usepackage{environ}																	%Gør at man kan definere nye enviroments\usepackage{framed,color}															%Kan lave simple bokse eller venstre streger									%\usepackage[toc]{multitoc}														%Laver pæn indholdsfortegnelse med 2 søjler\usepackage{subcaption}\usepackage{epsf}\usepackage{url}\usepackage{lscape}																	  %Allows for landscape\usepackage{etoolbox}\usepackage{mdframed}																	%have to install this manually on miktex, helps with boxing theorems\usepackage{fancyhdr}																	%fancy headers \usepackage{lscape}																	  %Allows for landscape\usepackage{multirow}																  %multiple rows in tables\usepackage{qtree}																	  %draws trees \usepackage{scrextend}
Last edited by cgnieder on Fri Jul 19, 2013 1:44 pm, edited 1 time in total.

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
thorpn wrote:Thanks, it looks exactly like what i need. However it seems to encounter an error because of one of the packages i am using. Could you suggest how to fix this ?

Yes: try to build a minimal working example. This should reveal where the conflict stems from. (This really is the standard way that we all use to determine where and why something went wrong).

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm
Good idea, i did that now. It turns out it was two packages. How can i now make them work together ?

\documentclass{article}\usepackage[bf]{caption}						 									%gGør navnet på captions(fx. "Figur 5.1"') til fed skrift\usepackage{subcaption} \usepackage{scrextend}															  %to make footnotes nicer  \deffootnote[2em]{2em}{1em}{\textsuperscript{\thefootnotemark}\,}\begin{document} I think this\footnote{something} and that\footnote{Alternatively banks can   hold an amount of capital based on a standardized approach but this would   generally lead to a higher requirement of capital. In fact this is the   standard approach, only banks deemed sufficiently sophisticated may use the   international model-based approach'' described in the subsection.} \end{document}

Again thanks

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
The first thing to try if two packages conflict is change the loading order. This works in this case:

\documentclass{article}\usepackage{scrextend}\usepackage[bf]{caption}\usepackage{subcaption} \deffootnote[2em]{2em}{1em}{\textsuperscript{\thefootnotemark}\,}\begin{document} I think this\footnote{something} and that\footnote{Alternatively banks can   hold an amount of capital based on a standardized approach but this would   generally lead to a higher requirement of capital. In fact this is the   standard approach, only banks deemed sufficiently sophisticated may use the   international model-based approach'' described in the subsection.} \end{document}

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm
Thanks alot didnt know changing the ordering helped