5

I am writing my first university paper in Latex and I am getting compile errors when trying to use \footnote{} within the \paragraph{} command.

My document looks roughly like:

\begin{document}

\paragraph{This is confirmed by Aristotle ~\footnote{Aris. Pol. 8.12.3}.}

\end{document}

However, I get the error message:

tex/config/pdftex.map}]
! Argument of \@sect has an extra }.
<inserted text> 
            \par 
l.29    \paragraph
{The state of the evidence is highly fragmentary.  The two m...

This is the next paragraph.

The internet tells me that using footnotes is not possible within \paragraph{}, but I really like the formatting it gives (although \footnote{} works outside the paragraph environment. Is there a package I can use or a good workaround?

3

It is a bit odd to have a footnote in a section heading, but if you do, you need to supply a version without the footnote for the table of contents and page headings.

Here \paragraph is used directly to keep the example small but it is a 4th level heading so should only be used after \section, \subsection and \subsubsection.

\documentclass{article}
\begin{document}

\paragraph[This is confirmed by Aristotle]
{This is confirmed by Aristotle ~\footnote{Aris. Pol. 8.12.3}.}

\end{document}
  • @Ashley do you really have that deep a section structure in your document? – David Carlisle Jan 17 '16 at 20:11
  • Not really, to be honest. It's a 3000 word paper with a few sections, each for a new Greek Tyrant. I have, however, set a number of parameters on the paragraphs to make it fit in with my university's style guide. – Ashley Jan 17 '16 at 20:17
  • @Ashley it's really unfortunate that latex calls it \paragraph rather than \subsubsubsection lots of people use it when they probably wouldn't have, but too late to change it now:-) – David Carlisle Jan 17 '16 at 20:19
1

If you really really need to this the general mechanism is \footnotemark in the title, and then \footnotetext{text} later, outside the title. The catch is the \footnotemark needs to be proceeded by \protect and you need to fix the counter. However, you can do something simpler: give \paragraph an optional argument too. That optional argument is for the version of the title to go in the table of contents etc., but for paragraphs this material does not appear so you can just use []:

Sample titles

Sample foots

\documentclass{article}

\begin{document}

\paragraph{This is confirmed by Aristotle\protect\footnotemark.}
\refstepcounter{footnote}
\footnotetext{Aris. Pol. 8.12.3}
\addtocounter{footnote}{-1}

\paragraph[]{This is confirmed by Aristotle\footnote{Aris. Pol. 8.12.3}.}

\end{document}
  • the first version will put a footnotemark with no footnote in the table of contents (if the toc goes to level 4) – David Carlisle Jan 17 '16 at 20:59
  • @DavidCarlisle Indeed - but standard styles don't do that by default and this does not look like the type of heading that should be in the table of contents anyway. – Andrew Swann Jan 18 '16 at 16:58
  • Because it shouldn't be using \paragraph :-) – David Carlisle Jan 18 '16 at 16:59
0

Try putting \protect before \footnote.

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.