7

How can i get "paired footnotes" in plain latex or lualatex.

It's can be done with memoir macro: http://tug.ctan.org/macros/latex/contrib/memoir/memman.pdf page 237

\wrapfootnote{disciplines}{For example, Celtic studies.} require double marks in the text.

makes:

Some α-disciplines-α require double marks in the text
...
Footnote
α--α For example, Celtic studies.
4

Here's a possibility:

\documentclass{article}

\makeatletter
\newcommand{\wrapfootnote}[1]{%
  \@ifnextchar[%
    {\double@xfootnote{#1}}
    {%
     \stepcounter\@mpfn
     \protected@xdef\@thefnmark{\thempfn}%
     \double@footnotemark{#1}%
     \@footnotetext
    }%
}
\def\double@xfootnote#1[#2]{%
  \begingroup
  \csname c@\@mpfn\endcsname #2\relax
  \unrestored@protected@xdef\@thefnmark{\thempfn}%
  \endgroup
  \double@footnotemark{#1}\@footnotetext
}
\newcommand{\double@footnotemark}[1]{%
  \leavevmode
  \@makefnmark
  #1\edef\@x@sf{\the\spacefactor}\nobreak
  \@makefnmark
  \spacefactor\@x@sf\relax 
}
\makeatother

\xspaceskip=20pt % for exaggerating the effect
\textheight=4cm % for smaller picture

\begin{document}

Some \wrapfootnote{disciplines}{For example, Celtic studies.} require double marks in the text.

Let's see after a \wrapfootnote{period.}{Will the space be extended?} Is the space extended?

Also \wrapfootnote{whatever}[42]{Foo.} is correct.

\end{document}

enter image description here

  • Awesome, thank you. But how can i use minuscule greek letters instead of numbers? – koclaisi Sep 20 '15 at 17:45
  • @koclaisi Please, be more specific, particularly whether these letters should be automatically determined, if they should be as exponent and what should appear in the relevant footnote. – egreg Sep 20 '15 at 18:08
1

EDITED for two interpretations

Here's an attempt to meet the OP's specific requirements. Obviously, \thefnsymbol needs to be fleshed out with more cases.

\documentclass{article}
\makeatletter
\def\@fnsymbol#1{\thefnsymbol{#1}---\thefnsymbol{#1}}
\def\thefnsymbol#1{\ensuremath{\ifcase#1\or 
  \alpha\or \beta \or \delta \or
   \gamma\or \epsilon\or ... \fi}}
\makeatother
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\newcommand\wrapfootnote[2]{\stepcounter{footnote}%
  \thefnsymbol{\value{footnote}}-#1-%
   \thefnsymbol{\value{footnote}}\footnotetext{#2}}
\textheight1in
\begin{document}
\wrapfootnote{disciplines}{For example, Celtic studies.} require double marks in the text.

Also, \wrapfootnote{more disciplines}{For example, German studies.} require double marks in the text.

But never, ever, do \wrapfootnote{Antarctic Studies}{that's right, Antarctic
  studies} require double marks.
\end{document}

enter image description hereWith a slight redesign of \wrapfootnote, the delimiters as superscripts can be obtained:

\documentclass{article}
\makeatletter
\def\@fnsymbol#1{\thefnsymbol{#1}---\thefnsymbol{#1}}
\def\thefnsymbol#1{\ensuremath{\ifcase#1\or 
  \alpha\or \beta \or \delta \or
   \gamma\or \epsilon\or ... \fi}}
\makeatother
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\newcommand\wrapfootnote[2]{\stepcounter{footnote}%
  $^{\thefnsymbol{\value{footnote}}-}$#1%
   $^{-\thefnsymbol{\value{footnote}}}$\footnotetext{#2}}
\textheight1in
\begin{document}
\wrapfootnote{disciplines}{For example, Celtic studies.} require double marks in the text.

Also, \wrapfootnote{more disciplines}{For example, German studies.} require double marks in the text.

But never, ever, do \wrapfootnote{Antarctic Studies}{that's right, Antarctic
  studies} require double marks.
\end{document}

enter image description here

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.