LaTeX forum ⇒ Text FormattingHow 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

Postby thorpn » Fri Jul 19, 2013 11:52 am

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.

Thank you in advance!

  1. \documentclass[10pt,a4paper,oneside]{paper}
  2. \usepackage[top=0.5cm,left=0.5 cm,right=10 mm,bottom=10 mm,headheight=11.0 pt]{geometry}
  3.  
  4. \begin{document}
  5.  
  6. 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.}
  7. \end{document}

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Jul 19, 2013 1:30 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:

  1. \deffootnote[<width of mark>]
  2. {<indent of footnote text>}
  3. {<paragraph indent in the footnote text>}
  4. {<definition of mark>}


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

deffootnote.png
deffootnote.png (19.56 KiB) Viewed 14934 times


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


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

thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Postby thorpn » Fri Jul 19, 2013 1:40 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..)

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

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Jul 19, 2013 1:55 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 Infominimal 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

Postby thorpn » Fri Jul 19, 2013 3:39 pm

Good idea, i did that now. It turns out it was two packages. How can i now make them work together ?

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



Again thanks :)

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Jul 19, 2013 3:57 pm

The first thing to try if two packages conflict is change the loading order. This works in this case:

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


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

thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Postby thorpn » Fri Jul 19, 2013 5:10 pm

Thanks alot :) didnt know changing the ordering helped


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 5 guests