Footnotes inside a mdframed
are treated as inside a minipage
, so \thempfootnote
is used:
\documentclass{article}
\usepackage[textheight=3cm, textwidth=9cm]{geometry}
\usepackage{mdframed}
%% This at least produces the dagger outside of mdframed
\renewcommand{\thefootnote}{$\dagger$}%
%%% http://tex.stackexchange.com/questions/78221/changing-footnote-symbols
%%% This yields a numerical value outside of mdframed and an alphabetical foot note inside mdframed
%\makeatletter
%\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
% \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
% \or \ddagger\ddagger \else\@ctrerr\fi}}
%\makeatother
\begin{document}
This\footnote{Outside of Mdframed a dagger is used as desired.} is a footnote outside of mdframed.
\begin{mdframed}
\renewcommand{\thempfootnote}{$\dagger$}% <-- This will now have an effect.
This\footnote{Want a dagger for footnotes inside of Mdframed} is a footnote inside mdframed.
\end{mdframed}
\end{document}
Of course, you can make the definition based on a set of symbols and apply it either only to footnotes inside mdframed
(as in my example just below) or to all footnotes (as in the example at the bottom):
\documentclass{article}
\usepackage[textheight=6cm, textwidth=9cm]{geometry}
\usepackage{mdframed}
\usepackage{etoolbox}
\makeatletter
\AtBeginEnvironment{mdframed}{%
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or \dagger\or \ddagger\or
\mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
\or \ddagger\ddagger \else\@ctrerr\fi}}%
}
\renewcommand\thempfootnote{\fnsymbol{mpfootnote}}
\makeatother
\begin{document}
This\footnote{I have a regular marker for this footnote outside of \texttt{mdframed}} is a footnote outside mdframed.
\begin{mdframed}
This\footnote{I have a \texttt{dagger} for this footnote inside of \texttt{mdframed}} is a footnote inside mdframed.
This\footnote{I have a \texttt{ddagger} for this footnote inside of \texttt{mdframed}} is a footnote inside mdframed.
This\footnote{I have a \texttt{mathsection} for this footnote inside of \texttt{mdframed}} is a footnote inside mdframed.
\end{mdframed}
This\footnote{I have a regular marker for this footnote outside of \texttt{mdframed}} is a footnote outside mdframed.
\end{document}
\documentclass{article}
\usepackage[textheight=6cm, textwidth=9cm]{geometry}
\usepackage{mdframed}
\usepackage{xpatch}
\makeatletter
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or \dagger\or \ddagger\or
\mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
\or \ddagger\ddagger \else\@ctrerr\fi}}%
\renewcommand\thefootnote{\fnsymbol{footnote}}
\renewcommand\thempfootnote{\fnsymbol{mpfootnote}}
\makeatother
\begin{document}
This\footnote{I have a \texttt{dagger} for this footnote outside of \texttt{mdframed}} is a footnote outside mdframed.
\begin{mdframed}
This\footnote{I have a \texttt{dagger} for this footnote inside of \texttt{mdframed}} is a footnote inside mdframed.
This\footnote{I have a \texttt{ddagger} for this footnote inside of \texttt{mdframed}} is a footnote inside mdframed.
This\footnote{I have a \texttt{mathsection} for this footnote inside of \texttt{mdframed}} is a footnote inside mdframed.
\end{mdframed}
This\footnote{I have a \texttt{ddagger} for this footnote outside of \texttt{mdframed}} is a footnote outside mdframed.
\end{document}