4

I use footmisc to modify the layout of my footnotes such that the footnote marker and the footnote text flush to the left margin, and I turn off the justification and hyphenation in the footnotes with \raggedright.

How can I do these things in the argument of the \thanks command? Since I tend to use the package titling for modifying \maketitle, I assume it's best to stick to that package for modifying \thanks as well. The problem is that I understand almost nothing of the documentation for that package.

\documentclass{article}
\usepackage[flushmargin,hang]{footmisc}
    \renewcommand{\footnotelayout}{\raggedright}
\begin{document}
\title{My title\thanks{These are the people I wish to thank. I need to add more words to
 demonstrate that there is right-edge justification in this line.}}
\maketitle
A sentence.\footnote{A footnote which I intend to be long enough to demonstrate that
 there is no right-edge justification.}
\end{document}

enter image description here

5
  • 1
    Did you see this one? tex.stackexchange.com/questions/135911/… – egreg Oct 12 '13 at 13:37
  • @egreg: Will that not interfere with my usage of titling for modifying other parts of \maketitle (cf. tex.stackexchange.com/questions/136285/…)? – Sverre Oct 12 '13 at 13:42
  • Well, in your code you aren't mentioning titling. Please, make the question as selfcontained as possible. – egreg Oct 12 '13 at 13:43
  • @egreg There's a certain tension here between being minimal and being "self-contained". It's hard to know in advance if answers will be incompatible with other packages one normally uses (and to be fair, I highlighted titling in my question and tagged my question with titling). That said, I've modified my question slightly to show that I'd prefer to use titling (under the assumption that that would be the best solution). – Sverre Oct 12 '13 at 13:47
  • OK, I understand what you're saying, but I remain of the opinion that you should add titling also here. The solution I give below should be compatible with the other one. – egreg Oct 12 '13 at 14:16
5

With titling it is easier on one side and more difficult on the other. However it's possible to replicate the setup made by footmisc also for the \thanks footnotes.

\documentclass{article}
\usepackage[pass,showframe]{geometry} % just to show the page frame

\usepackage{titling}
\usepackage[flushmargin,hang]{footmisc}
\setlength{\footnotemargin}{1em} % just to show clearly equal output

\renewcommand{\footnotelayout}{\raggedright}

\makeatletter
\renewcommand{\makethanksmark}{%
  \setbox\@tempboxa\hbox{%
    \ifdim\footnotemargin>0pt
      \hb@xt@\footnotemargin{\thanksfootmark\hss}%
    \else
      \thanksfootmark
    \fi
  }%
  \leftmargin\wd\@tempboxa
  \rightmargin\z@
  \linewidth \columnwidth
  \advance \linewidth -\leftmargin
  \parshape \@ne \leftmargin \linewidth
  \footnotesize
  \@setpar{{\@@par}}%
  \leavevmode\raggedright %%% <--- add \raggedright
  \llap{\box\@tempboxa}%
  \parskip\hangfootparskip\relax
  \parindent\hangfootparindent\relax
}
\makeatother
\renewcommand{\thanksfootmark}{%
 {\normalfont\thanksscript{\thanksfootpre\tamark\thanksfootpost}}%
}

\begin{document}

\title{My title\thanks{These are the people I wish to thank. I need to add more words to
 undoubtedly demonstrate that there is right-edge justification in this line.}}

\maketitle

A sentence.\footnote{A footnote which I intend to be long enough to demonstrate that
 there is no right-edge justification.}

\end{document}

enter image description here

8
  • The code between makeatletter and makeatother, that is only to add \raggedright to the thanks footnote? – Sverre Oct 12 '13 at 14:27
  • @Sverre No, it's needed for getting the same paragraph shape with \thanks as with \footnote. I adapted the entire code from footmisc when the hang option is issued and also added \raggedright. – egreg Oct 12 '13 at 14:33
  • Out of curiosity, what would the titling option be, which you call "easier on one side and more difficult on the other"? I'm just not sure if I should end up with a document that uses titling to modify all the properties of \maketitle except the \thanks command, since titling is supposed to cover that too. – Sverre Oct 17 '13 at 12:45
  • @Sverre With titling it's easier to modify the title block's appearance; but it makes a bit more difficult obtaining the alignment you want. – egreg Oct 17 '13 at 12:46
  • So I shouldn't even bother with it, in other words? I.e. it is more complicated than the code you're suggesting above? – Sverre Oct 17 '13 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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