0

I'm using memoir and awesomebox and having trouble with footnotes in the margin.

Initially they were appearing after the box rather than alongside it. so I added

\usepackage{footnote}
\makesavenoteenv{tabular}

as suggested in How can I get footnotes in awesomebox? but now they appear in (more-or-less) the correct place but are not wrapped:

output

The code I'm using is:


\tipbox{
    \wireshark\  will only export the fields defined to it as 
    columns\footnote{As far as I've been able to ascertain.}: Figure~\vref{fig:wiresharkmain} shows the ones I'm currently using and Figure~\vref{fig:wiresharkpreferences} shows their definitions, should you wish to use them.
    Exporting is started from the menu option
    
    \command{File \rightarrow\ Export Packet Dissections \rightarrow\ As CSV\ldots} 
    
    and may take a few minutes for very large captures. Figure~\vref{fig:csvoutput-wireshark} shows a sample of its structure.
}

with a preamble containing:


\usepackage{awesomebox}
\let\Huge\LARGE
\setlength{\aweboxrulewidth}{1pt}
\colorlet{abimportant}{IBMBlue80}
\definecolor{abvrulecolor}{RGB}{36,42,36}
\renewcommand{\tipbox}[1]{%
  \awesomebox{\aweboxrulewidth}{\abIconLightBulb}{abimportant}{#1}}
...
\renewcommand*{\sidefootform}{\raggedright}
    \setlength{\footmarkwidth}{-0.2em}
    \setlength{\footmarksep}{-0.2em}
    \setlength{\footparindent}{0em}
\renewcommand{\foottextfont}{\raggedright\footnotesize}
...
\usepackage{footnote}
\makesavenoteenv{tabular}

Here is an MWE:


\documentclass[final,twoside,openright,showtrims,10pt]{memoir} %

\usepackage{awesomebox}

%\usepackage{footnote}
%\makesavenoteenv{tabular}


\begin{document}
    \footnotesinmargin
    
    \chapter{Title}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit
    \footnote{Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}, 
    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
    
    \notebox{
        Lorem ipsum dolor sit amet, consectetur adipiscing elit
        \footnote{Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. }, 
        sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
    }
    
\end{document}

It has very slightly different symptoms to my full document in that, as-is, the build gives "Float(s) lost. \end{document}" and the footnote is totally lost. Adding in the commented out lines gives the behavior as described above:

enter image description here

3
  • Please provide an MWE (from documentclass... to \end{document} that we can compile that shows your problem I tried to cobble togther an MWE from your code snippets but it did not work. For instance it returned "Undefined color IBMBlue80" Why are you using the footnote package when memoir supplies footnotes. Jun 10, 2022 at 17:09
  • Thanks Peter. I'll try and build a MWE on Monday: I had hoped someone might know the answer off the top of their head. As to why I added footnote: because the linked answer suggested it as a fix. As I wrote, I didn't have that originally, but then the I get the original problem. I'm not at all surprised it didn't work -- probably even mentioning it here was an error on my part.
    – Ian
    Jun 11, 2022 at 10:01
  • As you already mention, you cannot have footnotes (they are floats) inside a box like this. In this case they are \marginpar's. But the same thing applies, and they cannot escape. One can redefine \footnotesinmargin to make it use \sidepar, that works, but the placement gets disturbed by \notebox. But using the marginnote package and its \marginnote macro in a redefinition of \@footnotetext actually works. But this has the downside that marginnotes (like sidepar) does not move the notes if they get close.
    – daleif
    Jun 13, 2022 at 7:54

0

You must log in to answer this question.

Browse other questions tagged .