3

I have been using Stepehn's answer to this question to get a new footnote command with no numbering. However, I'd like to get no indentation on the footnote, also. That is: I want \blfootnote to have no numbers and no indentation (there are related questions out there, but none of them addresses this double issue together, I think). You can find a MWE below.

\documentclass{article}

\makeatletter
\def\blfootnote{\gdef\@thefnmark{}\@footnotetext}
\makeatother

\begin{document}

Hi there! I'm using whatsapp!\blfootnote{Though not much...}

\end{document}

How can I get what I desire? Thank you all very much in advance.

EDIT

Following the comments, I need to further specify the question. I need the non-indented and non-numbered blfootnotes only inside mdframed boxes. I never thought that could make a difference, and given the need for real minimal MWEs and maximum generality, I never specified it in my original question. I'm sorry. A new MWE would be:

\documentclass{article}
\usepackage{mdframed}

\makeatletter
\def\blfootnote{\gdef\@thefnmark{}\@footnotetext}
\makeatother

\begin{document}
\begin{mdframed}
Hi there! I'm using whatsapp\blfootnote{Though not much...}.
\end{mdframed}

Hi there! I'm using whatsapp\footnote{Though not much...}.
\end{document}

Hence, footnotes inside the box should be non-numbered and non-indented; those outside the box should remain as they are.

Thank you all again.

  • 2
    Try \usepackage[hang,flushmargin]{footmisc}. See chapter 1.10 and 1.11 in vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/macros/… . – Bobyandbob May 9 '17 at 13:35
  • Thanks for your comment. Unluckily, though, your suggestion will change the indentation of all footnotes (including the command \footnote, which should remain as it is with no changes). I only want those footnotes written using \blfootnote to be non-indented. – Héctor May 9 '17 at 13:38
1

You could load package manyfoot, but then you have to use a suffix instead a prefix for the additional footnote type.

\documentclass{article}
\usepackage{manyfoot}
\SetFootnoteHook{\hspace*{-1.8em}}
\DeclareNewFootnote{bl}[gobble]
\setlength{\skip\footinsbl}{0pt}

\begin{document}
Hi there! I'm using whatsapp!\footnotebl{Though not much ...}
\clearpage
Hi there! I'm using whatsapp!\footnotebl{Though not much ...}\footnote{normal footnote}
Text

Hi there! I'm using whatsapp!\footnote{normal footnote}\footnotebl{Second: Though not much ...}
Text 
\end{document}

enter image description here

enter image description here


Note that mdframed uses the syntax of environment minipage with the same counter. So the suggestion above will not work inside mdframed.

But if you want to use only the nonumbered and noindented footnotes in a mdframed environment you can use

\documentclass{article}
\usepackage{scrextend}
\usepackage{mdframed}

\begin{document}
\begin{mdframed}
  [startinnercode={\deffootnotemark{}\deffootnote{0pt}{0pt}{}}]
Hi there! I'm using whatsapp!\footnote{Though not much ...}
\end{mdframed}

Hi there! I'm using whatsapp!\footnote{normal footnote}
\end{document}

enter image description here

It is possible to combine both suggestions:

\documentclass{article}
\usepackage{manyfoot}
\SetFootnoteHook{\hspace*{-1.8em}}
\DeclareNewFootnote{bl}[gobble]
\setlength{\skip\footinsbl}{0pt}

\usepackage{scrextend}
\usepackage{mdframed}

\begin{document}
\begin{mdframed}
  [startinnercode={\deffootnotemark{}\deffootnote{0pt}{0pt}{}}]
Hi there! I'm using whatsapp!\footnote{Though not much ...}
\end{mdframed}

Hi there! I'm using whatsapp!\footnotebl{Though not much ...}\footnote{normal footnote}

Hi there! I'm using whatsapp!\footnote{normal footnote}\footnotebl{Second: Though not much ...}
\end{document}

enter image description here

  • Thank you for your comment. I really like your second approach (the one with just scrextend. However, instead of placing [startinnercode={\deffootnotemark{}\deffootnote{0pt}{0pt}{}}] in every box, I place it inside \newmdtheoremenv[...]{...}{...}, and then the effect is general. Though it's a minor issue, I thought it was best pointing it out. – Héctor May 10 '17 at 8:49
2

If you want it to behave mostly like a 'normal' footnote from the article class, then you should adapt the existing footnote commands. Here, \@blfootnotetext is identical to \@footnotetext, and \@makeblfntext is slightly modified from \@makefntext. Then we \def \blfootnote to use \@blfootnotetext....

\documentclass{article}
\usepackage[paperheight=2in]{geometry}% just for the example

\makeatletter
\def\blfootnote{\gdef\@thefnmark{}\@blfootnotetext}
% based on latex.ltx
\long\def\@blfootnotetext#1{\insert\footins{%
    \reset@font\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
    \protected@edef\@currentlabel{%
       \csname p@footnote\endcsname\@thefnmark
    }%
    \color@begingroup
      \@makeblfntext{%
        \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
    \color@endgroup}}%
% based on article.cls
\newcommand\@makeblfntext[1]{%
    \parindent 1em%
    \noindent
    \hb@xt@0em{\hss\@makefnmark}#1}
\makeatother

\begin{document}

Hi there! I'm using whatsapp!\blfootnote{Though not much...}
Hi there! I'm using whatsapp!\footnote{Though not much...}

\end{document}
  • Can you help here (in short, if not i will delete this (off-topic) comment): Why something like\makeatletter \let\makefntextCopie\makefntext \def\blfootnote{\def\@thefnmark{}\def\@makefntextCopie{\relax}\@footnotetext} \makeatother doesn't work? What do I wrong? – Bobyandbob May 9 '17 at 15:39
  • Suppose that this blfootnotes need to work inside mdframed boxes... What should I do, then? I ask it because your code works fine, but blfootnotes won't show up inside mdframed boxes. – Héctor May 9 '17 at 15:59
  • 1
    @Héctor -- I never use mdframed so I don't know off-hand. Can you edit to add an example of what you mean? – jon May 9 '17 at 17:48
  • 1
    @Bobyandbob -- As far as I know \makefntext is not defined, so you aren't actually \letting anything. Also, you are defining \blfootnote to take zero arguments, so that will be a problem. – jon May 9 '17 at 17:49
  • 1
    @Héctor -- not a problem. Though I see you've already accepted an answer. Do you still want to see this solution adapted for mdframed? – jon May 10 '17 at 14:33

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.