3

I would like to have footnotes in the margin of a document, on the same line as the word with the footnote mark, even if there are many footnote marks on the same line. Right now, I can only get the first footnote in the right place and the second one on the next line, as illustrated:

Footnotes on two lines

(This is using the following code:)

\documentclass{memoir}
\footnotesinmargin

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus 
neque sit amet massa lacinia volutpat. Interdum et malesuada fames ac ante 
ipsum primis in faucibus. Praesent facilisis cursus efficitur. Aliquam 
tincidunt lorem a imperdiet mattis. Integer finibus vehicula euismod. Nulla 
sit amet leo in lorem tempus ullamcorper. Praesent at libero augue. Nulla 
luctus orci nec volutpat pulvinar. Pellentesque egestas malesuada lorem, 
vitae egestas\footnote{One note} magna\footnote{Another note} maximus in. 
Donec eu neque eu tellus vehicula egestas. Integer ipsum metus, sodales eget 
porta sed, gravida vel augue. In nec volutpat dolor. Ut tempus ultrices 
consectetur. Quisque eget pharetra felis.
\end{document}

Both memoir and footmisc do not allow for both paragraph and margin footnotes at the same time.

Does anyone know a way to allow for this?

3

Margin notes are actually floats and therefore separate entities by default. If you want them merged in such instances you should be willing to do some manual legwork. This shouldn't be an issue, really, and can be left until the end of the document preparation.

enter image description here

\documentclass{memoir}
\footnotesinmargin

\newcommand{\labelfootnotemark}[1]{%
  \refstepcounter{footnote}%
  \textsuperscript{\thefootnote}%
  \label{#1}%
}
\newcommand{\reffootnote}[2]{%
  \unskip\ 
  \textsuperscript{\ref{#1}}%
  \ignorespaces #2}
\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus neque sit amet 
massa lacinia volutpat. Interdum et malesuada fames ac ante ipsum primis in faucibus. 
Praesent\footnote{One note\ \reffootnote{fnt:anothernote}{Another note that spans multiple 
lines}} facilisis cursus efficitur\labelfootnotemark{fnt:anothernote}.
Aliquam tincidunt lorem a imperdiet mattis. Integer finibus vehicula euismod. Nulla 
sit amet leo in lorem tempus ullamcorper. Praesent at libero augue. Nulla 
luctus orci nec volutpat pulvinar. Pellentesque egestas malesuada lorem, 
vitae egestas\footnote{One note} magna\footnote{Another note} maximus in. 
Donec eu neque eu tellus vehicula egestas. Integer ipsum metus, sodales eget 
porta sed, gravida vel augue. In nec volutpat dolor. Ut tempus ultrices 
consectetur. Quisque eget pharetra felis.

\end{document}

\labelfootnote{<label>} prints the footnote in a similar way \footnotemark would. Then you can use \reffootnote{<label>}{<footnote>} inside another \footnote{..} to set the text (similar to \footnotetext{..}).

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.