I didn't find any option with the footmisc
package to align the footnotes on the left (in otherwords, some kind of auto-\raggedright
). Could I do it without any package, namely with some \newcommand\isFootnote
trick? Or maybe with another package?
I need this as some web references I put in footnotes look very strange when they are justified, gaining spaces in inapproriate places e.g. http : //www
...). Or should I possibly use another formating feature to force the urls not to be split with spaces?
Update: I now understand this is related to my other footmisc hang & multiple issue, which now redirects to another post. So it has something to do with the babel package (the order, either [english,french] or [french,english] doesn't make a difference about the url splitting / hyphentation issue, putting french in the first place only fixes hanging and multiple!). When using french language, there is no hyphenation on the footnote and the url looks very ugly (adding a space between http and ://webaddress). No problem with the footnote linked to the english text.
\documentclass{article}
\usepackage[hang,multiple]{footmisc}
\usepackage[hyperfootnotes=false]{hyperref}
\newcommand\ftnote[1]{\footnote{\raggedright#1}}
\usepackage[english,french]{babel}
\begin{document}
\selectlanguage{french}
\og texte en fran�ais \fg{} %
\footnote{celaaaaaaaaaaaaaaa <http://www.address.net/long/path/to/filename.html>
cellllllllllllllllllla%
}%
\footnote{v�rification%
}
\selectlanguage{english}
english text%
\footnote{thisssssssssssssss <http://www.address.net/long/path/to/filename.html>
thiiiiiiiiiiiiiiiiiiiiis%
}%
\footnote{multiple check%
}
\end{document}
One way -- not necessarily the best way -- to deal with that would simply be left alignment. And the newcommand raggedright trick provided in the first answer, and which I included in this code, doesn't seem to work.
Besides, this may be a newbie LaTeX question but how to write < and > signs around the url (it is a standard here at least)? When I do \lt and \gt the compiler says the fontenc package is missing and then, when added, it complains about an undefined control sequence. I don't have this issue with LyX but I am switching to TeX for those footnote troubleshootings.
At last, although 'hang' and 'multiple' do succesfully work here (english and french text need to be on seperate lines in the body, though), as I am mixing french and english languages on the same page, it doesn't mean it's going to work fine on several pages with only french as language. I should try that in that another subject.
Thank you for the help!
Second update: thanks to everyone for those inputs. Now there is one additional difficulty. I would like to use the para option with footmisc. This options allows to have multiple footnotes added one after the other just like a paragraph and this obviously affects the raggedright behaviour. This option conflicts with the 'ragged' footmisc option (which seems to be enabled by default? As it just works without para...), by the way.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french,english]{babel}
\frenchbsetup{FrenchFootnotes=false}
\usepackage[para,hang,multiple]{footmisc}
\renewcommand{\footnotelayout}{\raggedright} % for having raggedright footnotes
\usepackage[hyperfootnotes=false]{hyperref}
\begin{document}
\selectlanguage{french}
\og texte en français \fg{}%
\footnote{celaaaaaaaaaaaaaaa \url{http://www.address.net/long/path/to/filename.html}
cellllllllllllllllllla%
}%
\footnote{vérification%
}
\end{document}
Note. I checked with more usual french words and hyphentation now seems to work. Note. Ok \frenchbsetup is needed when english comes at first when calling the babel package. I need to call french first, though, otherwise the little comma (footmisc multiple) doesn't appear in the body, and then \selectlanguage{french}, so I guess I could remove it.
\url{<http://....>}
, otherwise LaTeX is trying to treat them as ordinary text. Secondly, you example contains long "words" that don't have standard letter combinations and so have few hyphenation points. Replacing them by ordinary text should give LaTeX more places to break the lines. I also suggest you use\usepackage[babel]{csquotes}
and its command\enquote
for your quotations.