Math & Sciencentheorem and footnotes

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
x42bn6
Posts: 14
Joined: Tue Apr 07, 2009 1:35 am

ntheorem and footnotes

Post by x42bn6 »

Hi all,

If I have a theorem or some environment defined using the ntheorem package, and try and put a footnote somewhere in it, I get the following warning:

Code: Select all

warning (xxx): name (yyy) has been referenced but does not exist, replaced by a fixed one.
It then does not display the footnote.

Any ideas?

Did a lot of searching but couldn't find anything.

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

ntheorem and footnotes

Post by Stefan Kottwitz »

Hi,

perhaps post a minimal working example showing the problem and how your code is written. It's probably not necessarily long I guess, reading your description.

Stefan
LaTeX.org admin
x42bn6
Posts: 14
Joined: Tue Apr 07, 2009 1:35 am

ntheorem and footnotes

Post by x42bn6 »

Took me a while to get one up. It turns out it's hyperref giving me the warning but the footnote still isn't printing irregardless of whether it's enabled or not:

Code: Select all

%& -shell-escape
\documentclass{article}

\usepackage{amsmath}

\usepackage{framed}

\usepackage[amsmath, amsthm, framed, thmmarks]{ntheorem}

\newframedtheorem{example}{Example}[section]

\begin{document}

\section{Test}
\begin{example}[Foo]
Bar\footnote{Baz}
\end{example}

\end{document}
Compiles without a warning, but does not put a footnote on the page.

Code: Select all

%& -shell-escape
\documentclass{article}

\usepackage{amsmath}

\usepackage{framed}
\usepackage[colorlinks=true]{hyperref}
\usepackage[amsmath, amsthm, framed, thmmarks]{ntheorem}

\newframedtheorem{example}{Example}[section]

\begin{document}

\section{Test}
\begin{example}[Foo]
Bar\footnote{Baz}
\end{example}

\end{document}
Compiles with a warning, decorates the link and does not put the footnote on the page.

So either way it's not really helping me, but I guess if I'm able to put a footnote down then hyperref will behave too.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

ntheorem and footnotes

Post by Stefan Kottwitz »

You could use \footnotemark and \footnotetext:

Code: Select all

\begin{example}[Foo]
Bar\footnotemark
\end{example}
\footnotetext{Baz}
Stefan
LaTeX.org admin
x42bn6
Posts: 14
Joined: Tue Apr 07, 2009 1:35 am

Re: ntheorem and footnotes

Post by x42bn6 »

What if I wish to put multiple footnotes in the environment?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

ntheorem and footnotes

Post by Stefan Kottwitz »

In that case use the optional parameters of both commands, like num in

Code: Select all

\footnotemark[num]
...
\footnotetext[num]{text}
Stefan
LaTeX.org admin
x42bn6
Posts: 14
Joined: Tue Apr 07, 2009 1:35 am

Re: ntheorem and footnotes

Post by x42bn6 »

Genius! I've never used those functions before, and I'm guessing they're used in case \footnote doesn't work?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

ntheorem and footnotes

Post by Stefan Kottwitz »

x42bn6 wrote:I'm guessing they're used in case \footnote doesn't work?
You're right. For example in table environments those commands could be useful too while \footnote might not work.

Stefan
LaTeX.org admin
Post Reply