I have side paragraphs in italics and I am using typewriter fonts in the main text to refer to code elements. I want to use the same font in my side paragraphs because it should be clear that it is the same concept and it gets messy with too many fonts. However I keep getting the italic monospace font. How can I get the non italic monospaced font? I have tried so many hacks but nothing seems to work...
\documentclass{memoir}
\usepackage[lining]{ebgaramond}
\renewcommand*{\sideparfont}{\footnotesize\itshape}
\begin{document}
\sidepar{Lorem \texttt{foo-bar} ipsum}
Lorem ispum cit \texttt{foo-bar} dolor.
\end{document}